project-safe-transmute
Project group working on the "safe transmute" feature (by rust-lang)
totally-safe-transmute | project-safe-transmute | |
---|---|---|
17 | 7 | |
256 | 82 | |
- | - | |
0.0 | 1.6 | |
about 2 years ago | about 1 month ago | |
Rust | ||
- | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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
Posts with mentions or reviews of totally-safe-transmute.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-20.
-
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
project-safe-transmute
Posts with mentions or reviews of project-safe-transmute.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-18.
-
Hey Rustaceans! Got a question? Ask here (25/2023)!
Project "safe transmute"
-
[Media] This is kinda cool
In this case a simple From implementation or anything like that won't be different, even performance wise. For more complex cases there's project-safe-transmute, but that will still require you to annotate your structs in such a way that their layouts will be guaranteed to be compatible, which you're not currently doing.
-
Turning a slice of structs into a slice of floats without copying?
You might also be interested in the project safe transmute, which might bring safe transmutes like these to stdlib in the future.
-
Purely Functional Data Structures in Rust
That's probably a job for the safe transmute project
-
Rudra: Rust Memory Safety & Undefined Behavior Detection
One of the biggest notable examples is unsafe transmutes that could be safe. In fact there's a safe transmute working group trying to cover these cases. Just to give an example, if you have a #[repr(transparent)] newtype, it could be possible to safely transmute from a reference of an inner type to the type it wraps (for e.g. 1-tuple or 1-field structs), but doing that now presently requires unsafe.
- Deserializing Binary Data Files in Rust
-
totally-safe-transmute
Jokes aside, there is actually a work on going for making a subset of transmutes safe: https://github.com/rust-lang/project-safe-transmute
What are some alternatives?
When comparing totally-safe-transmute and project-safe-transmute you can also consider the following projects:
tinyvec - Just, really the littlest Vec you could need. So smol.
Rudra - Rust Memory Safety & Undefined Behavior Detection
DumbIdeas
advisory-db - Security advisory database for Rust crates published through crates.io
tamago - TamaGo - ARM/RISC-V bare metal Go
Rudra-PoC - Trophy case for Rudra bugs.
kaitai_struct_rust_runtime - Kaitai Struct: runtime for Rust
UnsoundCrates - Black list of all crates that promotes unsoundness
rust - Empowering everyone to build reliable and efficient software.
base32768 - Binary-to-text encoding highly optimised for UTF-16
Kaitai Struct - Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
totally-safe-transmute vs tinyvec
project-safe-transmute vs Rudra
totally-safe-transmute vs DumbIdeas
project-safe-transmute vs advisory-db
totally-safe-transmute vs tamago
project-safe-transmute vs Rudra-PoC
totally-safe-transmute vs advisory-db
project-safe-transmute vs kaitai_struct_rust_runtime
totally-safe-transmute vs UnsoundCrates
project-safe-transmute vs rust
totally-safe-transmute vs base32768
project-safe-transmute vs Kaitai Struct