Version 0.2.0
This minor release adds support for previously unsupported platforms! Thanks @alistair23!
The problem
Previously one could not compile for platforms like an ARM Cortex-M0 (thumbv6m-none-eabi
), because this platform (among a few others) does not include a required atomic instruction. Therefore the code did not compile:
PR #32 adds support for this platforms with the caveats described in the spin
-crate. One has to enable the new cargo
-feature portable_atomic
and also specify a signal, how the portable_atomic
-crate should emulate the missing instructions. On single-core-systems one can pass a specific cfg
(please consult the documentation of both spin
and portable_atomic
beforehand to prevent unsoundness):
Update procedure
To update the crate, simply run (if you already depend on it):
$ cargo update -p emballoc
If you want to use this as a new dependency in your Rust project, just add the following snippet to your Cargo.toml
[dependencies]
emballoc = "0.2.0"
and register the emballoc::Allocator
as the global allocator:
#[global_allocator]
static ALLOCATOR: emballoc::Allocator<4096> = emballoc::Allocator::new();