schema/lib.rs
1#![doc = include_str!("../README.md")]
2// `serde_json` / `serde_yaml` are dev-dependencies used only by the
3// `schema_drift` integration test; allow them to look unused in the lib's own
4// test build (see `tests/schema_drift.rs`).
5#![cfg_attr(test, allow(unused_crate_dependencies))]
6
7mod compiled;
8mod deployment;
9mod loader;
10
11pub use compiled::{
12 CompileError, Compiled, FORMAT_VERSION, compile, from_bytes, load_compiled, to_bytes, write,
13};
14pub use deployment::{Config, Index, ServerConfig, Sink, Source};
15pub use loader::{LoadError, load};
16
17// Re-export the canonical schema vocabulary so downstream crates depend only on
18// `schema` rather than reaching into the sub-crates directly. The assembled
19// `Config` family (above) lives in this crate; everything else — the
20// identifiers, `IndexSchema`, `IndexMapping`, `FailurePolicy`, the per-sink
21// configs — is the cross-cutting vocabulary from `schema-core`.
22pub use schema_core::*;
23
24pub use schema_config_toml::CONFIG_SCHEMA;
25pub use schema_index_yaml::INDEX_SCHEMA;