Files
faunosteo/crates/core/Cargo.toml
T

101 lines
2.5 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"]
[dependencies]
serde.workspace = true
serde_json.workspace = true
url.workspace = true
roxmltree.workspace = true
ts-rs = { workspace = true, optional = true }
miniz_oxide = { workspace = true, optional = true }
[[bin]]
name = "report-compare"
path = "src/bin/report_compare.rs"
required-features = ["cli"]
[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