tabnas-dmog
The Rust build of dmog, a command that translates a document from
one data format into another as it reads it, and runs programs in the
alchemy language over JSON
documents. It reads and writes 22 formats, among them CSV, JSON, TOML,
XML, YAML, and the grammar notations ABNF, EBNF, and GBNF. The crate is
also a library, which does the same for a Rust program.
The documentation is at dmog.tabnas.dev: a tutorial, how-to guides, the reference, and explanation.
Install
You need Rust 1.85 or later:
Use
Translate a YAML file to TOML:
Run an alchemy program over a JSON document:
Every command and option is in the command-line reference. The TypeScript, Go, and Rust builds take the same command line and are released together, at one version.
Use as a library
Add the crate to a project with cargo add tabnas-dmog. Its library is
tabnas_dmog, and a document held in a string translates in one call:
use ;
Use the Rust library shows how to stream a file, run a program, read a failure, and stop a run. The API is on docs.rs, and it may change in any release before 1.0.
Licence
MIT. The source is at github.com/tabnas/dmog.