Files
faunosteo/crates/core/Cargo.toml
T

133 lines
3.3 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 = ["dep:sha2", "dep:icu_normalizer"]
[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 }
[[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"]
[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"]