Expand description
§omnist
Rust implementation of the Omnist data-interchange specification.
Omnist provides a single canonical, lossless data model (document::Doc)
across five supported formats (JSON, YAML, TOML, XML, and OML), paired with an
algebraic schema language (OSD, schema::Schema) for schema validation,
type inference, normalization, subschema extraction, and compatibility checking.
Treat the vendored omnist-spec specification as the normative source of
truth for all data model rules, format mappings, and schema algebra.
Re-exports§
pub use error::DocumentError;pub use error::FormatError;pub use error::MaterializeError;pub use error::OmnistError;pub use error::ParseError;pub use error::SchemaError;pub use error::WriteError;pub use infer::AnyFallback;pub use infer::infer;pub use infer::infer_with_report;pub use materialize::materialize;pub use registry::Format;pub use registry::formats;pub use registry::get_format;pub use registry::register_format;pub use report::Adjustment;pub use report::Severity;pub use report::WriteReport;
Modules§
- document
- The Document model — a canonical tree of ordered, labeled edges.
- error
- Error hierarchy,
thiserror-based (per issue #1 §5). - formats
- Codecs over the canonical Document model. Ported from
~/dev/omnist/omnist/formats.py; each format’s reader parses text intocrate::document::Docand its writer projects aDocback to text. - infer
- Schema inference: draft a
recordSchemathat accepts a set of sampleDocuments. - materialize
- Schema-directed deserialization: make a freshly-read
RawNodeconform to aSchema, or report every reason it doesn’t. - oml
- OML (Omnist Markup Language) – the native codec for the Document model.
- ops
- Schema algebra:
prune,minimize/normalize,subschema,extract,lint,isomorphic,signature– ported from~/dev/omnist/omnist/ops/(issue #12), one module per op (matching the Python layout, which is already a reasonable structure per “architecture freedom”). - osd
- OSD (Omnist Schema Definition) – the text language for the
crate::schemamodel. Ported from~/dev/omnist/omnist/osd.py. - registry
- Format registry – read/write/check a
crate::document::Docby format name at runtime, plus register your own format plugins. Ported from~/dev/omnist/omnist/registry.py(issue #31; see also the TypeScript port’sregistry.tsfor the same architecture-freedom call made there). - report
- Adjustment reports for lossy writes.
- schema
- The Schema model – Record/Scalar/Ref, per
docs/design/model.md(issue #6). Ported from~/dev/omnist/omnist/schema.py.
Constants§
- VERSION
- The version of the
omnistcrate, matching Cargo.toml.