base32768
totally-safe-transmute | base32768 | |
---|---|---|
17 | 5 | |
256 | 139 | |
- | - | |
0.0 | 3.6 | |
about 2 years ago | 2 months ago | |
Rust | JavaScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
totally-safe-transmute
-
Sudo Replacement
For example, there is this (pure safe Rust) code: https://github.com/ben0x539/totally-safe-transmute/blob/main... which accesses external resources (/proc/self/mem) in order to violate the safety guarantees.
-
A rust crate that lets you compress ASCII text to a single Unicode "character"
The first is the totally_safe_transmute crate. I mean, who wouldn't love library code that has .expect("welp") and .expect("oof") as its error handling? But that's not even the really scary part. Issue #2 ("i hate this") remains open to this day, but for obvious reasons there's no chance of resolution. This post has some context and a line-by-line explanation of how it works.
-
What do you expect from Rust in 2023?
You mean like this?
-
In C# you can transmute without `unsafe`
You can also do that in rust on linux: https://github.com/ben0x539/totally-safe-transmute/blob/master/src/lib.rs
-
Why choose Rust
I want to correct this statement: Rust can be safer, but not if a library you use contains unsound code. Unsoundness is most often caused by unsafe code, but not always (totally_safe_transmute, anyone?). There is a misconception that unsafe code blocks are always unsound and should be avoided at all costs, but they're completely fine if the safety contracts are upheld. In fact, unsafe blocks isolate the potential issues to make it easier to identify where undefined behavior may be occurring. unsafe code blocks are a feature of the language, and their usage should not be viewed as opting out of any safety the language provides, imo.
-
"# NONONONONONO DON'T YOU FUCKIN' DARE the safety features are there so that your programs aren't filled to the brim with security vulnerabilities. Unless you care A LOT(And I mean A LOT A LOT) about compile times, never use `unsafe`."
Just reimplement totally_safe_transmute in Zig. No need for unsafe.
-
I mean, it solves most library conflicts
Why transmute() when you can totally_safe_transmute()?
- Safe Transmute
-
Static Analyzer Rudra Found over 200 Memory Safety Issues in Rust Crates
Well, there is always the totally-safe-transmute.
-
// SAFETY: NO
They should use https://github.com/ben0x539/totally-safe-transmute
base32768
- Does anybody remember Google People
- NPM won't publish packages containing the word keygen
-
What digit bases do you like?
qntm did a fun project of using larger bases, constrained to subsets of unicode instead of ASCII like base64. It's specifically for social channels where you're constrained by the number of code points, but not bytes, so you want to maximize data per code point. base2048 is pretty impressive, and base32768 is just absurd.
-
Base58 - What Is it? Why Use It?
base32768 is ideal for storing binary data in localStorage with an efficiency of 94%.
-
A rust crate that lets you compress ASCII text to a single Unicode "character"
A similar thing is actually practical in JavaScript which mandates that all strings are UTF-16. You can cram more data into strings in memory if you use base-327168 encoding, and it serializes to equally compact JSON.
What are some alternatives?
tinyvec - Just, really the littlest Vec you could need. So smol.
base32k - binary-to-text encoding with a better encoding ratio in character-limited situations such as twitter
project-safe-transmute - Project group working on the "safe transmute" feature
ecoji - Encodes (and decodes) data as emojis
DumbIdeas
keygen-go - Keygen reference SDK for Go. Integrate license activation, automatic updates and offline licensing for Go binaries.
tamago - TamaGo - ARM/RISC-V bare metal Go
keygen-api - Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
advisory-db - Security advisory database for Rust crates published through crates.io
incubator-retired-wave - Apache Wave is now retired
UnsoundCrates - Black list of all crates that promotes unsoundness
machineid - Get the unique machine id of any host (without admin privileges)