Struct layout and cache-line analysis for the Mantis SDK.
std-only tooling crate.
Reports size, alignment, and cache-line occupancy for hot-path data structures. Used to verify that performance-critical types have the expected memory layout (e.g., head/tail on separate cache lines).
cargo run -p mantis-layoutuse mantis_layout::inspect;
let info = inspect::<u64>("u64");
println!("{info}");
// Type: u64
// size: 8 bytes
// align: 8 bytes
// cache lines: 1 (64B)For each inspected type, prints:
- size in bytes
- alignment in bytes
- cache lines occupied (assuming 64-byte lines)