planck-noalloc 0.1.1

Stack-allocated, no-std collections (ArrayVec, RingBuf)
Documentation
  • Coverage
  • 100%
    113 out of 113 items documented23 out of 111 items with examples
  • Size
  • Source code size: 103.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 13.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hxyulin

planck-noalloc

Stack-allocated, no_std collections for Rust.

Provides fixed-size alternatives to heap-allocated data structures, useful in embedded systems, kernels, interrupt handlers, or anywhere heap allocation is unavailable.

Collections

  • ArrayVec<T, N> — Fixed-capacity vector backed by a stack array
  • RingBuf<T, N> — Fixed-capacity circular buffer for FIFO operations

Usage

[dependencies]
planck-noalloc = "0.1"
use planck_noalloc::vec::ArrayVec;

let mut vec = ArrayVec::<i32, 5>::new();
vec.push(1);
vec.push(2);
assert_eq!(vec.len(), 2);
use planck_noalloc::ringbuf::RingBuf;

let mut buf = RingBuf::<u8, 8>::new();
buf.push(1);
buf.push(2);
assert_eq!(buf.pop(), Some(1));

Features

Feature Default Description
std Yes Enables Error trait implementations

To use in a no_std environment:

[dependencies]
planck-noalloc = { version = "0.1", default-features = false }

License

MIT