Crates.io | cuneiform |
lib.rs | cuneiform |
version | 0.1.1 |
source | src |
created_at | 2019-12-27 21:29:56.595263 |
updated_at | 2020-02-22 22:58:54.42038 |
description | Cache optimizations for Rust, revived from the slabs of Sumer. |
homepage | https://github.com/vertexclique/cuneiform |
repository | https://github.com/vertexclique/cuneiform |
max_upload_size | |
id | 192767 |
size | 27,292 |
This crate provides proc macro attributes to improve in memory data access times.
Cuneiform's main macro can take various arguments at attribute position:
hermetic = true|false
(default is true
when #[cuneiform]
)
slab
s.slab = "board_or_architecture_name
(e.g. #[cuneiform(slab = "powerpc_mpc8xx")]
)
force = u8
(e.g. #[cuneiform(force = 16)]
)
[dependencies]
cuneiform = "0.1"
Basic usage can be:
// Defaults to `hermetic = true`
#[cuneiform]
pub struct Varying {
data: u8,
data_2: u16,
}
Targeting specific architecture:
#[cuneiform(slab = "powerpc_mpc8xx")]
pub struct SlabBased {
data: u8,
data_2: u16,
}
Overriding the default cache alignment:
#[cuneiform(force = 16)]
pub struct Forced {
data: u8,
data_2: u16,
}
Check out cuneiform-fields for field level optimizations.
#![no_std]
. Ease your pain for cache optimizations. With allocator you can compile on the board too.