From 75371d5810b66cbc100a2eac6d8f86740df13712 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:35:35 +0000 Subject: [PATCH 1/4] chore(deps): bump the rust-dependencies group across 1 directory with 8 updates Bumps the rust-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [zip](https://github.com/zip-rs/zip2) | `9.3.0` | `9.6.0` | | [hayro-syntax](https://github.com/LaurenzV/hayro) | `0.8.0` | `0.9.0` | | [hayro](https://github.com/LaurenzV/hayro) | `0.8.0` | `0.9.0` | | [ocrs](https://github.com/robertknight/ocrs) | `0.13.1` | `0.14.0` | | [rten](https://github.com/robertknight/rten) | `0.26.0` | `0.28.0` | | [mail-parser](https://github.com/stalwartlabs/mail-parser) | `0.11.9` | `1.0.1` | | [napi](https://github.com/napi-rs/napi-rs) | `3.16.1` | `3.16.2` | | [napi-derive](https://github.com/napi-rs/napi-rs) | `3.7.0` | `3.7.1` | Updates `zip` from 9.3.0 to 9.6.0 - [Release notes](https://github.com/zip-rs/zip2/releases) - [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md) - [Commits](https://github.com/zip-rs/zip2/compare/v9.3.0...v9.6.0) Updates `hayro-syntax` from 0.8.0 to 0.9.0 - [Release notes](https://github.com/LaurenzV/hayro/releases) - [Commits](https://github.com/LaurenzV/hayro/compare/hayro-syntax-v0.8.0...hayro-syntax-v0.9.0) Updates `hayro` from 0.8.0 to 0.9.0 - [Release notes](https://github.com/LaurenzV/hayro/releases) - [Commits](https://github.com/LaurenzV/hayro/compare/hayro-v0.8.0...hayro-v0.9.0) Updates `ocrs` from 0.13.1 to 0.14.0 - [Changelog](https://github.com/robertknight/ocrs/blob/main/CHANGELOG.md) - [Commits](https://github.com/robertknight/ocrs/compare/ocrs-v0.13.1...ocrs-v0.14.0) Updates `rten` from 0.26.0 to 0.28.0 - [Changelog](https://github.com/robertknight/rten/blob/main/CHANGELOG.md) - [Commits](https://github.com/robertknight/rten/compare/rten-cli-v0.26.0...rten-cli-v0.28.0) Updates `mail-parser` from 0.11.9 to 1.0.1 - [Release notes](https://github.com/stalwartlabs/mail-parser/releases) - [Changelog](https://github.com/stalwartlabs/mail-parser/blob/main/CHANGELOG.md) - [Commits](https://github.com/stalwartlabs/mail-parser/commits) Updates `napi` from 3.16.1 to 3.16.2 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-v3.16.1...napi-v3.16.2) Updates `napi-derive` from 3.7.0 to 3.7.1 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-derive-v3.7.0...napi-derive-v3.7.1) --- updated-dependencies: - dependency-name: zip dependency-version: 9.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: hayro-syntax dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: hayro dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: ocrs dependency-version: 0.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: rten dependency-version: 0.28.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: mail-parser dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: rust-dependencies - dependency-name: napi dependency-version: 3.16.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: napi-derive dependency-version: 3.7.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies ... Signed-off-by: dependabot[bot] --- Cargo.lock | 202 ++++++++++++++++++++++++++++++++++++----------------- Cargo.toml | 10 +-- 2 files changed, 143 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dd7c68..13c39b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + [[package]] name = "adler2" version = "2.0.1" @@ -412,6 +418,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "constant_time_eq" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9" +dependencies = [ + "rustversion", +] + [[package]] name = "convert_case" version = "0.12.0" @@ -547,7 +562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 3.0.9", + "syn 2.0.119", ] [[package]] @@ -633,6 +648,16 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" +[[package]] +name = "encodify" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e95d6e27686e1d6991a3077f4dbec9d33d18903466d234165ad86cd08c3ebc79" +dependencies = [ + "memchr", + "simdutf8", +] + [[package]] name = "encoding_rs" version = "0.8.44" @@ -660,7 +685,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -930,22 +955,22 @@ dependencies = [ [[package]] name = "hashify" -version = "0.2.9" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1246c0e5493286aeb2dde35b1f4eb9c4ce00e628641210a5e553fc001a1f26" +checksum = "04a037b1848eada162d6534c206770180e6bfc0eaa97292250c3e7179d8b1f73" dependencies = [ - "indexmap", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.9", ] [[package]] name = "hayro" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4675ff5acd7ca41c0c34ccd2a3a154f5c86d8b5ec92bef0a114bfb194969e2af" +checksum = "34d3977ae664ab6eea015be3024379c83c6a3580f67d51be6884f1992bf683ba" dependencies = [ + "ab_glyph_rasterizer", "bytemuck", "fearless_simd 1.2.0", "hayro-interpret", @@ -958,9 +983,9 @@ dependencies = [ [[package]] name = "hayro-ccitt" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2866f0d976e76497480b853d5e258dab6e4b89ecfe991124e08f15dfa8fd03ad" +checksum = "adbed896e99325bc312778bb9c9c289d795d51c12775c44dd5e4352f679c7e46" [[package]] name = "hayro-cmap" @@ -972,30 +997,44 @@ dependencies = [ "hayro-postscript", ] +[[package]] +name = "hayro-font" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac7f0c78172573e9bd6eeb17f62c63f4d378b2a2d127c3ee9c2c7cc6fbdf78b" +dependencies = [ + "bitflags", + "hayro-cmap", + "hayro-syntax", + "kurbo", + "phf 0.13.1", + "rustc-hash", + "siphasher", + "skrifa 0.49.0", +] + [[package]] name = "hayro-interpret" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9df074ff163a63864cec9b0bf640ccbff8abf4e44481df7369ce0ac172ffbe" +checksum = "166477622df4b770a0fc5889a9e4b48c7ff8595d6ec019bf71b4297b97b55fb6" dependencies = [ "bitflags", "hayro-cmap", + "hayro-font", "hayro-syntax", "kurbo", "moxcms", - "phf 0.13.1", "rustc-hash", "siphasher", - "skrifa 0.46.2", "smallvec", - "yoke", ] [[package]] name = "hayro-jbig2" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000e025850f4592ddcaee85640db70704151f2bafd43b6f431aa5b6a2c6a35a9" +checksum = "eb5c7f3a4eb551c2bb7fa16e268f728d4bc2a5c9b090554b8dc0ee2503fb5840" dependencies = [ "fearless_simd 1.2.0", "hayro-ccitt", @@ -1003,9 +1042,9 @@ dependencies = [ [[package]] name = "hayro-jpeg2000" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122c5f834c37a2260b9c851bb8be685cf539b2a8b94b704a931ef7d2525d5835" +checksum = "6e5e5f2b3de970707fc22fd956d8f44211602939d5e4588603afa919cb7b3740" dependencies = [ "fearless_simd 1.2.0", ] @@ -1018,9 +1057,9 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cdc818d8d265dcb42081d488f7599df4f73fb79e9d347ecedcd3c23809d2026" +checksum = "a6ced8279487b029813f6cc05399099fa34df6fa23d8f7b0d41d972c49d5b30d" dependencies = [ "flate2", "hayro-ccitt", @@ -1448,11 +1487,14 @@ checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" [[package]] name = "mail-parser" -version = "0.11.9" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec00bda90c6e645a54506c630c2820cd6b1890cfd2b0a169b50f74b2b8c7c86" +checksum = "3d4ea9311ef3ca6189aa85c5f984bd47b2f12079bcabae28917d900ab26c9ecc" dependencies = [ + "encodify", "hashify", + "memchr", + "simdutf8", ] [[package]] @@ -1653,9 +1695,9 @@ checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" [[package]] name = "napi" -version = "3.16.1" +version = "3.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907ff7366fb7182e28edd0f08ef8ac5d6b13b8d65a3c0b3a10bf3ac092437d6b" +checksum = "567c62b9c2d0fae123713f766686ad66a2c75b45ba3ee01ed8b06a7e99bc435b" dependencies = [ "bitflags", "ctor", @@ -1678,9 +1720,9 @@ checksum = "b899b545d3aa6dca985939059f258c5488d34e4ecf39c274e20009748f4b846d" [[package]] name = "napi-derive" -version = "3.7.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32eb00f92f84cf462fc328f49082b29c2a7d2eebeb1d447d19c1f9fdd9f89ee" +checksum = "94c8098ed9d61a1bbd019519c637817531b0e24023ef4b5678f2f0cbe24bed9c" dependencies = [ "convert_case", "ctor", @@ -1692,9 +1734,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "7.0.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fe28c64d8fc12e69f9b817d0febdbe7914555760f1e353106281b8ff99cc90" +checksum = "314cd6ca42bd978fd8bae84b4137e1322bbf3e83552fca8dbd7d18034188ff3a" dependencies = [ "convert_case", "proc-macro2", @@ -1757,14 +1799,14 @@ dependencies = [ [[package]] name = "ocrs" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4192a7dbc7570398ef97ab2606799703b6ea11da53f637d705d44546614435" +checksum = "1b9bb55cfe654ffee0f47641ae839dd4ba3117f47d5240378607af7cce2113fe" dependencies = [ - "anyhow", "rayon", "rten", "rten-imageproc", + "rten-sequence", "rten-tensor", "thiserror", "wasm-bindgen", @@ -2224,7 +2266,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2310,13 +2352,16 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.43.3" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005c8acf251756c478b0bf402885bfd88a1476020c4c7e6060edc1aa68da38ea" +checksum = "bdaa4fffe9ff3ca2c353fa9729792805b9b3e324695ff5a081f860612e81b330" dependencies = [ "bytemuck", + "foldhash", "font-types", "once_cell", + "smallvec", + "yoke", ] [[package]] @@ -2430,9 +2475,9 @@ dependencies = [ [[package]] name = "rten" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7741649977427aa13009537ac9a8fe1a503b0aa58784069ce8f117e47eb6ab" +checksum = "68a8eceaf794b6a9cc37c59ea921031a51f527edce05293f72e795641556ca2c" dependencies = [ "num_cpus", "rayon", @@ -2452,15 +2497,15 @@ dependencies = [ [[package]] name = "rten-base" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413dc975c7a3d0e6da0b146cd0387e3d389cceab0fc48328bfa716c7f2ae1b1e" +checksum = "718b3ecab8cc677a15a978e7a232a35c48a108f09c1c02214c6980a5f2b3e851" [[package]] name = "rten-gemm" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efc07c654d4b3f8d81e2efd8b13aea7475568395289e5bb35393411aa6a451e" +checksum = "9a5644634733c7e2568e3796085e69da9774fc461c0d6c06535bc5c10341dfb0" dependencies = [ "rayon", "rten-base", @@ -2471,34 +2516,44 @@ dependencies = [ [[package]] name = "rten-imageproc" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18726eae9614e23a400560eb3a5e3fdb06526914c31aadaf767f14afde7680dd" +checksum = "e2e56f4369df60d21e0de84f5828bbca487c651487e1a86517eb844c33d2105e" dependencies = [ "rten-tensor", ] [[package]] name = "rten-onnx" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96944374568990b8d1bbc5bae5957585866f9dd8256130460405730948bfd42e" +checksum = "2603fd142215bc58c099f02950cb836d463282a3b51ef9b83ce3d8ba86e0b801" [[package]] name = "rten-parallel" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9075b130f81df7be82496ea3a9bbf20fe9e75f106a22b0ece8700850f8f664" +checksum = "fa535561ed1dc9e878aed0ff50280d588a4f91996873978c9f64532450386e08" dependencies = [ "rayon", "rten-base", ] +[[package]] +name = "rten-sequence" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cea4f0a53a2c927ba904bd4ddc490713f886512b5819d9f77f20126db30a99d" +dependencies = [ + "rten-base", + "rten-tensor", +] + [[package]] name = "rten-shape-inference" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89289c26b6a5248fccf4d67627596848a03ed31888e6ce4ba6f666c689258122" +checksum = "47c5835450abda8a2d5a5c056ea323d8a49ee8cb069a500247ebf6ac467db84a" dependencies = [ "rten-tensor", "smallvec", @@ -2506,15 +2561,15 @@ dependencies = [ [[package]] name = "rten-simd" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f0c01294eb782adca256aa130b48a04006d03763073a68f45a9c33b982ea556" +checksum = "f844a9756ca67c6a2a808642caafd781d4ad2c4eb5d4b78e5c300b3cbb29167f" [[package]] name = "rten-tensor" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf72556ba231d7af50238d26dd264856a2149c6369694eb79b22644c8280c81b" +checksum = "2fcfdd96084216840a4be918add09f09b6a5c9532dbb8ce4ce70d99c783ab10d" dependencies = [ "rayon", "rten-base", @@ -2525,9 +2580,9 @@ dependencies = [ [[package]] name = "rten-vecmath" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1007f05160f9ea2ce4e9c67324e5bafb27ae1e5302d0c6b1ea4db0d35fed78ee" +checksum = "37594106d3db45458fabb6f62c2b23b8591b2d3dc733cf7b3aded16c1626d802" dependencies = [ "rten-base", "rten-simd", @@ -2558,7 +2613,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2615,7 +2670,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2893,12 +2948,15 @@ dependencies = [ [[package]] name = "skrifa" -version = "0.46.2" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4febebda507fb889c545a37a135517769d1391941013561292897961d1887d6" +checksum = "a7459fb60888ad9a5f367dd293fa2fb9df142cb451aa6bfd6cd66a7d6a9b739d" dependencies = [ "bytemuck", - "read-fonts 0.43.3", + "once_cell", + "read-fonts 0.46.0", + "smallvec", + "yoke", ] [[package]] @@ -3017,7 +3075,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3490,7 +3548,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3671,6 +3729,20 @@ name = "zeroize" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" @@ -3707,10 +3779,11 @@ dependencies = [ [[package]] name = "zip" -version = "9.3.0" +version = "9.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaeb7f16d2605b49aef586996ded29e65642fab7259a3077e537351df6d80426" +checksum = "63e50f7b2212e4635244be3c363b53273d159f2523eb7db3096c1d2861c1b603" dependencies = [ + "constant_time_eq", "crc32fast", "flate2", "getrandom 0.4.3", @@ -3720,6 +3793,7 @@ dependencies = [ "nix", "typed-path", "windows-sys 0.61.2", + "zeroize", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index 2473509..f123e54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,13 +55,13 @@ calamine = "0.38" # Excel/spreadsheet (XLSX/XLS/ODS) zip = { version = "9", default-features = false, features = ["deflate"] } # OOXML/ODF containers; matches calamine's zip quick-xml = "0.42" # DOCX/ODS XML parsing cfb = "0.16" # XLS (OLE2) container pre-scan -hayro-syntax = { version = "0.8", default-features = false, features = ["std"] } # PDF object/content parsing; OCR also enables image decoding -hayro = { version = "0.8", default-features = false, features = ["embed-fonts", "embed-cmaps"] } -ocrs = { version = "0.13.1", default-features = false, features = ["onnx"] } -rten = { version = "0.26", default-features = false, features = ["onnx_format"] } +hayro-syntax = { version = "0.9", default-features = false, features = ["std"] } # PDF object/content parsing; OCR also enables image decoding +hayro = { version = "0.9", default-features = false, features = ["embed-fonts", "embed-cmaps"] } +ocrs = { version = "0.14.0", default-features = false, features = ["onnx"] } +rten = { version = "0.28", default-features = false, features = ["onnx_format"] } miniz_oxide = "0.9" # Bounded FlateDecode for PDF streams pulldown-cmark = { version = "0.13", default-features = false } # Markdown input; output-safety test oracle -mail-parser = { version = "0.11", default-features = false } # EML input (RFC 5322 / MIME) +mail-parser = { version = "1.0", default-features = false } # EML input (RFC 5322 / MIME) # Logging tracing = "0.1" From a275cdc4c06edd2d6d7d25a8690dd5eed42408c4 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Wed, 25 Nov 2026 19:02:14 +0000 Subject: [PATCH 2/4] fix(deps): adapt markkit to mail-parser 1.0.1 and hayro 0.9 mail-parser 1.0: MessagePart/PartKind views replace the old field-based Message/MessagePart; AddressList::mailboxes() replaces Address::List/Group; decoded_checked() reports transfer-decoding problems that 0.11 recorded as is_encoding_problem; decoded_len() replaces len(). hayro 0.9: InterpreterSettings.render_annotations is replaced by render_content; RenderSettings gained fields, so build it with ..Default::default(). Annotations stay off (RenderContent::PAGE). --- crates/markkit/src/eml.rs | 61 ++++++++++++++++------------------- crates/markkit/src/pdf/ocr.rs | 4 ++- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/crates/markkit/src/eml.rs b/crates/markkit/src/eml.rs index 0232276..6ebea87 100644 --- a/crates/markkit/src/eml.rs +++ b/crates/markkit/src/eml.rs @@ -1,7 +1,7 @@ //! Email (`.eml`, RFC 5322 / MIME) input via mail-parser. //! //! Decisions: -//! - Behind the `email` feature (mail-parser 0.11, no default features: UTF-*, +//! - Behind the `email` feature (mail-parser 1.0, no default features: UTF-*, //! Latin and other single-byte charsets, QP/base64, RFC 2047 words). //! Selected by `message/rfc822` or `.eml`, never sniffed. //! - Output: `# Subject`, a header paragraph (From, To, Cc, Date as RFC 3339), @@ -17,7 +17,7 @@ use std::borrow::Cow; -use mail_parser::{Address, MessageParser, MimeHeaders, PartType}; +use mail_parser::{AddressList, Mailbox, MessageParser, PartKind}; use crate::config::MarkkitBuilder; use crate::error::Error; @@ -41,10 +41,10 @@ pub(crate) fn parse( ) -> Result { let msg = MessageParser::default() .parse(bytes) - .filter(|m| !m.parts.is_empty()) + .filter(|m| m.root().parts().next().is_some()) .ok_or_else(|| Error::EmailExtract("not an RFC 5322 message".into()))?; budget.check_time()?; - budget.add_nodes(msg.parts.len())?; + budget.add_nodes(msg.root().parts().count())?; let mut nodes = Vec::new(); let mut warnings = Vec::new(); @@ -75,20 +75,23 @@ pub(crate) fn parse( nodes.push(Node::paragraph(header)); } - for (i, &id) in msg.text_body.iter().enumerate() { - let Some(part) = msg.part(id) else { continue }; - if part.is_encoding_problem { + for (i, part) in msg.text_body().enumerate() { + if !part.decoded_checked().1.is_empty() { warnings.push(Warning::new( WarningCode::EncodingProblem, "a body part could not be fully decoded", )); } - match &part.body { - PartType::Text(text) => { + match part.kind() { + PartKind::Text => { + let text = part.text().unwrap_or(Cow::Borrowed("")); let decoded = crate::text::decode(text.as_bytes()); nodes.extend(crate::text::plain_to_ir(&decoded.text, budget)?.0.nodes); } - PartType::Html(html) => nodes.extend(html_nodes(html, &msg, i, config, budget)?), + PartKind::Html => { + let html = part.text().unwrap_or(Cow::Borrowed("")); + nodes.extend(html_nodes(&html, &msg, i, config, budget)?); + } _ => {} } } @@ -98,13 +101,13 @@ pub(crate) fn parse( if budget.expired() { return Err(budget.timeout_error()); } - let name = match &part.body { - PartType::Message(m) => m.subject().map(|s| format!("{} (message)", header_text(s))), - _ => None, - } - .or_else(|| part.attachment_name().map(header_text)) - .filter(|n| !n.is_empty()) - .unwrap_or_else(|| "unnamed".to_string()); + let name = part + .nested() + .and_then(|m| m.subject()) + .map(|s| format!("{} (message)", header_text(s))) + .or_else(|| part.attachment_name().map(header_text)) + .filter(|n| !n.is_empty()) + .unwrap_or_else(|| "unnamed".to_string()); let ctype = part .content_type() .map(|ct| match ct.subtype() { @@ -115,7 +118,7 @@ pub(crate) fn parse( .unwrap_or_else(|| "application/octet-stream".into()); items.push(ListItem::new(vec![Node::Text(format!( "{name} ({ctype}, {})", - human_size(part.len()) + human_size(part.decoded_len()) ))])); } let attachments = items.len(); @@ -172,10 +175,10 @@ fn header_text(s: &str) -> String { t.split_whitespace().collect::>().join(" ") } -fn addresses(addr: &Address<'_>) -> String { - let one = |name: Option<&Cow<'_, str>>, address: Option<&Cow<'_, str>>| { - let name = name.map(|n| header_text(n)).filter(|n| !n.is_empty()); - let address = address.map(|a| header_text(a)).filter(|a| !a.is_empty()); +fn addresses(addr: AddressList<'_>) -> String { + let one = |mailbox: Mailbox<'_>| { + let name = mailbox.name().map(header_text).filter(|n| !n.is_empty()); + let address = mailbox.address().map(header_text).filter(|a| !a.is_empty()); match (name, address) { (Some(n), Some(a)) if n != a => format!("{n} <{a}>"), (_, Some(a)) => a, @@ -183,18 +186,8 @@ fn addresses(addr: &Address<'_>) -> String { (None, None) => String::new(), } }; - let list: Vec = match addr { - Address::List(list) => list - .iter() - .map(|a| one(a.name.as_ref(), a.address.as_ref())) - .collect(), - Address::Group(groups) => groups - .iter() - .flat_map(|g| g.addresses.iter()) - .map(|a| one(a.name.as_ref(), a.address.as_ref())) - .collect(), - }; - list.into_iter() + addr.mailboxes() + .map(one) .filter(|s| !s.is_empty()) .collect::>() .join(", ") diff --git a/crates/markkit/src/pdf/ocr.rs b/crates/markkit/src/pdf/ocr.rs index d7ec34b..b02cb47 100644 --- a/crates/markkit/src/pdf/ocr.rs +++ b/crates/markkit/src/pdf/ocr.rs @@ -108,6 +108,7 @@ fn rasterize( ) -> Result<(Vec, u32, u32), Error> { use hayro::{ PixmapSettings, RenderCache, RenderSettings, hayro_interpret::InterpreterSettings, + hayro_interpret::RenderContent, }; clock.check_time()?; let (w, h) = page.render_dimensions(); @@ -126,11 +127,12 @@ fn rasterize( page, &RenderCache::new(), &InterpreterSettings { - render_annotations: false, + render_content: RenderContent::PAGE, ..Default::default() }, &RenderSettings { force_image_interpolation: true, + ..Default::default() }, &PixmapSettings { x_scale: (width as f32 + 0.001) / w, From fb25ce9587095d1efdbbf72796b3f544e483e200 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2026 02:47:23 +0000 Subject: [PATCH 3/4] chore(deps): bump the rust-dependencies group across 1 directory with 9 updates Bumps the rust-dependencies group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.6.7` | `4.6.9` | | [zip](https://github.com/zip-rs/zip2) | `9.3.0` | `9.8.1` | | [hayro-syntax](https://github.com/LaurenzV/hayro) | `0.8.0` | `0.9.0` | | [hayro](https://github.com/LaurenzV/hayro) | `0.8.0` | `0.9.0` | | [ocrs](https://github.com/robertknight/ocrs) | `0.13.1` | `0.14.0` | | [rten](https://github.com/robertknight/rten) | `0.26.0` | `0.28.0` | | [mail-parser](https://github.com/stalwartlabs/mail-parser) | `0.11.9` | `1.0.1` | | [napi](https://github.com/napi-rs/napi-rs) | `3.16.1` | `3.16.2` | | [napi-derive](https://github.com/napi-rs/napi-rs) | `3.7.0` | `3.7.1` | Updates `clap` from 4.6.7 to 4.6.9 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/main/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.7...clap_complete-v4.6.9) Updates `zip` from 9.3.0 to 9.8.1 - [Release notes](https://github.com/zip-rs/zip2/releases) - [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md) - [Commits](https://github.com/zip-rs/zip2/compare/v9.3.0...v9.8.1) Updates `hayro-syntax` from 0.8.0 to 0.9.0 - [Release notes](https://github.com/LaurenzV/hayro/releases) - [Commits](https://github.com/LaurenzV/hayro/compare/hayro-syntax-v0.8.0...hayro-syntax-v0.9.0) Updates `hayro` from 0.8.0 to 0.9.0 - [Release notes](https://github.com/LaurenzV/hayro/releases) - [Commits](https://github.com/LaurenzV/hayro/compare/hayro-v0.8.0...hayro-v0.9.0) Updates `ocrs` from 0.13.1 to 0.14.0 - [Changelog](https://github.com/robertknight/ocrs/blob/main/CHANGELOG.md) - [Commits](https://github.com/robertknight/ocrs/compare/ocrs-v0.13.1...ocrs-v0.14.0) Updates `rten` from 0.26.0 to 0.28.0 - [Changelog](https://github.com/robertknight/rten/blob/main/CHANGELOG.md) - [Commits](https://github.com/robertknight/rten/compare/rten-cli-v0.26.0...rten-cli-v0.28.0) Updates `mail-parser` from 0.11.9 to 1.0.1 - [Release notes](https://github.com/stalwartlabs/mail-parser/releases) - [Changelog](https://github.com/stalwartlabs/mail-parser/blob/main/CHANGELOG.md) - [Commits](https://github.com/stalwartlabs/mail-parser/commits) Updates `napi` from 3.16.1 to 3.16.2 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-v3.16.1...napi-v3.16.2) Updates `napi-derive` from 3.7.0 to 3.7.1 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-derive-v3.7.0...napi-derive-v3.7.1) --- updated-dependencies: - dependency-name: clap dependency-version: 4.6.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: zip dependency-version: 9.8.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: hayro-syntax dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: hayro dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: ocrs dependency-version: 0.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: rten dependency-version: 0.28.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: mail-parser dependency-version: 1.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: rust-dependencies - dependency-name: napi dependency-version: 3.16.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: napi-derive dependency-version: 3.7.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies ... Signed-off-by: dependabot[bot] --- Cargo.lock | 258 ++++++++++++++++++++++++++++++++++------------------- Cargo.toml | 10 +-- 2 files changed, 171 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2653b36..6b9687f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + [[package]] name = "adler2" version = "2.0.1" @@ -73,7 +79,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -173,7 +179,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -220,7 +226,7 @@ checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -339,9 +345,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +checksum = "844c5c0b65be192cb68d570cca1b21a6444431d24e39c084dc0336177015337c" dependencies = [ "clap_builder", "clap_derive", @@ -359,14 +365,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -412,6 +418,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "constant_time_eq" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "144e7f1de087984240b7816d47f698b414979faa6f40839c5b86d6bd47db57b7" +dependencies = [ + "rustversion", +] + [[package]] name = "convert_case" version = "0.12.0" @@ -547,7 +562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 3.0.9", + "syn 2.0.119", ] [[package]] @@ -591,7 +606,7 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -633,6 +648,16 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" +[[package]] +name = "encodify" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7f638cb35e10aa08efd439d11ddcbeef7d52dd987c4956a6ff2cc1061020f3" +dependencies = [ + "memchr", + "simdutf8", +] + [[package]] name = "encoding_rs" version = "0.8.44" @@ -660,7 +685,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -814,7 +839,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -930,22 +955,22 @@ dependencies = [ [[package]] name = "hashify" -version = "0.2.9" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1246c0e5493286aeb2dde35b1f4eb9c4ce00e628641210a5e553fc001a1f26" +checksum = "04a037b1848eada162d6534c206770180e6bfc0eaa97292250c3e7179d8b1f73" dependencies = [ - "indexmap", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] name = "hayro" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4675ff5acd7ca41c0c34ccd2a3a154f5c86d8b5ec92bef0a114bfb194969e2af" +checksum = "34d3977ae664ab6eea015be3024379c83c6a3580f67d51be6884f1992bf683ba" dependencies = [ + "ab_glyph_rasterizer", "bytemuck", "fearless_simd 1.2.0", "hayro-interpret", @@ -958,9 +983,9 @@ dependencies = [ [[package]] name = "hayro-ccitt" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2866f0d976e76497480b853d5e258dab6e4b89ecfe991124e08f15dfa8fd03ad" +checksum = "adbed896e99325bc312778bb9c9c289d795d51c12775c44dd5e4352f679c7e46" [[package]] name = "hayro-cmap" @@ -972,30 +997,44 @@ dependencies = [ "hayro-postscript", ] +[[package]] +name = "hayro-font" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac7f0c78172573e9bd6eeb17f62c63f4d378b2a2d127c3ee9c2c7cc6fbdf78b" +dependencies = [ + "bitflags", + "hayro-cmap", + "hayro-syntax", + "kurbo", + "phf 0.13.1", + "rustc-hash", + "siphasher", + "skrifa 0.49.0", +] + [[package]] name = "hayro-interpret" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9df074ff163a63864cec9b0bf640ccbff8abf4e44481df7369ce0ac172ffbe" +checksum = "166477622df4b770a0fc5889a9e4b48c7ff8595d6ec019bf71b4297b97b55fb6" dependencies = [ "bitflags", "hayro-cmap", + "hayro-font", "hayro-syntax", "kurbo", "moxcms", - "phf 0.13.1", "rustc-hash", "siphasher", - "skrifa 0.46.2", "smallvec", - "yoke", ] [[package]] name = "hayro-jbig2" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000e025850f4592ddcaee85640db70704151f2bafd43b6f431aa5b6a2c6a35a9" +checksum = "eb5c7f3a4eb551c2bb7fa16e268f728d4bc2a5c9b090554b8dc0ee2503fb5840" dependencies = [ "fearless_simd 1.2.0", "hayro-ccitt", @@ -1003,9 +1042,9 @@ dependencies = [ [[package]] name = "hayro-jpeg2000" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122c5f834c37a2260b9c851bb8be685cf539b2a8b94b704a931ef7d2525d5835" +checksum = "6e5e5f2b3de970707fc22fd956d8f44211602939d5e4588603afa919cb7b3740" dependencies = [ "fearless_simd 1.2.0", ] @@ -1018,9 +1057,9 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cdc818d8d265dcb42081d488f7599df4f73fb79e9d347ecedcd3c23809d2026" +checksum = "a6ced8279487b029813f6cc05399099fa34df6fa23d8f7b0d41d972c49d5b30d" dependencies = [ "flate2", "hayro-ccitt", @@ -1448,11 +1487,14 @@ checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" [[package]] name = "mail-parser" -version = "0.11.9" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec00bda90c6e645a54506c630c2820cd6b1890cfd2b0a169b50f74b2b8c7c86" +checksum = "2e57f7caaeb0071026b4be388c81e9c253853d9ed072a3061d425ef1c1b1b569" dependencies = [ + "encodify", "hashify", + "memchr", + "simdutf8", ] [[package]] @@ -1653,9 +1695,9 @@ checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" [[package]] name = "napi" -version = "3.16.1" +version = "3.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907ff7366fb7182e28edd0f08ef8ac5d6b13b8d65a3c0b3a10bf3ac092437d6b" +checksum = "567c62b9c2d0fae123713f766686ad66a2c75b45ba3ee01ed8b06a7e99bc435b" dependencies = [ "bitflags", "ctor", @@ -1678,29 +1720,29 @@ checksum = "b899b545d3aa6dca985939059f258c5488d34e4ecf39c274e20009748f4b846d" [[package]] name = "napi-derive" -version = "3.7.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32eb00f92f84cf462fc328f49082b29c2a7d2eebeb1d447d19c1f9fdd9f89ee" +checksum = "d3f284288c8a2a4a66519e24dcc0cbfa1b7e0abc37bdd073185c68276f08f3d3" dependencies = [ "convert_case", - "ctor", "napi-derive-backend", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", + "unicode-ident", ] [[package]] name = "napi-derive-backend" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fe28c64d8fc12e69f9b817d0febdbe7914555760f1e353106281b8ff99cc90" +checksum = "32477ed34450779386e6aaa3b33bcf3916035b7de0fee68b73716f65a3894003" dependencies = [ "convert_case", "proc-macro2", "quote", "semver", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -1757,14 +1799,14 @@ dependencies = [ [[package]] name = "ocrs" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4192a7dbc7570398ef97ab2606799703b6ea11da53f637d705d44546614435" +checksum = "1b9bb55cfe654ffee0f47641ae839dd4ba3117f47d5240378607af7cce2113fe" dependencies = [ - "anyhow", "rayon", "rten", "rten-imageproc", + "rten-sequence", "rten-tensor", "thiserror", "wasm-bindgen", @@ -2139,7 +2181,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2151,7 +2193,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2224,7 +2266,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2310,13 +2352,16 @@ dependencies = [ [[package]] name = "read-fonts" -version = "0.43.3" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005c8acf251756c478b0bf402885bfd88a1476020c4c7e6060edc1aa68da38ea" +checksum = "bdaa4fffe9ff3ca2c353fa9729792805b9b3e324695ff5a081f860612e81b330" dependencies = [ "bytemuck", + "foldhash", "font-types", "once_cell", + "smallvec", + "yoke", ] [[package]] @@ -2345,7 +2390,7 @@ checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2430,9 +2475,9 @@ dependencies = [ [[package]] name = "rten" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7741649977427aa13009537ac9a8fe1a503b0aa58784069ce8f117e47eb6ab" +checksum = "68a8eceaf794b6a9cc37c59ea921031a51f527edce05293f72e795641556ca2c" dependencies = [ "num_cpus", "rayon", @@ -2452,15 +2497,15 @@ dependencies = [ [[package]] name = "rten-base" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413dc975c7a3d0e6da0b146cd0387e3d389cceab0fc48328bfa716c7f2ae1b1e" +checksum = "718b3ecab8cc677a15a978e7a232a35c48a108f09c1c02214c6980a5f2b3e851" [[package]] name = "rten-gemm" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efc07c654d4b3f8d81e2efd8b13aea7475568395289e5bb35393411aa6a451e" +checksum = "9a5644634733c7e2568e3796085e69da9774fc461c0d6c06535bc5c10341dfb0" dependencies = [ "rayon", "rten-base", @@ -2471,34 +2516,44 @@ dependencies = [ [[package]] name = "rten-imageproc" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18726eae9614e23a400560eb3a5e3fdb06526914c31aadaf767f14afde7680dd" +checksum = "e2e56f4369df60d21e0de84f5828bbca487c651487e1a86517eb844c33d2105e" dependencies = [ "rten-tensor", ] [[package]] name = "rten-onnx" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96944374568990b8d1bbc5bae5957585866f9dd8256130460405730948bfd42e" +checksum = "2603fd142215bc58c099f02950cb836d463282a3b51ef9b83ce3d8ba86e0b801" [[package]] name = "rten-parallel" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9075b130f81df7be82496ea3a9bbf20fe9e75f106a22b0ece8700850f8f664" +checksum = "fa535561ed1dc9e878aed0ff50280d588a4f91996873978c9f64532450386e08" dependencies = [ "rayon", "rten-base", ] +[[package]] +name = "rten-sequence" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cea4f0a53a2c927ba904bd4ddc490713f886512b5819d9f77f20126db30a99d" +dependencies = [ + "rten-base", + "rten-tensor", +] + [[package]] name = "rten-shape-inference" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89289c26b6a5248fccf4d67627596848a03ed31888e6ce4ba6f666c689258122" +checksum = "47c5835450abda8a2d5a5c056ea323d8a49ee8cb069a500247ebf6ac467db84a" dependencies = [ "rten-tensor", "smallvec", @@ -2506,15 +2561,15 @@ dependencies = [ [[package]] name = "rten-simd" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f0c01294eb782adca256aa130b48a04006d03763073a68f45a9c33b982ea556" +checksum = "f844a9756ca67c6a2a808642caafd781d4ad2c4eb5d4b78e5c300b3cbb29167f" [[package]] name = "rten-tensor" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf72556ba231d7af50238d26dd264856a2149c6369694eb79b22644c8280c81b" +checksum = "2fcfdd96084216840a4be918add09f09b6a5c9532dbb8ce4ce70d99c783ab10d" dependencies = [ "rayon", "rten-base", @@ -2525,9 +2580,9 @@ dependencies = [ [[package]] name = "rten-vecmath" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1007f05160f9ea2ce4e9c67324e5bafb27ae1e5302d0c6b1ea4db0d35fed78ee" +checksum = "37594106d3db45458fabb6f62c2b23b8591b2d3dc733cf7b3aded16c1626d802" dependencies = [ "rten-base", "rten-simd", @@ -2558,7 +2613,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2615,7 +2670,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2694,7 +2749,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2801,7 +2856,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2812,7 +2867,7 @@ checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -2893,12 +2948,15 @@ dependencies = [ [[package]] name = "skrifa" -version = "0.46.2" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4febebda507fb889c545a37a135517769d1391941013561292897961d1887d6" +checksum = "a7459fb60888ad9a5f367dd293fa2fb9df142cb451aa6bfd6cd66a7d6a9b739d" dependencies = [ "bytemuck", - "read-fonts 0.43.3", + "once_cell", + "read-fonts 0.46.0", + "smallvec", + "yoke", ] [[package]] @@ -2972,9 +3030,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -2998,7 +3056,7 @@ checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3017,7 +3075,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3046,7 +3104,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3099,7 +3157,7 @@ checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -3414,7 +3472,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "wasm-bindgen-shared", ] @@ -3490,7 +3548,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3621,7 +3679,7 @@ checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "synstructure", ] @@ -3662,7 +3720,7 @@ checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "synstructure", ] @@ -3671,6 +3729,20 @@ name = "zeroize" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "zerotrie" @@ -3702,15 +3774,16 @@ checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "zip" -version = "9.3.0" +version = "9.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaeb7f16d2605b49aef586996ded29e65642fab7259a3077e537351df6d80426" +checksum = "2d8dbe089cf6b0448b78f5fc50139ab5aaa40d08ac07cdc1baf2c13add35fcce" dependencies = [ + "constant_time_eq", "crc32fast", "flate2", "getrandom 0.4.3", @@ -3720,6 +3793,7 @@ dependencies = [ "nix", "typed-path", "windows-sys 0.61.2", + "zeroize", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index e0fb2b5..b801e84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,13 +55,13 @@ calamine = "0.38" # Excel/spreadsheet (XLSX/XLS/ODS) zip = { version = "9", default-features = false, features = ["deflate"] } # OOXML/ODF containers; matches calamine's zip quick-xml = "0.42" # DOCX/ODS XML parsing cfb = "0.16" # XLS (OLE2) container pre-scan -hayro-syntax = { version = "0.8", default-features = false, features = ["std"] } # PDF object/content parsing; OCR also enables image decoding -hayro = { version = "0.8", default-features = false, features = ["embed-fonts", "embed-cmaps"] } -ocrs = { version = "0.13.1", default-features = false, features = ["onnx"] } -rten = { version = "0.26", default-features = false, features = ["onnx_format"] } +hayro-syntax = { version = "0.9", default-features = false, features = ["std"] } # PDF object/content parsing; OCR also enables image decoding +hayro = { version = "0.9", default-features = false, features = ["embed-fonts", "embed-cmaps"] } +ocrs = { version = "0.14.0", default-features = false, features = ["onnx"] } +rten = { version = "0.28", default-features = false, features = ["onnx_format"] } miniz_oxide = "0.9" # Bounded FlateDecode for PDF streams pulldown-cmark = { version = "0.13", default-features = false } # Markdown input; output-safety test oracle -mail-parser = { version = "0.11", default-features = false } # EML input (RFC 5322 / MIME) +mail-parser = { version = "1.0", default-features = false } # EML input (RFC 5322 / MIME) # Logging tracing = "0.1" From f5d56ac0a1ebd9c748dc738b64dbe3991e6d5ba3 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Wed, 25 Nov 2026 22:29:00 -0600 Subject: [PATCH 4/4] chore(deps): review major parser and OCR dependency migrations --- CHANGELOG.md | 4 ++ crates/markkit/tests/email_integration.rs | 35 ++++++++++++++ knowledge/formats/format-support.md | 2 +- knowledge/log.md | 2 + knowledge/security/native-dependencies.md | 57 +++++++++++++++++++---- 5 files changed, 90 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a381762..a92367c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ### Changed +- Refresh PDF/OCR, MIME, archive, CLI and native Node dependencies; the optional + `email` feature now requires Rust 1.98 or later (**Breaking:** MSRV increase + for email-enabled builds). + - Docs overhaul: rewritten root, PyPI, npm and WASM READMEs (API tables, result fields, options, limits, errors); getting-started guide rewritten. Rust snippets in the README and guides are now compiled as doctests. diff --git a/crates/markkit/tests/email_integration.rs b/crates/markkit/tests/email_integration.rs index 33425ce..0659723 100644 --- a/crates/markkit/tests/email_integration.rs +++ b/crates/markkit/tests/email_integration.rs @@ -221,3 +221,38 @@ fn security_limits_apply() { "{r:?}" ); } + +#[test] +fn security_transfer_decode_problem_is_reported() { + let e = extract( + "Subject: x\r\nContent-Type: text/plain\r\nContent-Transfer-Encoding: base64\r\n\r\nSGVsbG8=%%%\r\n", + ); + assert!( + e.warnings + .iter() + .any(|w| w.code == markkit::WarningCode::EncodingProblem), + "{:?}", + e.warnings + ); +} + +#[test] +fn security_short_and_vector_boundary_invalid_utf8() { + let m = Markkit::builder().build(); + for size in 0..=130 { + let mut raw = + b"From: a@example.com\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n".to_vec(); + raw.extend(std::iter::repeat_n(b'x', size)); + raw.extend_from_slice(b"\xff\r\n--\0\x1b"); + let e = m + .extract_document_sync(&raw, DocumentHint::file_name("boundary.eml")) + .unwrap(); + assert!( + !e.markdown + .chars() + .any(|c| c.is_ascii_control() && !matches!(c, '\n' | '\t')), + "size={size}" + ); + assert!(e.markdown.contains(&"x".repeat(size))); + } +} diff --git a/knowledge/formats/format-support.md b/knowledge/formats/format-support.md index 43dceb1..6c3dc3f 100644 --- a/knowledge/formats/format-support.md +++ b/knowledge/formats/format-support.md @@ -24,7 +24,7 @@ tags: ### Tier 1 (Core) - **HTML/XHTML**: Full support via html5ever + scraper (`html` feature, default) - **Plain text**: Always on, no dependencies (`text/plain`, `.txt`, `.text`) -- **Email** (`email`): `.eml` / `message/rfc822` via mail-parser 0.11 (no default features) +- **Email** (`email`): `.eml` / `message/rfc822` via mail-parser 1.0 (Rust 1.98+) (no default features) - **Jupyter notebooks**: Always on, serde_json (`application/x-ipynb+json`, `.ipynb`; nbformat 4) - **CSV / TSV**: Always on, no dependencies (`text/csv`, `application/csv`, `.csv`; `text/tab-separated-values`, `.tsv`, `.tab`) diff --git a/knowledge/log.md b/knowledge/log.md index 7a69eb2..c8674bc 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -2,6 +2,8 @@ ## 2026-11-25 +- [Native Dependencies](security/native-dependencies.md): review and accept Hayro 0.9 mandatory SIMD, mail-parser 1.0.2 lazy views/unsafe scanning (Rust 1.98), and ocrs 0.14/RTen 0.28 with unchanged model assets. Preserve annotation exclusion and email output; update parser API integration and encoding/boundary regressions. Supersedes the November 3 deferral. + - [Threat Model](security/threat-model.md): require `url` 2.5.9 for RUSTSEC-2026-0592; shipping audit rejects the prior locked version. - [Format Support](formats/format-support.md): bounded decoded email clean/full views with conservative omission spans; no model or network. [Threat Model](security/threat-model.md) records plain-text rendering responsibility and limit checks on forwarded/empty bodies; runnable example covers the new Rust API. diff --git a/knowledge/security/native-dependencies.md b/knowledge/security/native-dependencies.md index eeb1cee..7c52baa 100644 --- a/knowledge/security/native-dependencies.md +++ b/knowledge/security/native-dependencies.md @@ -10,9 +10,9 @@ tags: # Native Dependencies -## Hayro review (2026-10-29 UTC) +## Hayro review (2026-11-25 Chicago) -Hayro 0.8.0 is a Rust PDF renderer, licensed MIT OR Apache-2.0. Public evidence: +Hayro 0.9.0 is a Rust PDF renderer, licensed MIT OR Apache-2.0. Public evidence: - [Repository](https://github.com/LaurenzV/hayro): individual account LaurenzV. - Repository creation: 2025-04-22. The [earliest surviving default-branch commit](https://github.com/LaurenzV/hayro/commit/38efa5f7d08e68ebca2d1a209d4921c1deffeaf3) @@ -20,25 +20,64 @@ Hayro 0.8.0 is a Rust PDF renderer, licensed MIT OR Apache-2.0. Public evidence: - [Maintainer profile](https://github.com/LaurenzV): Laurenz Stampfl; public location Vienna, Austria; company Canva at review time. - [Crates.io ownership API](https://crates.io/api/v1/crates/hayro/owners): sole - owner LaurenzV. Version 0.8.0 was published by that account on 2026-10-04. -- Crates.io checksum: `4675ff5acd7ca41c0c34ccd2a3a154f5c86d8b5ec92bef0a114bfb194969e2af`. + owner LaurenzV. Version 0.9.0 was published by that account on 2026-11-02. +- Crates.io checksum: `34d3977ae664ab6eea015be3024379c83c6a3580f67d51be6884f1992bf683ba`. These records show no Russian organizational ownership. They cannot certify the nationality, ancestry, residence or affiliations of every contributor, historical contributor or transitive dependency author. No such conclusions are inferred from names. This is a public ownership/location review, not a supply-chain audit. -Use the registry release and committed lockfile, with optional -architecture-specific SIMD disabled. `embed-fonts` and `embed-cmaps` are +Use the registry release and committed lockfile. The [0.9 release](https://github.com/LaurenzV/hayro/releases/tag/hayro-v0.9.0) +removes the SIMD opt-out: this review accepts its mandatory Rust SIMD paths, +including `fearless_simd`, `pic-scale` and `vello_cpu`. This supersedes the +0.8 decision to disable optional SIMD. Rendering remains behind `pdf-ocr`, +with existing page/pixel/stream budgets and cooperative deadlines; it is not +a process isolation boundary. `RenderContent::PAGE` explicitly excludes +annotations, preserving the prior behavior. New render settings use upstream +defaults around the existing interpolation setting. MSRV is 1.92. `embed-fonts` and `embed-cmaps` are enabled: the binary carries PDFium/Foxit standard fonts and Adobe CMaps (BSD-3-Clause; binary redistribution must reproduce the notices) and CC0 ICC profiles. Root `NOTICE` reproduces them; see Licensing below. The renderer and its codec/font/ color dependencies are implemented in Rust. It replaces the Poppler executable; Tesseract remains necessary for text recognition. -## Optional Rust OCR review (2026-10-28 Chicago) - -`ocrs` 0.13.1 and RTen 0.26 implement CPU inference in Rust. The sole registry +## Email parser review (2026-11-25 Chicago) + +`mail-parser` 1.0.2 is a Rust MIME parser under MIT OR Apache-2.0 from +[Stalwart Labs](https://github.com/stalwartlabs/mail-parser). The +[registry ownership API](https://crates.io/api/v1/crates/mail-parser/owners) +lists sole owner [Maurus Decimus](https://github.com/mdecimus), whose profile +lists Stalwart Labs and no location. That account published 1.0.2 on +2026-11-23; checksum +`2e57f7caaeb0071026b4be388c81e9c253853d9ed072a3061d425ef1c1b1b569`. +These records do not establish every contributor's residence or affiliations. + +The registry source, manifest and changelog were inspected for the 0.11-to-1.0 +rewrite. It requires Rust 1.98 and retains no default features. Body decoding +is lazy; Markkit reads `text_body()` views, warns on transfer-decode problems +from `decoded_checked()` and lists nested-message attachments without +extracting their content. Header/address views preserve the prior flattening. +The parser has default caps of 64 nesting levels, 10,000 parts and three +encoded-message nesting levels; reaching an upstream cap may truncate the +parsed structure. Markkit still bounds input and charges parsed parts/body +nodes to its shared budget after the non-interruptible parse. + +New unsafe Rust lives in SIMD scanning and UTF-8 span resolution. Reviewed +`scan/mod.rs` CPU dispatch, `scan/simd.rs` full-vector load bounds/scalar tails +and `store/str.rs` validated UTF-8/immutable source-span invariants. x86 AVX2 +and SSSE3 are runtime-detected; aarch64 NEON uses its baseline target feature; +other targets retain portable scanning. `encodify` and `simdutf8` add decoding +and validation paths. This accepts the dependency migration under the existing +untrusted-input/host-isolation contract; it is a focused integration review, +not a complete audit of all unsafe transitive code. Email regression tests +cover malformed encodings, short/vector-boundary inputs, nested messages, +header injection, limits and attachments. No native library or network +dependency is added by this feature. + +## Optional Rust OCR review (2026-11-25 Chicago) + +`ocrs` 0.14.0 and RTen 0.28 implement CPU inference in Rust. The sole registry owner is [Robert Knight](https://github.com/robertknight), whose public profile lists London, United Kingdom, and Shortest Path Software. Public ownership records show no Russian organizational owner; this is not a statement about