Architecture
zphoto is the GUI — a from-scratch image editor delivered as a Tauri v2 desktop app with a cyberpunk HUD. It consumes zphoto-core, the embeddable pure-Rust engine that owns the document and layer model and every pixel and path operation. The defining decision is a single shared layer stack: the Illustrator-style vector commands composite onto the same layers as the Photoshop-style raster commands, rather than maintaining a separate vector document. The split keeps the app layer thin — the desktop GUI, the C FFI, and the Tauri plugin all call the same op surface.
Module map
The engine's source modules (in zphoto-core). Per-command status is derived from source in the port report.
| module | responsibility | status |
|---|---|---|
| model | document + layer stack model — the shared raster/vector compositing surface | implemented |
| ops | command dispatch surface (~55 ops) that the GUI, FFI, and Tauri plugin all call | implemented |
| filter | raster filters — blur · sharpen · noise · distort · stylize · render | implemented |
| fill | solid · gradient · pattern fills over 8/16/32-bit pixels | implemented |
| paint | brush · eraser · clone / heal · smudge · paint primitives | implemented |
| vector | Bézier paths · shapes · strokes / fills · boolean ops on the shared layer stack | implemented |
| text | point / area type · type on a path · rasterize into layers | implemented |
| codec | decode / encode raster formats into and out of the document model | implemented |
| b64 | base64 transport of image buffers across the FFI / IPC boundary | implemented |
| ffi | C FFI surface for embedding the engine outside Rust | implemented |
| tauri_plugin | Tauri v2 plugin exposing the op surface to the desktop GUI and other apps | implemented |
| error | typed error model — unimplemented commands return errors, never panic or silently succeed | implemented |
Roadmap
The port report is the scoreboard: it enumerates the Photoshop / Illustrator command surface (~367 raster + 32 vector) and tracks status per command. Work proceeds area by area, and no command is marked done without a verifiable engine symbol:
- Raster core — document / layer model, blend modes, codecs, and the filter / adjustment / fill / paint command surface across 8/16/32-bit depth.
- Selections & masks — marquee / lasso / wand / color-range selections and layer masks feeding the raster commands.
- Vector on the shared stack — Bézier paths, shapes, strokes/fills and boolean ops that composite onto the same layers.
- Text — point / area type and type on a path, rasterized into layers.
- GUI — the Tauri v2 HUD front end wiring the op surface to interactive editing, via the Tauri plugin.
- Embeds — the C FFI and plugin surfaces so the engine drops into other MenkeTechnologies apps.
Verification policy
Status is never asserted from a roadmap. A command counts as done only when a real, non-stub symbol exists in the engine and the port report can cite it. The engine ships 440+ #[test] functions; tests build documents in memory (no external fixtures) and confirm that every still-unimplemented command returns a typed error rather than panicking or silently succeeding — runnable on headless Linux CI.