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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* Copyright 2026 The Ethos maintainers
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//! # ethos-core
//!
//! The Ethos product contract in Rust: canonical document model, deterministic
//! serialization (c14n v1), fingerprints, stable error/warning codes, page-range
//! configuration, and the trait boundaries between crates.
//!
//! Normative references: `schemas/*.json` and `docs/determinism-contract.md`.
//! Contract changes happen only via `contract-change` PRs with version bumps.
//!
//! ## Feature layers (invariant 4: verify portability)
//!
//! - `grounding` — the [`grounding::GroundingSource`] trait module alone. `ethos-verify`
//! depends on `ethos-core` with `default-features = false, features = ["grounding", "verify-types"]`
//! and therefore can never see parser internals. CI builds it that way to prove it.
//! - `verify-types` — verification report/config schema types + stable warning codes.
//! - `full` (default) — canonical model, c14n, fingerprints, geometry, config, traits.
/// Canonical schema version emitted by this crate (all five schemas move in lockstep).
pub const SCHEMA_VERSION: &str = "1.0.0";
/// The deterministic profile this crate is built to honor.
pub const PROFILE_ID: &str = "ethos-deterministic-v1";
/// c14n algorithm version implemented by [`c14n`] (when the `full` feature is on).
pub const C14N_VERSION: &str = "c14n-v1";
/// ID scheme version implemented by [`ids`] (when the `full` feature is on).
pub const ID_SCHEME_VERSION: &str = "ids-v1";