memmap3-macros
Procedural macros for the memmap3 crate.
⚠️ Note for Users
You should not install this crate directly. This crate contains the procedural macros used by
memmap3 and is automatically included when you add memmap3 to your dependencies.
Installation
Add memmap3 to your Cargo.toml (not this crate):
[]
= "0.1"
What This Crate Provides
This crate implements the #[mmap_struct] attribute macro that transforms regular Rust structs into
memory-mappable types:
use *;
// <- This macro is provided by memmap3-macros
The macro automatically:
- Adds
#[repr(C)]for predictable memory layout - Transforms atomic fields (e.g.,
u64with#[mmap(atomic)]becomesMmapAtomicU64) - Auto-detects byte arrays as strings (unless marked with
#[mmap(raw)]) - Generates the
StructLayouttrait implementation
Documentation
For complete documentation and examples, see the main memmap3 crate.
License
This project is licensed under the MIT OR Apache-2.0 license.