| Crates.io | memmap3-macros |
| lib.rs | memmap3-macros |
| version | 0.1.0 |
| created_at | 2025-09-27 20:55:10.098917+00 |
| updated_at | 2025-09-27 20:55:10.098917+00 |
| description | Procedural macros for memmap3 |
| homepage | |
| repository | https://gitlab.com/deepbrainspace/memmap3 |
| max_upload_size | |
| id | 1857682 |
| size | 49,085 |
Procedural macros for the memmap3 crate.
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.
Add memmap3 to your Cargo.toml (not this crate):
[dependencies]
memmap3 = "0.1"
This crate implements the #[mmap_struct] attribute macro that transforms regular Rust structs into
memory-mappable types:
use memmap3::prelude::*;
#[mmap_struct] // <- This macro is provided by memmap3-macros
struct Config {
#[mmap(atomic)]
counter: u64,
name: [u8; 32],
}
The macro automatically:
#[repr(C)] for predictable memory layoutu64 with #[mmap(atomic)] becomes MmapAtomicU64)#[mmap(raw)])StructLayout trait implementationFor complete documentation and examples, see the main memmap3 crate.
This project is licensed under the MIT OR Apache-2.0 license.