[package]
name = "ethos-doc-core"
description = "Ethos canonical document model, IDs, errors, schema types, traits, c14n and fingerprints"
readme = "README.md"
keywords = ["ethos", "documents", "evidence"]
include = [
    "Cargo.toml",
    "README.md",
    "NOTICE.md",
    "src/**",
]
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true

[lib]
name = "ethos_core"

[package.metadata.ethos_publication]
reserved_crates_io_name = "ethos-doc-core"
reserved_crates_io_version = "0.0.0-reserved.0"
publication_status = "approved_for_crates_io_publication"

[features]
default = ["full"]
# `grounding` is the ONLY feature ethos-verify may depend on (invariant 4): the
# GroundingSource trait module with zero parser-internal types.
grounding = []
# Verification report/config schema types + stable warning codes (still parser-internal-free).
verify-types = ["grounding"]
# Everything stable: canonical model, c14n, fingerprints, geometry, config,
# backend/layout traits. Source-only crop descriptors require `crop-element`.
full = ["verify-types", "dep:serde_json", "dep:sha2", "dep:thiserror"]
# Source-only pre-alpha crop descriptor API. This is intentionally outside the
# default `full` feature because it is not part of the stable public crate surface.
# It depends on `full` because crop descriptors reuse canonical model, c14n,
# fingerprint, geometry, and stable error helpers.
crop-element = ["full"]

[dependencies]
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }

[dev-dependencies]
proptest = { workspace = true }
serde_json = { workspace = true }
