Files
craft-libs/crates/doc-binary/Cargo.toml
T
Dylan M. Taylor d516b44691 Add craft-doc-binary: WordCraft's .doc reader on craft-wordmodel and craft-cfb
Add craft-doc-binary: WordCraft's .doc reader on craft-wordmodel and craft-cfb

* craft-doc-binary: WordCraft's crates/docbin as it is at wordcraft 07f97737

The source, unchanged, so the next commit shows only what the move changes.
It has no manifest yet, so it is not built.

* craft-doc-binary: on craft-wordmodel, craft-cfb and craft-codepage

- The compound file is read with craft-cfb (bounded directory, streams refused
  above 1 GiB before anything is allocated), in place of the cfb crate and
  WordCraft's cfb_guard precheck; an oversized stream is DocbinError::Limit.
- 8-bit text uses craft-codepage in place of wordcraft_doc::encoding.
- wordcraft-doc is craft-wordmodel; wordcraft-geom's helpers are its geom.

The tests keep building their files with the cfb crate (a dev-dependency), so
craft-cfb's reader is checked against another implementation's writer. The
repeating-DIFAT regression is craft-cfb's own; the guard asserts in the
valid-files test go with the guard.
2026-11-11 22:43:11 -05:00

31 lines
1.0 KiB
TOML

[package]
name = "craft-doc-binary"
description = "Reader for the Word 97-2003 binary file format (.doc, [MS-DOC]) into the craft-wordmodel document model, with XOR, RC4 and RC4 CryptoAPI password protection."
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
[lints]
workspace = true
[dependencies]
craft-cfb = { workspace = true }
craft-codepage = { workspace = true }
craft-wordmodel = { workspace = true }
chrono = { version = "0.4.45", default-features = false, features = ["std"] }
image = { version = "0.25", default-features = false, features = ["png", "bmp"] }
log = "0.4"
miniz_oxide = "0.9"
sha1 = "0.11"
thiserror = { workspace = true }
[dev-dependencies]
# Test files are written with an independent compound-file writer, so craft-cfb's reader is
# checked against another implementation's output.
cfb = "0.15"
craft-wordmodel = { workspace = true, features = ["test-support"] }
proptest = { workspace = true }
serde_json = "1"