arena-lib 0.1.0

Typed memory arena and slab allocator library. Generational indices, typed arenas (one allocation per type), interned strings, and bump allocation. Zero unsafe leakage into user code.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 80.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 240.11 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • jamesgober/arena-lib
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jamesgober

Why arena-lib

Allocator-aware Rust normally means juggling three or four crates: one for slab storage, one for handle stability, one for string interning, plus a bump arena for short-lived scratch. arena-lib collects those primitives behind a single, safe, REPS-disciplined surface so you can move fast without paying for it later.

Designed around four guarantees:

  • Typed arenas — one backing allocation per element type, predictable layout, cache-friendly traversal.
  • Generational indices — stable handles that catch use-after-free without reference counting.
  • String interning — O(1) equality and compact storage for repeated identifiers.
  • Bump allocation — short-lived scratch regions that reset in constant time.

Every public path is safe Rust. unsafe lives only in measured, documented internals — never in your call sites.

Status: Early scaffolding (v0.1.0). The public API is being designed for the 1.0 release. Today the crate compiles, exposes VERSION, and is safe to depend on for tracking — full allocator surfaces land in upcoming milestones.


Quick start

Add the crate to your Cargo.toml:

[dependencies]
arena-lib = "0.1"

Verify the dependency is wired up:

use arena_lib::VERSION;

fn main() {
    println!("running arena-lib {VERSION}");
}

The full allocator API lands in the 0.2 milestone. See docs/API.md for the live API reference.


Standards

  • REPS governs every decision. See REPS.md.
  • MSRV: Rust 1.85.
  • Edition: 2024.
  • Cross-platform: Linux, macOS, Windows.

License

Dual-licensed under either of:

at your option.