Files
craft-libs/crates/pdf/Cargo.toml
T
aiongg ac3dfd1f53 Merge storytold main into next (17 Nov sync)
storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.

- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
2026-11-17 12:44:52 +00:00

86 lines
3.3 KiB
TOML

[package]
autotests = false
name = "craft-pdf"
description = "Shared PDF reading, rendering and optional writing for Craft apps"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
[lints]
workspace = true
[features]
default = []
read = ["dep:hayro-syntax", "dep:thiserror"]
interpret = ["read", "dep:hayro-interpret"]
paths = ["interpret", "dep:kurbo"]
raster = ["interpret", "dep:hayro", "dep:bytemuck"]
write = ["dep:krilla", "dep:thiserror"]
write-svg = ["write", "dep:craft-svg", "dep:krilla-svg", "dep:usvg", "craft-svg/tree-text"]
write-pdf = ["write", "krilla/pdf"]
write-raster = ["dep:flate2", "dep:roxmltree"]
write-simple-text = ["write", "krilla/simple-text"]
filters = ["dep:craft-stream-codecs", "dep:flate2", "dep:thiserror"]
cos = ["crypt", "filters", "dep:chrono", "dep:js-sys", "dep:wasm-bindgen"]
# Content streams on the object layer (`cos::content`); inline images end where hayro-syntax's
# tokenizer ends them.
content = ["cos", "dep:hayro-syntax"]
crypt = ["dep:aes", "dep:md-5", "dep:sha2", "dep:stringprep", "dep:zeroize", "dep:thiserror"]
# `testing`: a builder of small synthetic PDF files, for the tests of crates that read them.
test-support = ["cos"]
[dependencies]
hayro-syntax = { workspace = true, optional = true }
hayro-interpret = { workspace = true, optional = true }
hayro = { workspace = true, optional = true }
bytemuck = { workspace = true, optional = true }
krilla = { workspace = true, optional = true }
craft-svg = { workspace = true, optional = true }
krilla-svg = { version = "=0.8.1", optional = true }
usvg = { version = "=0.47.0", features = ["text"], optional = true }
thiserror = { workspace = true, optional = true }
serde = { workspace = true }
flate2 = { version = "1.1", default-features = false, features = ["zlib-rs"], optional = true }
roxmltree = { version = "0.21", optional = true }
# The filter chain (`filters`). flate2 with zlib-rs, the backend the chain's Flate prices were measured on.
craft-stream-codecs = { workspace = true, optional = true }
# The standard security handler (`crypt`): pure Rust, MIT OR Apache-2.0, builds for wasm.
aes = { version = "0.9", optional = true }
md-5 = { version = "0.11", optional = true }
sha2 = { version = "0.11", optional = true }
stringprep = { version = "0.1", optional = true }
zeroize = { version = "1", optional = true }
# PDF date strings in the object layer (`cos`).
chrono = { workspace = true, optional = true }
kurbo = { workspace = true, optional = true }
# On the web, a rewrite's fresh file identifier (`cos`) takes its entropy from the browser
# (`crypto.getRandomValues`); native builds compile neither.
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = { version = "0.3", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
[dev-dependencies]
serde_json = { workspace = true }
hayro-syntax = "=0.7.2"
hayro-interpret = { version = "=0.7.0", default-features = false }
hayro-cmap = "=0.1.0"
kurbo = "0.13"
ttf-parser = "=0.25.1"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
proptest = { workspace = true }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
[[example]]
name = "cos_info"
required-features = ["cos"]
[[example]]
name = "cos_protect"
required-features = ["cos"]