bootstrap: Rust crate skeleton — IR v2 deserialization + contract tests against IR fixtures #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Repo is empty. First milestone for the Planner:
Blocked-by decisions: who resolves policies (FrogOS/spec#2) shapes whether Policy lands in Planner types or gets forwarded.
Architecture correction: Planner core is written in Haskell, compiled by GHC to a native library, and
linked into the Rust supervisor via FFI. The Rust side is only a thin tokio actor wrapper so Planner
participates in the actor model (channels to Executor etc.). This reshapes the bootstrap:
instances from frogos-ir — IR stays a Haskell-internal contract. Rust passes IR as opaque bytes.
(depends on frogos-ir directly — no type duplication with DSL), plus an FFI surface module with `foreign
export ccall` wrappers (bytes in, bytes out).
crossing the FFI boundary — define them as versioned JSON like IR, with golden fixtures in this repo.
Spec's "Plan — Rust, только в памяти" needs updating: Plan is born in Haskell and crosses into Rust.
must go through spawn_blocking (FFI call may block on GC); exceptions must never escape foreign export
(catch all, return error payload); buffer ownership protocol (Haskell allocates → Rust copies → Haskell
frees, or malloc-based handoff).
(SystemState in, Plan out) in one process.
Latency note worth tracking: GC pauses inside the reconciliation hot path — likely fine for this workload,
but measure once the loop exists.