You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description = "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."
`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.
10
10
11
11
## Usage
12
+
12
13
To use `raw_struct`, simply define a struct with the raw_struct attribute as following:
14
+
13
15
```rust
14
16
#[raw_struct(size = 0x10)]
15
17
structMyStruct {
@@ -25,10 +27,11 @@ struct MyStruct {
25
27
```
26
28
27
29
To reference the declared struct in memory you can ether do so by `Reference` or `Copy`:
0 commit comments