Memory layout analysis tool for rust structs, enums, unions, tuples, and references, prints to console using ansi escape codes.
Simply derive Dissectible
and call print_dissection_info
to get a well formatted overview.
```rs use structscalpel::{Dissectible, printdissection_info};
struct Person {
name: String,
age: u32,
isstudent: bool,
height: f64,
favoritenumbers: Vec
fn main() {
printdissectioninfo::
With dissect_std
you can even disect some std items, with only a few type path deviations for private types.
- String
- Option
Disclaimer: This may not work in all cases, such as where some fields are unsized or dependant on a sys (os) implementation
This also works with generics and different layout strategies