sda-lib
sda-lib is the Rust library for Structured Data Algebra.
It provides a small host-facing API for parsing, validating, formatting, and evaluating standalone SDA programs over JSON values.
The library is intended for host applications that want SDA semantics without shelling out to the CLI. It keeps evaluation pure and leaves file IO, process control, and orchestration to the caller.
Install
[]
= "1"
= "1"
Example
let output = run?;
assert_eq!;
# Ok::
If you want to bind host input under a name other than input, use run_with_input_binding.
API Surface
run: evaluate an SDA program against JSON bound asinputrun_with_input_binding: evaluate against a caller-chosen binding namecheck: parse and validate source without evaluating itformat_source: emit canonical SDA formattingfrom_json/to_json: bridge between JSON and SDA values
Documentation
- Repository: https://github.com/frogfishio/axiom
- docs.rs crate docs: https://docs.rs/sda-lib
- Formal specification: https://github.com/frogfishio/axiom/blob/main/SDA/SDA_SPEC.md
- User manual: https://github.com/frogfishio/axiom/blob/main/SDA/USER_MANUAL.md
- jq guide: https://github.com/frogfishio/axiom/blob/main/SDA/FOR_JQ_USERS.md
CLI
If you want the Unix-facing tool instead of the embedded library, install the sda crate.