Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / pdf / src / main / rust / Cargo.toml
Cargo.toml58 lines · 2.7 KiBRaw
| 1 | [package] |
| 2 | name = "pdf_render" |
| 3 | version = "0.1.0" |
| 4 | edition = "2021" |
| 5 | description = "Memory-safe PDF content-stream interpreter (lopdf) for the 'Open PDF (safe)' viewer, exposed to Kotlin via JNI" |
| 6 | license = "GPL-2.0-only" |
| 7 | |
| 8 | [lib] |
| 9 | name = "pdf_render" |
| 10 | crate-type = ["cdylib"] |
| 11 | |
| 12 | [dependencies] |
| 13 | # Root catalog pins single version per crate (see /Cargo.toml) |
| 14 | # armv8-only: aarch64-linux-android target, no windows/wasm deps in normal edges. |
| 15 | # lopdf default includes chrono->windows-link + jiff + time + rayon – not needed for core filter/crypto/image extraction path we use in safe viewer. |
| 16 | # Trim default to only serde (still safe for XObject parsing). Date fields fallback to None if feature disabled. |
| 17 | lopdf = { workspace = true, default-features = false, features = ["serde"] } |
| 18 | ttf-parser = { workspace = true, default-features = false, features = ["std", "glyph-names"] } |
| 19 | jni.workspace = true |
| 20 | jpeg-decoder.workspace = true |
| 21 | fax.workspace = true |
| 22 | flate2.workspace = true |
| 23 | hayro-jbig2 = { workspace = true, default-features = false, features = ["std"] } |
| 24 | |
| 25 | openjp2.workspace = true |
| 26 | md-5.workspace = true |
| 27 | aes.workspace = true |
| 28 | sha2 = { workspace = true, features = ["oid"] } |
| 29 | indexmap.workspace = true |
| 30 | getrandom.workspace = true |
| 31 | |
| 32 | # Signing (features preserved per no-feature-loss) |
| 33 | # PDF signature *creation* removed as a feature – dropped rsa/cms/x509-cert/spki/const-oid |
| 34 | # (and their num-bigint-dig/pkcs1/pkcs8/signature/sha1/spin/lazy_static/num-iter subtree). |
| 35 | # der + rand stay: der is used pervasively for ASN.1 (fonts/filters/decrypt), rand is used |
| 36 | # by decrypt.rs (OsRng) for encryption. const-oid still comes in transitively via der. |
| 37 | rand.workspace = true |
| 38 | rand_core.workspace = true |
| 39 | der.workspace = true |
| 40 | |
| 41 | [dev-dependencies] |
| 42 | # Independent reference renderer for `reference_diff_tests.rs`. TEST-ONLY. |
| 43 | # |
| 44 | # Every other test in this crate is self-referential: it asserts the renderer |
| 45 | # does what this team decided it should do, so a clause misread the same way by |
| 46 | # the implementer and by the reviewers passes every test. `hayro` is a second, |
| 47 | # unrelated implementation of the same spec (pure Rust, CPU-only via vello_cpu, |
| 48 | # `#![forbid(unsafe_code)]`, Apache-2.0 OR MIT — the MIT arm is compatible with |
| 49 | # this crate's GPL-2.0-only, and a dev-dependency is not distributed anyway). |
| 50 | # |
| 51 | # It CANNOT reach the shipped cdylib: cargo only builds dev-dependencies for |
| 52 | # test/bench/example targets, never for `--lib`. Verified with |
| 53 | # cargo tree -p pdf_render --edges normal --target aarch64-linux-android |
| 54 | # which does not mention hayro. See the module header of |
| 55 | # `src/reference_diff_tests.rs` for the full argument and the caveat that |
| 56 | # `hayro-jbig2` is a SHARED component (also a normal dependency above), so JBIG2 |
| 57 | # is deliberately outside the differential corpus. |
| 58 | hayro.workspace = true |