mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 08:52:32 +00:00
* craft-pdf: the standard security handler from PdfCraft (`crypt`) Adds the `crypt` feature: PdfCraft's pdfcraft-crypt crate (revision 2b65ab000bfe0997dec5fbed2769d3da3799355b) as craft_pdf::crypt, with its unit, integration and property tests. The code is unchanged; doc comments and test imports name the new module. It decrypts and encrypts strings and streams for revisions 2 to 6 and creates encryption dictionaries. The reader keeps its own decryptor. * craft-pdf: the crypt unit tests build for wasm The property test in src/crypt/tests.rs needs proptest, which is a dev-dependency of the non-wasm targets only. It is now compiled for those targets only; the other unit tests still build for wasm.
49 lines
1.6 KiB
TOML
49 lines
1.6 KiB
TOML
[package]
|
|
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"]
|
|
raster = ["interpret", "dep:hayro", "dep:bytemuck"]
|
|
write = ["dep:krilla", "dep:thiserror"]
|
|
write-pdf = ["write", "krilla/pdf"]
|
|
write-simple-text = ["write", "krilla/simple-text"]
|
|
crypt = ["dep:aes", "dep:md-5", "dep:sha2", "dep:stringprep", "dep:zeroize", "dep:thiserror"]
|
|
|
|
[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 }
|
|
thiserror = { 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 }
|
|
|
|
[dev-dependencies]
|
|
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"
|