Boxroot, fast movable GC roots for a better FFI
summary
Boxroot is a C library that implements a caller-roots protocol and an allocator for one-word roots, used already by several OCaml–Rust bindings. It chooses root memory layout, provides per-domain data structures for OCaml 5, and manages pools of ~2000 roots with a concurrent allocator that is cache‑local and fast to scan. Microbenchmarks (single‑threaded) show it is much faster than OCaml’s generational global roots and matches or outperforms local roots, with low overhead for thread safety.
AI-written summary · about
