News for hackers. Stuff that matters.
Re:Optimizing Rust Struct Size by eddyb on Sunday April 16, 2017 @06:50AM (#14125285)
You can get it from debuginfo - just load your binary into any debug session (this might even work with no execution or core dump, just a blob of memory that from your program) and then you can cast char* to YourRustType* to be able to introspect it.

On top of that, on nightly you have this flag: -Z print-type-sizes -- print layout information for each type encountered

This is what the output looks like: https://github.com/rust-lang/rust/blob/13fd5e93deb41045c4de8...

There are no comments on this comment yet.