Expand description
C ABI for the JSON command bridge — the entire mobile-facing surface.
Three symbols. Ownership rules (also documented in the shipped header):
- The caller owns the input buffer; the engine never retains it past the call.
- Every pointer returned by
ballistics_bridge_call/ballistics_bridge_call_nis heap-allocated by the engine and must be released exactly once withballistics_bridge_free. Freeing NULL is a no-op. - The calls NEVER return NULL: every failure mode — invalid UTF-8, bad JSON,
unknown command, command failure, internal panic — is an in-band
{"ok":false,...}envelope. - Calls are independent and thread-safe; there is no shared mutable state.
Functions§
- ballistics_
bridge_ ⚠call - Process one bridge request (NUL-terminated UTF-8 JSON envelope).
- ballistics_
bridge_ ⚠call_ n - Length-explicit variant for callers whose buffers are not NUL-terminated.
- ballistics_
bridge_ ⚠free - Release a response produced by the bridge calls. NULL is a no-op.