About
This library can be used to automatically derive the MIR layout from a rust type.
Currently, structs and enums are supported, unions are still work in progress.
Since EDL usually interfaces with Rust code that is compiled with the very same rustc version as the EDL compiler
itself, this derive macro does not require the data structs to be #[repr(C)].
However, since there is currently no stable way to figure out where the Rust compiler places the discriminator in an
enum type, enums must be #[repr(u8)] if they are to be used with MirLayout.
Examples
For all of the following examples, the data layout can be printed out using
use Arc;
use ;
use MirLayout;
Example struct
Example enum