ZPHOTO-CORE // ENGINEERING REPORT

// module map · shared raster + vector layer stack · verification policy

Home Tool Audit GitHub
Status: implemented engine. A working pure-Rust library — roughly 371 raster commands and 71 vector commands over one shared layer stack, reached through Engine::invoke(cmd, args) (~55 dispatch ops in ops), exercised by 556+ #[test] functions. This page describes the engine's structure.

Architecture

zphoto-core is the engine behind the zphoto desktop app. The defining decision is a single shared layer stack: Illustrator-style vector commands composite onto the same layers as Photoshop-style raster commands, rather than a separate vector document. Every operation is a string command plus JSON args routed through one surface, Engine::invoke(cmd, args) -> Result<Value>; the host renders the result. Pixels are edited at 8-, 16-, and 32-bit depth with f64 geometry. The same engine is reached natively (Rust), through a C FFI (ffi), and through a Tauri v2 plugin (tauri_plugin).

Module map

The engine's source modules (src/*.rs). All are real, implemented modules.

moduleresponsibilitystatus
libthe Engine type and invoke(cmd, args) command dispatchimplemented
modeldocument + layer-stack model — the shared raster/vector compositing surfaceimplemented
ops~55 dispatch ops the GUI, FFI, and Tauri plugin all callimplemented
filterraster filters — blur · sharpen · noise · distort · stylize · renderimplemented
fillsolid · gradient · pattern fills over 8/16/32-bit pixelsimplemented
paintbrush · eraser · clone / heal · smudge primitivesimplemented
vectorBézier paths · shapes · strokes / fills · boolean ops on the shared layer stackimplemented
textpoint / area type · type on a path · rasterize into layersimplemented
codecdecode / encode raster formats into and out of the document modelimplemented
b64base64 transport of image buffers across the FFI / IPC boundaryimplemented
ffiC FFI surface for embedding the engine outside Rustimplemented
tauri_pluginTauri v2 plugin exposing the command surface to the desktop GUI and other appsimplemented
errortyped error model — unknown/unimplemented commands return errors, never panic or silently succeedimplemented

Roadmap

Per-command coverage of the Photoshop / Illustrator surface (~371 raster + 71 vector) is tracked, source-derived, in zphoto's port report; no command is marked done without a verifiable engine symbol. Work proceeds area by area:

  1. Raster core — layer model, blend modes, codecs, and the filter / fill / paint command surface across 8/16/32-bit depth.
  2. Selections & masks — selections and layer masks feeding the raster commands.
  3. Vector on the shared stack — paths, shapes, strokes/fills, boolean ops compositing onto the same layers.
  4. Text — point / area type and type on a path, rasterized into layers.
  5. Embeds — the C FFI and Tauri plugin surfaces so the engine drops into the desktop GUI and 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 and the port report can cite it. The engine ships 556+ #[test] functions; tests build documents in memory (no external fixtures) and confirm that unimplemented commands return a typed error rather than panicking or silently succeeding — runnable on headless Linux CI.