Skip to content

Instantly share code, notes, and snippets.

@jeffs
Created July 26, 2021 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffs/62c670fdf66c46e88d6219d7c4db882a to your computer and use it in GitHub Desktop.
Save jeffs/62c670fdf66c46e88d6219d7c4db882a to your computer and use it in GitHub Desktop.
nested-type-alignment-rs-crepr-run
$ cargo run
Rust struct with C-like layout:
offset of a: 0 bytes
offset of b: 4 bytes
offset of c: 8 bytes
offset of d: 12 bytes
total size: 16 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment