mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
Shipped code no longer unwraps, expects or panics: every one of the 124 unwrap()/expect()/panic!/unreachable! sites outside tests now handles the failure (Result/Option, ?, let-else, defaults) and reports errors to the user. - Lints: workspace clippy denies unwrap_used, expect_used, panic, todo, unimplemented and unreachable; clippy.toml allows them in tests, and integration tests, examples and testkit opt out explicitly. - Safety net (vectorcraft_engine::guard): a panic in a top-level command rolls the document back and returns EngineError::Internal; a panicking tool is reset; the MCP server answers with an internal error and keeps serving; the UI frame and each control request are guarded. - APIs that hid failures now return them: Rendered::to_png/to_jpeg/to_webp return Result (JPEG/WebP errors used to write empty files), FontDb::face returns Option, Region::top returns Option. - Fuzzing: engine/tests/import_fuzz.rs feeds garbage, hostile and mutated SVG and PDF through import → render → export (30k cases locally, no panics). - Docs: AGENTS.md/CLAUDE.md rule, docs/development.md "Robustness" section, README pointer and a PR template checklist. Co-Authored-By: Claude Opus 5.5 <[email protected]>
84 lines
2.4 KiB
TOML
84 lines
2.4 KiB
TOML
[workspace]
|
||
resolver = "3"
|
||
members = ["crates/*", "apps/*", "xtask"]
|
||
default-members = ["crates/*", "apps/vectorcraft", "apps/vectorcraft-cli", "xtask"]
|
||
|
||
[workspace.package]
|
||
version = "0.1.1"
|
||
edition = "2024"
|
||
license = "MIT OR Apache-2.0"
|
||
rust-version = "1.90"
|
||
repository = "https://github.com/storytold/vectorcraft"
|
||
|
||
[workspace.dependencies]
|
||
# internal
|
||
vectorcraft-geom = { path = "crates/geom" }
|
||
vectorcraft-color = { path = "crates/color" }
|
||
vectorcraft-doc = { path = "crates/doc" }
|
||
vectorcraft-pathops = { path = "crates/pathops" }
|
||
vectorcraft-brush = { path = "crates/brush" }
|
||
vectorcraft-trace = { path = "crates/trace" }
|
||
vectorcraft-text = { path = "crates/text" }
|
||
vectorcraft-effects = { path = "crates/effects" }
|
||
vectorcraft-render = { path = "crates/render" }
|
||
vectorcraft-svg = { path = "crates/svg" }
|
||
vectorcraft-pdf = { path = "crates/pdf" }
|
||
vectorcraft-format = { path = "crates/format" }
|
||
vectorcraft-tools = { path = "crates/tools" }
|
||
vectorcraft-engine = { path = "crates/engine" }
|
||
vectorcraft-ui-egui = { path = "crates/ui-egui" }
|
||
vectorcraft-mcp = { path = "crates/mcp" }
|
||
vectorcraft-testkit = { path = "crates/testkit" }
|
||
|
||
# foundation
|
||
kurbo = { version = "0.13", features = ["serde"] }
|
||
peniko = "0.6"
|
||
thiserror = "2"
|
||
serde = { version = "1", features = ["derive", "rc"] }
|
||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||
log = "0.4"
|
||
proptest = "1"
|
||
|
||
# rendering / formats
|
||
vello_cpu = "0.2"
|
||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp", "gif", "tiff", "bmp"] }
|
||
usvg = "0.48"
|
||
krilla = "0.8"
|
||
skrifa = "0.47"
|
||
harfrust = "0.13"
|
||
linesweeper = "0.4"
|
||
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
|
||
|
||
# ui
|
||
egui = "0.36"
|
||
egui_extras = { version = "0.36", default-features = false, features = ["svg"] }
|
||
eframe = { version = "0.36", default-features = false }
|
||
egui_kittest = "0.36"
|
||
rfd = "0.17"
|
||
arboard = { version = "3.6", default-features = false }
|
||
webbrowser = "1"
|
||
|
||
[workspace.lints.rust]
|
||
unsafe_code = "deny"
|
||
|
||
[workspace.lints.clippy]
|
||
dbg_macro = "warn"
|
||
# VectorCraft never crashes: shipped code returns `Result`/`Option` instead of panicking (see
|
||
# AGENTS.md › Robustness). Tests may unwrap (clippy.toml).
|
||
unwrap_used = "deny"
|
||
expect_used = "deny"
|
||
panic = "deny"
|
||
todo = "deny"
|
||
unimplemented = "deny"
|
||
unreachable = "deny"
|
||
|
||
[profile.dev.package."*"]
|
||
opt-level = 2
|
||
|
||
[profile.dev]
|
||
opt-level = 1
|
||
|
||
[profile.release]
|
||
lto = "thin"
|
||
codegen-units = 1
|