Hi! I'm the person working on project safe transmute. I'm happy to say it's very much not dead — in fact, working on safe transmutation is now my full-time job! We also have an experimental safe transmute trait landed in the compiler!
That said, at the moment, most of the experimentation is happening outside of the standard library. We're iterating on what the right API is, and scraping the defined limits of Rust's memory model. This API iteration work is happening in the zerocopy crate and relevant discussions about Rust's memory model are happening in the Unsafe Code Guidelines repo (here's a sampler).
Right now, we're sprinting on nailing down fallible transmutation and support for unsized types. Soon, I'll be shifting focus back on the compiler-supported analysis to implement support for lifetime checking and revising our safety analysis.
I want to touch on this:
I can't speak to bytemuck, but you might be pleasantly surprised by zerocopy. Our AsBytes
trait comes with a fairly sophisticated derive that statically ensures both that the type has no uninitialized bytes, and that the bytes of the type have no provenance. Using zerocopy
is way easier than implementing byte casts correctly yourself.