mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-19 08:55:26 +00:00
* #778: take craft-libs integration/wordcraft-778 at beeea924 Every craft-libs git dependency (workspace, ui-egui, wordcraft, wordcraft-web, krilla patch) moves from 453b0da782 to beeea92451 (craft-libs main 0649a07aa plus open PRs #2061-#2064). Cargo.lock: only craft-libs sources move, plus windows-sys edge changes inside craft-libs crates; no crates.io versions change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: docx stacking-order test follows the shared reader's one-more z craft-libs 5f453efa9 (craft-docx: a relativeHeight of 0 stays the lowest stacking order) reads Float::z as one more than the file's relativeHeight and writes stored orders one less, so a file's 0 is no longer "none". The test expected the old values; relative order and the round trip are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: take craft-libs integration/wordcraft-778 at 24a15211 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * deps: pin craft-libs to the merged shared cutover prerequisites * #778: pin craft-libs main at 93dac78c (with #2061-#2064) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: picture probes use craft-image-codecs (DIB wrapping, JPEG budget, PNG/WebP) (#6955) * #778: picture: wrap clipboard DIBs with craft-image-codecs' bmp_probe probe_dib's local dib_to_bmp and dib_layout are replaced by craft_image_codecs::bmp_probe::{dib_to_bmp, dib_layout}. The shared copies are the same code; the only change is that they reserve their output fallibly. A failed reservation in dib_to_bmp (the BMP's bytes can't be allocated) is Refusal::TooLarge with the size the DIB header declares, the refusal a picture too large to hold already gets; dib_layout leaves the DIB unchanged then. The local dib_to_bmp name stays as a thin wrapper returning Result<_, Refusal>. The old code is kept in the tests as an oracle: wrapping and layout are byte-equal on thousands of crafted DIBs (core, info, V4, V5 headers, bit fields, alpha with BI_RGB, every truncation), and probe_dib agrees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: picture: budget JPEG coefficients with craft-image-codecs probe's JPEG held-coefficient estimate (jpeg_coefficients, frame_coefficients, worst_coefficients) is replaced by craft_image_codecs::jpeg_worst_case_coefficients, which returns the larger of that same estimate and the shared held_coefficients. So the charge can only grow, never shrink. It grows for: a SOF0/SOF1 8-bit first frame whose first scan has fewer components than the frame (the decoder holds the coefficients until the other scans); and a first-frame SOF2 with sampling factors above 4 (the old rule clamped them to 4). A real baseline JPEG with all components in its first scan is charged nothing, as before. With the 512 MiB budget, a 4:4:4 non-interleaved baseline JPEG is now refused from about 59.6 Mpx instead of 67 Mpx; 4:2:0 and 4:2:2 stay under the RGBA8 conversion and are unchanged. The old code is kept in the tests as an oracle: the new charge is never less (crafted headers, every prefix, random damage), equal where the shared rule adds nothing, and one test pins a case where it grows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: picture: read PNG and WebP probes with craft-image-codecs The local png_chunks header read is replaced by craft_image_codecs::png_probe::pixel_model, and the VP8X alpha check in probe by webp_probe::has_alpha (an error reads as no alpha, as non-RIFF input did). PNG: for every valid colour type and bit depth, with and without tRNS and an iCCP chunk, the size, bytes a pixel and alpha are what the old read gave (PixelModel::bytes_per_pixel is channels * 2 for 16 bits, else channels, with a palette as RGB and tRNS adding a channel to grey, RGB and palette). pixel_model is stricter, so these are now refused (probe: Refusal::Broken, dimensions: None) where the old read measured them: an invalid colour type and bit depth pair, a zero or past-i32::MAX side, and more than 65,536 chunks before the image data. None is a valid PNG. WebP: a bare lossless (VP8L) picture whose header sets alpha_is_used now reports alpha; the old rule only knew the VP8X flag. The old PNG read and WebP rule are kept in the tests as oracles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: picture tests follow craft-image-codecs' DIB fixes The shared dib_to_bmp no longer adds 12 appended mask bytes to the pixel offset of 52/56-byte BI_BITFIELDS headers, and dib_layout treats the bytes after the header as a mask copy only when the payload is longer than the pixel rows need. The differential test excludes exactly those inputs by named predicate, asserts the new output for them, and stays byte-equal elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * #778: dib_header_dims uses the shared fallible dib_to_bmp Calls the shared probe directly so a failed allocation cannot recurse through the refusal wrapper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * #778: WordCraft's MCP stdio server runs on craft-mcp-server (#6956) The JSON-RPC framing, bounded line reading, initialize, ping, tools/* and resources/* now come from craft_mcp_server::Server; WordCraft keeps its tools, resources, instructions and backends. The old server.rs stays as a test-only oracle for a differential test. click/key schemas list every argument the app accepts, since the shared check refuses unlisted ones. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
176 lines
11 KiB
TOML
176 lines
11 KiB
TOML
[workspace]
|
||
resolver = "3"
|
||
members = ["crates/*", "apps/*", "xtask"]
|
||
default-members = ["crates/*", "apps/wordcraft", "apps/wordcraft-cli", "xtask"]
|
||
|
||
[workspace.package]
|
||
version = "0.18.1"
|
||
edition = "2024"
|
||
license = "MIT OR Apache-2.0"
|
||
rust-version = "1.95"
|
||
repository = "https://github.com/storytold/wordcraft"
|
||
|
||
[workspace.dependencies]
|
||
# internal
|
||
wordcraft-geom = { path = "crates/geom" }
|
||
wordcraft-doc = { path = "crates/doc" }
|
||
wordcraft-fonts = { path = "crates/fonts" }
|
||
wordcraft-layout = { path = "crates/layout" }
|
||
wordcraft-docx = { path = "crates/docx" }
|
||
wordcraft-docbin = { path = "crates/docbin" }
|
||
wordcraft-formats = { path = "crates/formats" }
|
||
wordcraft-render = { path = "crates/render" }
|
||
wordcraft-pdf = { path = "crates/pdf" }
|
||
# Proofing is craft-libs' craft-proof (it was crates/proof); its Language data is craft-i18n's
|
||
# language-data/, embedded from CRAFT_I18N_DIR (craft-i18n.rev). The package keeps the
|
||
# `wordcraft-proof` name here so `wordcraft_proof::` paths are unchanged.
|
||
# craft-proof is storytold/craft-libs main at 93dac78c. That tree has #590 (ca-ES-valencia
|
||
# reads the ca-valencia pack), #589 (French elision suggestions first), #497 (flag-based
|
||
# compounding), #496 (review follow-ups, en-AU) and the merged #482–#490/#495 stack; the font
|
||
# store's `language-pack` kind is #486 (CP4.1).
|
||
wordcraft-proof = { package = "craft-proof", git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-ssip = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
wordcraft-engine = { path = "crates/engine" }
|
||
wordcraft-mcp = { path = "crates/mcp" }
|
||
wordcraft-zotero = { path = "crates/zotero" }
|
||
wordcraft-control-key = { path = "crates/control-key" }
|
||
wordcraft-ui-egui = { path = "crates/ui-egui" }
|
||
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
|
||
# foundation
|
||
kurbo = { version = "0.13", features = ["serde"] }
|
||
thiserror = "2"
|
||
serde = { version = "1", features = ["derive", "rc"] }
|
||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||
log = "0.4"
|
||
# All date/time conversion goes through chrono (no hand-rolled calendar code beyond the 400-year range extension; AGENTS.md).
|
||
chrono = { version = "0.4.45", default-features = false, features = ["std"] }
|
||
proptest = "1"
|
||
rayon = "1"
|
||
unicode-bidi = "0.3"
|
||
unicode-segmentation = "1"
|
||
unicode-linebreak = "0.1"
|
||
unicode-script = "0.5"
|
||
regex = { version = "1", default-features = false, features = ["std", "unicode", "perf"] }
|
||
regex-automata = { version = "0.4", default-features = false, features = ["std", "syntax", "meta", "nfa-pikevm", "unicode"] }
|
||
|
||
# text / rendering / formats
|
||
skrifa = "0.47"
|
||
harfrust = "0.13"
|
||
# WOFF / WOFF2 web fonts added by the user (#582): pure Rust (MIT); its brotli and zlib decoders
|
||
# (brotli-decompressor, flate2) are already in the tree.
|
||
wuff = "0.2.9"
|
||
# WOFF2's brotli stream, decoded ahead of wuff so its glyph point counts are checked first (#3703).
|
||
# The same crate and version wuff already decodes it with (no new code in the build): pure Rust,
|
||
# `forbid(unsafe_code)` in its default build, no_std-capable (builds for wasm), BSD-3-Clause/MIT.
|
||
brotli-decompressor = "5"
|
||
vello_cpu = "0.2"
|
||
image = { version = "0.25", default-features = false }
|
||
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0", default-features = false, features = ["write"] }
|
||
# craft-update: app-specific pretend versions apply to startup and manual checks.
|
||
craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", features = ["egui"] }
|
||
craft-wordmodel = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-docx = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0", features = ["doc"] }
|
||
craft-doc-binary = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-flow = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-odf = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0", features = ["text"] }
|
||
craft-markdown = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-html = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0", features = ["flow"] }
|
||
craft-latex = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-math = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0", features = ["detect"] }
|
||
craft-sheet = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-ods = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-xls = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a", version = "=0.1.0" }
|
||
# zlib streams (compressed metafile pictures in `.doc` drawings); already in the lock as a dependency of other crates.
|
||
miniz_oxide = "0.9"
|
||
cfb = "0.15"
|
||
# Legacy text encodings (GBK/GB18030, Big5, Shift_JIS, EUC-KR, single-byte code pages) for plain
|
||
# text and CSV recipient lists (#778): encoding_rs ((Apache-2.0 OR MIT) AND BSD-3-Clause), pure
|
||
# Rust (Firefox's). Detection is craft-mime's `detect` feature.
|
||
encoding_rs = "0.8"
|
||
# chardetng (Apache-2.0 OR MIT): only the formats test oracle for the old detector uses it directly.
|
||
chardetng = "1"
|
||
# Password-protected (agile-encrypted) Word documents: pure-Rust RustCrypto primitives.
|
||
aes = "0.9"
|
||
sha1 = "0.11"
|
||
sha2 = "0.11"
|
||
hmac = "0.13"
|
||
base64 = "0.23"
|
||
getrandom = "0.3"
|
||
zeroize = "1"
|
||
# Unix open flags (O_NONBLOCK for the engine's checked file reads, #3666); already in the lock as a
|
||
# dependency of other crates.
|
||
libc = "0.2"
|
||
|
||
# time
|
||
|
||
# ui
|
||
egui = "0.37"
|
||
egui_extras = { version = "0.37", default-features = false }
|
||
eframe = { version = "0.37", default-features = false }
|
||
egui_kittest = "0.37"
|
||
# A monotonic clock that works on native and in the browser (`performance.now()`).
|
||
web-time = "1.1"
|
||
rfd = "0.17"
|
||
arboard = { version = "3.7", default-features = false, features = ["wayland-data-control"] }
|
||
|
||
[workspace.lints.rust]
|
||
unsafe_code = "forbid"
|
||
# cargo llvm-cov sets `--cfg coverage`; timing tests skip themselves under its instrumentation.
|
||
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(coverage)"] }
|
||
|
||
[workspace.lints.clippy]
|
||
cognitive_complexity = "deny"
|
||
wildcard_imports = "deny"
|
||
dbg_macro = "warn"
|
||
todo = "warn"
|
||
too_many_arguments = "deny"
|
||
type_complexity = "allow"
|
||
|
||
# Line tables keep file and line in panics and backtraces; full debug info
|
||
# for every test binary and dependency would multiply the target dir size.
|
||
# The test profile inherits both settings.
|
||
[profile.dev.package."*"]
|
||
opt-level = 2
|
||
debug = false
|
||
|
||
[profile.dev]
|
||
opt-level = 1
|
||
debug = "line-tables-only"
|
||
|
||
[profile.release]
|
||
opt-level = 3
|
||
lto = "thin"
|
||
codegen-units = 16
|
||
debug = 0
|
||
|
||
# Required by craft-pdf: the backend rejects writers that failed during unwinding.
|
||
[patch.crates-io]
|
||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "93dac78c93a7f1fd66e2022edeb089233b1dc45a" }
|
||
ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
eframe = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
|
||
winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" }
|