2026-09-30 05:02:08 -04:00
|
|
|
|
[workspace]
|
|
|
|
|
|
resolver = "3"
|
|
|
|
|
|
members = ["crates/*", "apps/*", "xtask"]
|
2026-10-06 20:34:59 -07:00
|
|
|
|
default-members = ["crates/*", "apps/photocraft", "apps/photocraft-cli", "xtask"]
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
[workspace.package]
|
2026-10-17 21:28:00 -04:00
|
|
|
|
version = "0.10.0"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
edition = "2024"
|
|
|
|
|
|
license = "MIT OR Apache-2.0"
|
2026-10-06 21:32:23 -07:00
|
|
|
|
rust-version = "1.95"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
[workspace.dependencies]
|
2026-10-10 16:20:57 -06:00
|
|
|
|
craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "5c874d51eeb3de70e735c8ce87a59a7dedd47675", features = ["serde"] }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
# internal
|
|
|
|
|
|
photocraft-geom = { path = "crates/geom" }
|
|
|
|
|
|
photocraft-color = { path = "crates/color" }
|
2026-10-01 08:25:06 -04:00
|
|
|
|
photocraft-cms = { path = "crates/cms" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
photocraft-raster = { path = "crates/raster" }
|
|
|
|
|
|
photocraft-doc = { path = "crates/doc" }
|
|
|
|
|
|
photocraft-ops = { path = "crates/ops" }
|
|
|
|
|
|
photocraft-psd = { path = "crates/psd" }
|
|
|
|
|
|
photocraft-codecs = { path = "crates/codecs" }
|
2026-10-04 15:43:47 -04:00
|
|
|
|
photocraft-raw = { path = "crates/raw" }
|
2026-10-08 17:42:23 +02:00
|
|
|
|
photocraft-affinity = { path = "crates/affinity" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
photocraft-compose = { path = "crates/compose" }
|
2026-09-30 09:37:18 -04:00
|
|
|
|
photocraft-gpu = { path = "crates/gpu" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
photocraft-paint = { path = "crates/paint" }
|
|
|
|
|
|
photocraft-algo = { path = "crates/algo" }
|
|
|
|
|
|
photocraft-io = { path = "crates/io" }
|
2026-09-30 09:37:18 -04:00
|
|
|
|
photocraft-text = { path = "crates/text" }
|
|
|
|
|
|
photocraft-vector = { path = "crates/vector" }
|
|
|
|
|
|
photocraft-format = { path = "crates/format" }
|
|
|
|
|
|
photocraft-automation = { path = "crates/automation" }
|
2026-10-04 16:08:28 -04:00
|
|
|
|
photocraft-plugins = { path = "crates/plugins" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
photocraft-engine = { path = "crates/engine" }
|
|
|
|
|
|
photocraft-ui-egui = { path = "crates/ui-egui" }
|
|
|
|
|
|
photocraft-testkit = { path = "crates/testkit" }
|
2026-10-05 17:47:59 -04:00
|
|
|
|
photocraft-tablet = { path = "crates/tablet" }
|
2026-10-17 18:55:54 -03:00
|
|
|
|
photocraft-ipp = { path = "crates/ipp" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
# external
|
2026-10-13 05:04:13 +02:00
|
|
|
|
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "3d37da389a3618ab9b76109da11416e9ca4ea719" }
|
2026-10-17 12:02:56 -06:00
|
|
|
|
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "82a24b006eefa036b43c09a67fb9a3fbd17ffe63" }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
thiserror = "2"
|
|
|
|
|
|
serde = { version = "1", features = ["derive", "rc"] }
|
|
|
|
|
|
serde_json = "1"
|
|
|
|
|
|
arc-swap = "1"
|
|
|
|
|
|
bytemuck = { version = "1", features = ["derive"] }
|
|
|
|
|
|
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
|
|
|
|
|
|
image = { version = "0.25", default-features = false }
|
2026-10-10 19:39:57 +02:00
|
|
|
|
# Baseline-JPEG decode of lossy DNG tiles (compression 34892), shared with zune-jpeg.
|
|
|
|
|
|
zune-core = "0.5"
|
|
|
|
|
|
zune-jpeg = "0.5"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
proptest = "1"
|
|
|
|
|
|
eframe = { version = "0.36", default-features = false }
|
2026-10-12 09:26:29 -04:00
|
|
|
|
# Without `default_fonts`, which embeds egui's fonts uncompressed: ui-egui ships them deflated
|
|
|
|
|
|
# (egui_fonts.rs; the web build's size gate).
|
|
|
|
|
|
egui = { version = "0.36", default-features = false }
|
2026-09-30 05:02:08 -04:00
|
|
|
|
egui_kittest = "0.36"
|
|
|
|
|
|
rfd = "0.17"
|
|
|
|
|
|
log = "0.4"
|
|
|
|
|
|
rayon = "1"
|
2026-09-30 09:37:18 -04:00
|
|
|
|
criterion = { version = "0.5", default-features = false }
|
2026-10-04 13:58:59 -04:00
|
|
|
|
getrandom = "0.3"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
[workspace.lints.rust]
|
2026-10-04 11:14:55 -04:00
|
|
|
|
unsafe_code = "forbid"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
|
|
|
|
|
[workspace.lints.clippy]
|
|
|
|
|
|
dbg_macro = "warn"
|
|
|
|
|
|
todo = "warn"
|
|
|
|
|
|
|
|
|
|
|
|
[profile.dev.package."*"]
|
|
|
|
|
|
opt-level = 2
|
|
|
|
|
|
|
|
|
|
|
|
[profile.dev]
|
|
|
|
|
|
opt-level = 1
|
2026-10-10 20:03:30 +02:00
|
|
|
|
# Line tables keep file:line in panic backtraces but drop variable info, which roughly halves link
|
|
|
|
|
|
# time and PDB size for the ~260 test binaries (#2204). CI sets the same through
|
2026-10-11 11:32:35 +03:00
|
|
|
|
# CARGO_PROFILE_DEV_DEBUG (and no debuginfo at all for the Windows tests). To inspect locals in a
|
|
|
|
|
|
# debugger, build with CARGO_PROFILE_DEV_DEBUG=true.
|
2026-10-10 20:03:30 +02:00
|
|
|
|
debug = "line-tables-only"
|
2026-09-30 05:02:08 -04:00
|
|
|
|
|
2026-10-11 06:36:32 +03:00
|
|
|
|
# Test builds compile ui-egui without optimization: its library and unit tests were the biggest
|
|
|
|
|
|
# test-build units after engine's (12.6 of ~63 compile minutes on the Windows CI runner), and its
|
|
|
|
|
|
# tests run no heavier pixel code of their own (that lives in the crates that stay optimized).
|
|
|
|
|
|
# Measured on CI: Windows build 18.9 -> 15.4 min, test run 10.0 -> 10.5. `cargo run` and
|
|
|
|
|
|
# `cargo build` use the dev profile and are unaffected.
|
|
|
|
|
|
[profile.test.package.photocraft-ui-egui]
|
|
|
|
|
|
opt-level = 0
|
|
|
|
|
|
|
2026-09-30 05:02:08 -04:00
|
|
|
|
[profile.release]
|
|
|
|
|
|
lto = "thin"
|
|
|
|
|
|
codegen-units = 1
|
2026-10-05 10:52:20 -04:00
|
|
|
|
|
|
|
|
|
|
# The browser build (apps/photocraft-web, `data-cargo-profile` in its index.html). Hosts cap the
|
|
|
|
|
|
# size of a single file (Cloudflare Pages/Workers: 25 MiB), and the wasm is downloaded on every
|
2026-10-12 09:26:29 -04:00
|
|
|
|
# visit, so this profile optimizes for size: fat LTO, opt-level "z" for PhotoCraft's own crates,
|
|
|
|
|
|
# "s" for dependencies and for the crates that decode files, and 3 for pixel processing (filters
|
|
|
|
|
|
# and compositing). Dependencies stay at "s": at "z" the whole wasm grows (by 0.4 MB, measured).
|
|
|
|
|
|
# panic stays the target default (wasm32-unknown-unknown aborts; AGENTS.md's `panic = "unwind"`
|
|
|
|
|
|
# is for the native app shell). packaging/web/package.sh fails the build above 24 MiB.
|
2026-10-05 10:52:20 -04:00
|
|
|
|
[profile.wasm-release]
|
|
|
|
|
|
inherits = "release"
|
2026-10-12 09:26:29 -04:00
|
|
|
|
opt-level = "z"
|
2026-10-05 10:52:20 -04:00
|
|
|
|
lto = "fat"
|
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
|
strip = "debuginfo"
|
|
|
|
|
|
|
|
|
|
|
|
[profile.wasm-release.package."*"]
|
|
|
|
|
|
opt-level = "s"
|
|
|
|
|
|
|
2026-10-12 09:26:29 -04:00
|
|
|
|
# Decoding and rasterizing keep their speed.
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-codecs]
|
|
|
|
|
|
opt-level = "s"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-raw]
|
|
|
|
|
|
opt-level = "s"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-heif]
|
|
|
|
|
|
opt-level = "s"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-vector]
|
|
|
|
|
|
opt-level = "s"
|
2026-10-12 05:46:49 +02:00
|
|
|
|
|
2026-10-12 11:48:28 -04:00
|
|
|
|
# Large crates off the per-frame and per-pixel paths: the document model, file parsers run once
|
|
|
|
|
|
# per open/save, JSON (settings, presets, control channel), SVG parsing, and shader translation
|
|
|
|
|
|
# (runs when a pipeline is created). "z" keeps the wasm well under the size gate.
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-doc]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-psd]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-format]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-affinity]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.serde_json]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.usvg]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.naga]
|
2026-10-10 20:56:34 -06:00
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
|
2026-10-16 21:38:56 -03:00
|
|
|
|
# The browser UI toolkit favors size to stay within the WebAssembly upload budget.
|
|
|
|
|
|
[profile.wasm-release.package.egui]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.epaint]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
[profile.wasm-release.package.eframe]
|
|
|
|
|
|
opt-level = "z"
|
|
|
|
|
|
|
2026-10-15 18:19:26 -06:00
|
|
|
|
# Pixel processing keeps its speed-oriented optimization level, with two exceptions.
|
|
|
|
|
|
# Colour-management transforms are built once and cached (`transform::cached`), so "z" costs
|
|
|
|
|
|
# little runtime. The browser app composites per frame on the GPU (`crates/gpu`, WebGPU/WebGL2),
|
|
|
|
|
|
# so the CPU compositor is not the browser's hot path there; "z" for compose keeps the wasm
|
|
|
|
|
|
# under the 24 MiB gate (measured −122 KB vs opt-level 3). algo's filters run per pixel on
|
|
|
|
|
|
# every interactive filter application; "z" there is the size lever of last resort (−331 KB),
|
|
|
|
|
|
# taken because the gate is enforced in CI: if browser filters feel too slow, restore 3 here
|
|
|
|
|
|
# and reclaim the bytes from a feature-gated decoder instead.
|
2026-10-05 10:52:20 -04:00
|
|
|
|
[profile.wasm-release.package.photocraft-raster]
|
|
|
|
|
|
opt-level = 3
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-color]
|
|
|
|
|
|
opt-level = 3
|
|
|
|
|
|
[profile.wasm-release.package.photocraft-cms]
|
2026-10-15 18:19:26 -06:00
|
|
|
|
opt-level = "z"
|
2026-10-05 10:52:20 -04:00
|
|
|
|
[profile.wasm-release.package.photocraft-compose]
|
2026-10-15 18:19:26 -06:00
|
|
|
|
opt-level = "z"
|
2026-10-05 10:52:20 -04:00
|
|
|
|
[profile.wasm-release.package.photocraft-algo]
|
2026-10-15 18:19:26 -06:00
|
|
|
|
opt-level = "z"
|
2026-10-05 10:52:20 -04:00
|
|
|
|
[profile.wasm-release.package.photocraft-paint]
|
|
|
|
|
|
opt-level = 3
|
2026-10-12 03:53:52 +02:00
|
|
|
|
|