1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # verit — Exavian Veritate
//!
//! The **public umbrella crate**. One serialization format that is all three
//! things at once — **zero-copy**, **self-describing**, and
//! **schema-evolvable** — with no `unsafe`, an opt-in amplification-DoS budget,
//! and one wire spec implemented byte-for-byte across six independent
//! implementations (Rust, Python, C++, Go, TypeScript, and a GnuCOBOL port).
//!
//! Consumers depend only on `verit`. Everything real lives in the internal
//! [`verit_core`] engine; this crate is the single public seam that re-exports
//! it, so the engine can be split or rewritten from one edit point. The
//! internal crates (`verit-core`, `verit-cli`) must never be imported directly.
//!
//! ```
//! use verit::prelude::*;
//!
//! let schema = SchemaBuilder::new()
//! .add_struct("Point", vec![(1, "x", Dt::F64), (2, "y", Dt::F64)])
//! .build("Point")?;
//! let bytes = encode(&schema, &Value::Struct(vec![
//! (1, Value::F64(1.5)), (2, Value::F64(-0.5)),
//! ]), SchemaMode::Inline)?;
//! assert_eq!(dump_json(&bytes)?, r#"{"x":1.5,"y":-0.5}"#);
//! # Ok::<(), verit::Error>(())
//! ```
//!
//! The wire format is specified in `docs/Architecture/VERIT - Wire
//! Specification.md`; the crate map is in `VERIT - System Architecture.md`.
// No `unsafe` anywhere — compiler-enforced, matching the engine it re-exports.
// The whole public surface of the engine — types, functions, and the `codegen`
// / `wire` modules that generated readers compile against — flows through here.
pub use *;
/// `#[derive(Verit)]` — generate a schema, encoder, and decoder from a plain
/// Rust struct (the peer of Python's `@verit`). Available with the `derive`
/// feature: `verit = { version = "…", features = ["derive"] }`. See
/// [`VeritType`] for what it generates.
pub use Verit;
/// The crate version string, from `Cargo.toml`.
pub const VERSION: &str = env!;