16 ms·
This sounds really interesting (and also eerily similar to haskell's Coercible and roles), is there any material on the matter somewhere? I'd love to see what s
by shirogane86x 4y ago
This sounds really interesting (and also eerily similar to haskell's Coercible and roles), is there any material on the matter somewhere? I'd love to see what solution they're thinking of working towards, seeing as this is a pain point that I encounter somewhat frequently.
- burntsushi 4y agoRFC PR: https://github.com/rust-lang/rfcs/pull/2981 https://github.com/rust-lang/rfcs/pull/2981 RFC text: https://github.com/jswrenn/rfcs/blob/safer-transmute/text/0000-safer-transmute.md https://github.com/jswrenn/rfcs/blob/safer-transmute/text/00... I don't know what the status quo is, but it is very exciting work. There are also crates in this domain that work today. The two I'm aware of are https://docs.rs/zerocopy/latest/zerocopy/ https://docs.rs/zerocopy/latest/zerocopy/ and https://docs.rs/bytemuck/latest/bytemuck/ https://docs.rs/bytemuck/latest/bytemuck/