nigig-org/crates/apps/pdf/pdf-document/Cargo.toml

42 lines
1.6 KiB
TOML

[package]
name = "nigig-pdf-document"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "PDF document model: page tree, annotations, AcroForm, destinations. No UI dependencies."
[features]
# The OCR seam (`src/ocr.rs`: engine trait + hidden-text-layer types only, no
# engine, no new dependencies) is opt-out rather than opt-in so existing
# consumers keep building. Consumers that only need text recognition must NOT
# depend on this crate for it — the owned on-device engine lives in
# `nigig_doc_scanner` behind its `ocr` feature. Gating here documents that
# boundary and lets minimal builds skip even the seam.
default = ["ocr"]
ocr = []
[dependencies]
nigig-pdf-cos = { path = "../pdf-cos" }
# Signing and verification (ADR 0025). All RustCrypto or RustCrypto-adjacent,
# all MIT/Apache-2.0, all pure Rust — the engine crates compile no C and that
# property is what keeps the WASM and mobile targets viable.
#
# ADR 0005's rule against hand-rolled primitives applies with more force here
# than anywhere else in the codebase: a subtly wrong signature verifier
# reports "valid" for a forgery.
rsa = { version = "0.9", features = ["sha2"] }
ed25519-dalek = "2"
p256 = { version = "0.13", features = ["ecdsa"] }
x509-cert = "0.2"
cms = "0.2"
der = { version = "0.7", features = ["oid"] }
sha1 = "0.10"
sha2 = "0.10"
getrandom = "0.2"
[dev-dependencies]
# The test fixtures generate real keys and certificates rather than
# loading a blob nobody can regenerate.
rsa = { version = "0.9", features = ["sha2"] }
nigig-pdf-graphics = { path = "../pdf-graphics" }