raw-buf
Base extension: mutable, indexed, bounded-size flat buffer of primitive elements (Int, Float, Bool). Implemented as kernel-tier module + Rust codegen intercepts emitting LLVM IR; no new C code. Also triggers migration of try_emit_primitive_instance_body into the plugin intercept registry — one mechanism for all intercepts.
Two consumer use cases motivate this base extension:
-
Storage layer for the
serieslibrary extension (next milestone #8) — Series wraps RawBuf to provide a bounded ring buffer with financial-style indexing for streaming analytics. -
Batch FFI crossing for the Embedding ABI (subsumes the closed #2 'Flat array/slice primitive' milestone). The Embedding-ABI M5 friction-harvest measured per-tick FFI at ~206 ns/tick at real EURUSD volume (~658 ms / 3.19 M ticks). A contiguous array/slice primitive amortises that per-tick cost via a batch crossing — RawBuf is that primitive.
Architectural anchor: design/models/kernel-extensions.md § Two-tier extension architecture. Depends on milestone #6 (kernel-extension-mechanics) for the language-level building blocks.