tokmd-ffi-envelope
Stable JSON envelope parsing for tokmd bindings.
Problem
FFI callers need one deterministic way to unwrap tokmd_core::ffi::run_json responses and normalize errors.
What it gives you
EnvelopeExtractErrorparse_envelopeformat_error_messageextract_dataextract_data_from_jsonextract_data_json
API / usage notes
- Success envelopes return the
datapayload when present. - Success envelopes without
datareturn the original envelope unchanged. - Upstream failures normalize to the
[code] messageshape used by bindings. src/lib.rsis the exact contract for parsing and extraction behavior.
Go deeper
- Tutorial: tokmd README
- How-to: tokmd-core
- Reference: src/lib.rs
- Explanation: Architecture