//! Workspace tooling: `cargo xtask `. //! //! Pure Rust (std + serde_json). External tools (`cargo`, `curl`, `tar`) are //! invoked through `std::process::Command`. mod affinity_corpus; mod assets; mod brands; mod bundle; mod cursors; mod ico; mod layers; mod pdf_deps; mod pngsuite; mod script_corpus; mod sha256; mod shards; mod stats; mod test262; mod ui_commands; mod version; mod web_fonts; use std::path::{Path, PathBuf}; use std::process::{Command, ExitCode}; const USAGE: &str = "\ usage: cargo xtask commands: assets check that every icon/image/font/asset is attributed in ASSETS.md brands check that user-visible text (labels, params docs, MCP, docs, packaging) names no other vendor's products cursors warn about Cursor values with no entry in crates/tools/src/cursors.toml (never fails) i18n-report list the strings each language's catalog lacks, shown in English (fails only on a broken scan; ci runs it too) ui-commands regenerate crates/mcp/src/ui_catalog.rs from desktop UI_COMMANDS; --check fails on drift pdf-deps verify immutable shared PDF writer and patched Krilla sources layers enforce the crate dependency layering (plan/architecture.md §3) wasm cargo check --target wasm32-unknown-unknown for the wasm-safe crates and the web app test the workspace tests (cargo nextest when installed, else cargo test), then the doctests ci fmt --check, clippy -D warnings, test, doctests, no-bundled-fonts, pdf-deps, assets, brands, cursors (warnings only), ui-commands --check, layers, wasm (stops at first failure) ci shard shard $GATE_SHARD of $GATE_SHARDS of ci (xtask/src/shards.rs): a test shard runs the tests and doctests of its crates, the last shard the other steps ci warm build what every shard builds, without running it (fills the gate's cache) shards list the crates each shard tests; fails when a member is in no shard or in two, or builds with other features in its shard than in the whole workspace corpus [--download | --affinity | --scripts] show where test corpora live; --download fetches PngSuite into corpus/pngsuite, --affinity the pinned public Affinity documents into corpus/affinity, --scripts the pinned public scripts of xtask/script-corpus.txt into corpus/scripts bundle build dist/VectorCraft.app (macOS) with assets/app-icon/vectorcraft.icns ico ... pack PNGs into a Windows .ico (used by packaging/icons.sh) scripts --pass-rate [--report ] run each script in corpus/scripts headless in a process of its own and report how many pass, as JSON (default target/script-corpus/report-