memoffset
memoffset copied to clipboard
offsetof for Rust
I know it's hard/impossible right now, but are you tracking the ongoing `const_fn` changes to ensure that `offset_of!` can be used in constants at some point? It's usually very useful...
This doesn't work with memoffset: ```Rust struct Foo { bar: f32, baz: [f32], } offset_of!(Foo, bar); ``` Even though this (unsound) code works: ```Rust struct Foo { bar: f32, baz:...
offset_of! (and probably the other macros in this crate) consumes too much stack space in dev build, especially when the type is big. It's probably because it's declaring a (uninitialized)...
Previously on memoffset: - https://github.com/Gilnaa/memoffset/issues/4 Constant evaluation mostly stable with the exception of the inability to take address of a Cell in `const` which still requires nightly and [`#![feature(const_refs_to_cell)]`](https://github.com/rust-lang/rust/issues/80384).