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 mod document;
17pub mod error;
18pub mod formats;
19pub mod infer;
20pub mod materialize;
21pub mod oml;
22pub mod ops;
23pub mod osd;
24pub mod registry;
25pub mod report;
26pub mod schema;
27
28pub use error::{
29 DocumentError, FormatError, MaterializeError, OmnistError, ParseError, SchemaError, WriteError,
30};
31pub use infer::{AnyFallback, infer, infer_with_report};
32pub use materialize::materialize;
33pub use registry::{Format, formats, get_format, register_format};
34pub use report::{Adjustment, Severity, WriteReport};
35
36/// The version of the `omnist` crate, matching Cargo.toml.
37pub const VERSION: &str = env!("CARGO_PKG_VERSION");
38
39#[cfg(test)]
40mod tests;