raw_struct

raw_struct
is a Rust procedural macro for easily declaring C-style structs that reference local or external memory, based on your memory implementation. It generates appropiate getter methods for easy access. This crate has support for no_std
environments.
Usage
To use raw_struct
, simply define a struct with the raw_struct attribute as following:
To reference the declared struct in memory you can ether do so by Reference
or Copy
:
let memory = ;
Examples
Examples can be found within the examples directory of this repository. These examples demonstrate how to use raw_struct in various contexts.
To run the examples, clone the repository and use the following command: