Skip to main content

omnist/
lib.rs

1//! # omnist
2//!
3//! Rust implementation of the Omnist data-interchange specification.
4//!
5//! Omnist provides a single canonical, lossless data model ([`document::Doc`])
6//! across five supported formats (JSON, YAML, TOML, XML, and OML), paired with an
7//! algebraic schema language (OSD, [`schema::Schema`]) for schema validation,
8//! type inference, normalization, subschema extraction, and compatibility checking.
9//!
10//! Treat the vendored `omnist-spec` specification as the normative source of
11//! truth for all data model rules, format mappings, and schema algebra.
12
13#![deny(missing_docs)]
14#![warn(rustdoc::all)]
15
16pub(crate) mod bom;
17pub mod document;
18pub mod error;
19pub mod formats;
20pub mod infer;
21pub mod limits;
22pub mod materialize;
23pub mod oml;
24pub mod ops;
25pub mod osd;
26pub mod registry;
27pub mod report;
28pub mod schema;
29
30pub use error::{
31    DocumentError, FormatError, MaterializeError, OmnistError, ParseError, SchemaError, WriteError,
32};
33pub use infer::{AnyFallback, infer, infer_with_report};
34pub use materialize::materialize;
35pub use registry::{Format, formats, get_format, register_format};
36pub use report::{Adjustment, Severity, WriteReport};
37
38/// The version of the `omnist` crate, matching Cargo.toml.
39pub const VERSION: &str = env!("CARGO_PKG_VERSION");
40
41#[cfg(test)]
42mod tests;