Phase 1 — Rust Resource Manager + cxx Bridge
Status: complete (2026-05-24). MVP issues #13–#20 closed; KPU pieces #21–#23 deferred behind the
phase-soc-deferredlabel.
Phase 1 delivered a SITL-only Rust Resource Manager exposing a strictly typed memory-allocation surface to C++ via the cxx bridge, plus a lifecycle state machine.
What a C++ program can do after Phase 1
Section titled “What a C++ program can do after Phase 1”- Call into Rust to request a zero-copy buffer of arbitrary size and alignment.
- Lock the buffer to obtain a raw pointer +
TensorMetadata, write into it, and have the bytes be visible from the Rust side after release. - Walk an operator through
Unconfigured → Inactive → Active → Teardown, with invalid transitions returning typed errors — never a panic.
The pieces
Section titled “The pieces”MemoryProvidertrait — the object-safe allocate/release/lock surface.SitlMemoryProvider(POSIX shm +mmap, heap fallback) andKpuMemoryProvider(a stub returningErr(NotYetImplemented)). Both compile in; the active one is chosen at construction fromRUST_HAL_TARGET.BufferHandle— an opaque#[repr(transparent)] u64with a private inner field, so external callers can’t fabricate handles.- The cxx bridge —
core/src/lib.rs,#[cxx::bridge(namespace = "branes::core")], headers generated bybuild.rs;TensorMetadatacrossesrepr(C)as pointer + shape, wrapped instd::spanon the C++ side without copying. - Lifecycle state machine — the managed configure/activate/teardown flow that the
C++
VioEstimatorlater mirrors.
See Resource Manager for the architectural detail.
Quality
Section titled “Quality”The Rust core is gated at ≥85% line coverage (cargo-llvm-cov) and verified by a C++/Rust integration test exercising the bridge end-to-end. This phase unblocked the math (Phase 2) and VIO (Phase 3) work above it.
Deferred (KPU hardware track)
Section titled “Deferred (KPU hardware track)”The IPC broker over UDS + POSIX shm (#21), crash-only recovery / client replay (#22), and the KPU resource-allocation arbiter (#23) are parked until the silicon path is active.
Companion: docs/arch/phase1-design/README.md, docs/sessions/2026-05-24-phase-1-mvp-complete.md.