# 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
```toml
[dependencies]
planck-noalloc = "0.1"
```
```rust
use planck_noalloc::vec::ArrayVec;
let mut vec = ArrayVec::<i32, 5>::new();
vec.push(1);
vec.push(2);
assert_eq!(vec.len(), 2);
```
```rust
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
| `std` | Yes | Enables `Error` trait implementations |
To use in a `no_std` environment:
```toml
[dependencies]
planck-noalloc = { version = "0.1", default-features = false }
```
## License
MIT