Files
faunosteo/crates/core/Cargo.toml
T
bchanot 3b9a395d43 feat(domain): R5.6 prepared, fingerprint convention and registry inert, switch patch
canonical_json (RFC 8785), sheet_fingerprint behind feature fingerprint,
TRUSTED_ALIASES (one equine pair), equivalence and check_declared; tests against
the RFC vectors, the V8 numbers, an independent Node reference and the archives.
No consumer wired: the switch is a rehearsed patch under .claude/tasks/plans.
2026-10-24 14:36:01 +02:00

161 lines
4.2 KiB
TOML

[package]
name = "faunosteo-core"
description = "Faunosteo core: data contracts, rules and parsers shared by the browser (wasm), the worker and the tools"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
publish.workspace = true
[lib]
path = "src/lib.rs"
[features]
default = []
# Exports the TypeScript types of the contracts (ts-rs) on `cargo test -p faunosteo-core --features ts`.
ts = ["dep:ts-rs"]
# The PDF reader (R4, plan §B.1.2): byte scan, inflation, attachment probe, import. The wasm
# facade enables it; the worker never does.
pdf-read = ["dep:miniz_oxide"]
# The PDF writer (R4, plan §B.1.3): layout to a draw log (R4.4), the serialiser (R4.5).
pdf-write = ["pdf-read"]
# The archive check tool (R4.7, plan §B.1.7): `pdf::compare` and the `report-compare` binary,
# the one file of the crate that reads the file system. Never enabled by the wasm facade.
cli = ["pdf-read", "pdf-write"]
# The anatomical pipeline (R5): legacy importer, curation, generated files and their
# formatting, the `import-equine` tool. Never enabled by the wasm facade or the worker.
curation = ["fingerprint", "dep:icu_normalizer"]
# The sheet fingerprint `sha256-rfc8785-validated-v1` (R5.6, prepared, not active): the hashing
# half of `domain::sheet::fingerprint`; the registry and the comparison compile without it.
fingerprint = ["dep:sha2"]
# The sheet-asset upload tool (R5.5): the `upload-sheet-assets` binary, a local-stack operator
# tool. The rules are in `curation::upload`; only the binary reaches the network.
upload = ["curation", "dep:ureq"]
[dependencies]
serde.workspace = true
serde_json.workspace = true
url.workspace = true
roxmltree.workspace = true
zmij.workspace = true
ts-rs = { workspace = true, optional = true }
miniz_oxide = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
icu_normalizer = { workspace = true, optional = true }
ureq = { workspace = true, optional = true }
[[bin]]
name = "report-compare"
path = "src/bin/report_compare.rs"
required-features = ["cli"]
[[bin]]
name = "import-equine"
path = "src/bin/import_equine.rs"
required-features = ["curation"]
[[bin]]
name = "upload-sheet-assets"
path = "src/bin/upload_sheet_assets/main.rs"
required-features = ["upload"]
[dev-dependencies]
# Reads the PDFs the tests compare (the R3 fixtures and the R4 output): objects, streams,
# annotations; never in the library.
lopdf = { version = "0.45.0", default-features = false }
# Digests of the frozen R4 oracles (bytes and JSON texts the TypeScript recorded as sha256).
sha2.workspace = true
# The R4 reader suites compile only with the feature (cargo skips them otherwise).
[[test]]
name = "pdf_scan"
required-features = ["pdf-read"]
[[test]]
name = "pdf_inflate"
required-features = ["pdf-read"]
[[test]]
name = "pdf_json_js"
required-features = ["pdf-read"]
[[test]]
name = "pdf_import"
required-features = ["pdf-read"]
[[test]]
name = "pdf_budget"
required-features = ["pdf-read"]
[[test]]
name = "pdf_robustness"
required-features = ["pdf-read"]
[[test]]
name = "pdf_text"
required-features = ["pdf-write"]
[[test]]
name = "pdf_layout"
required-features = ["pdf-write"]
[[test]]
name = "pdf_content"
required-features = ["pdf-read", "pdf-write"]
[[test]]
name = "pdf_png"
required-features = ["pdf-read", "pdf-write"]
[[test]]
name = "pdf_serialize"
required-features = ["pdf-read", "pdf-write"]
[[test]]
name = "pdf_session"
required-features = ["pdf-read", "pdf-write"]
[[test]]
name = "pdf_compare"
required-features = ["cli"]
[lints]
workspace = true
# The pipeline suites (R5) compile only with the feature.
[[test]]
name = "curation_format"
required-features = ["curation"]
[[test]]
name = "curation_legacy"
required-features = ["curation"]
[[test]]
name = "curation_draft"
required-features = ["curation"]
[[test]]
name = "curation_review"
required-features = ["curation"]
[[test]]
name = "curation_markdown"
required-features = ["curation"]
[[test]]
name = "curation_caps"
required-features = ["curation"]
[[test]]
name = "curation_upload"
required-features = ["curation"]
[[test]]
name = "upload_tool"
required-features = ["upload"]
[[test]]
name = "sheet_fingerprint"
required-features = ["fingerprint", "pdf-read"]