Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ffi-protobuf-boundary"
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?
Summary
Implements issues #6 and #11 as a single pass — FFI C ABI built directly with Protobuf, skipping the intermediate JSON FFI step.
proto/planner.proto— source of truth for the FFI contract (SystemState,Plan,PlanStep,PlanError,PlanResultoneof)Planner.Proto— encode/decode between native Haskell types and proto-lens generated types;IR.Actionfields embedded as JSON bytes (frogos-ir owns those instances)Planner.FFI—hs_planner_init,hs_plan,hs_plan_freeforeign exports compiled aslibplanner-ffi.soviaforeign-library native-sharedSystemStateandPlanlose manual version fields; versioning moves to proto field numberingToJSON/FromJSONinstances removed fromPlanner.Types; JSON golden tests replaced with proto round-trip testsC ABI (for Rust
extern "C")Input: IR document as JSON bytes (from frogos-ir) +
SystemStateas proto bytes.Output:
PlanResultas proto bytes (caller copies, then callshs_plan_free).Test plan
cabal test— 19 tests pass (proto round-trips + all existing Core tests)cabal build planner-ffi—libplanner-ffi.so.0links cleanlynm -D libplanner-ffi.so | grep hs_plan— all three symbols exported withT