How geo0451/prokoptas works
Prokoptas converts still images through a shared Rust core, exposed by a native CLI and a browser-facing WebAssembly shell. The main flow is input selection, decoding to a common pixel model, optional image preparation, then encoding and output. The README documents PNG, JPEG and WebP CLI paths, plus broader codec modules in the core. The core processing excerpt imports the format adapters but does not show dispatch calls; those links are therefore dashed. The browser UI’s wiring is not shown in the available evidence.
Main entry points: processing.rs Conversion processing · main.rs Native CLI · main.js Browser UI · lib.rs WebAssembly shell
Components 18
User surfaces
- Native CLI
crates/prok-cli/src/main.rs - Browser UI
web/src/main.js - WebAssembly shell
crates/prok-wasm/src/lib.rs
Conversion core
- Conversion processing
crates/prok-core/src/processing.rs - Format registry
crates/prok-core/src/registry.rs - Codec contracts
crates/prok-core/src/codec.rs
Format adapters
- AVIF adapter
crates/prok-core/src/avif.rs - BMP adapter
crates/prok-core/src/bmp.rs - HEIC decoder
crates/prok-core/src/heic.rs - JPEG adapter
crates/prok-core/src/jpeg.rs - JPEG XL adapter
crates/prok-core/src/jxl.rs - PNG adapter
crates/prok-core/src/png.rs - RAW decoder
crates/prok-core/src/raw.rs - TIFF adapter
crates/prok-core/src/tiff.rs - WebP adapter
crates/prok-core/src/webp.rs
Image model
- Conversion options
crates/prok-core/src/options.rs - Decoded image model
crates/prok-core/src/image.rs
Other components
- User
Connections 18
- User → Native CLI: runs conversion
README.md - Native CLI → Conversion processing: uses shared core
README.md - User → Browser UI: uses browser tool
- Browser UI → WebAssembly shell: invokes shell
- WebAssembly shell → Conversion processing: uses shared core
README.md - Conversion processing → Conversion options: applies options
crates/prok-core/src/processing.rs - Conversion processing → Decoded image model: prepares pixels
crates/prok-core/src/processing.rs - Conversion processing → Format registry: selects formats
- Conversion processing → Codec contracts: uses contracts
crates/prok-core/src/codec.rs - Conversion processing → AVIF adapter: dispatches codec
- Conversion processing → BMP adapter: dispatches codec
- Conversion processing → HEIC decoder: dispatches decoder
- Conversion processing → JPEG adapter: dispatches codec
- Conversion processing → JPEG XL adapter: dispatches codec
- Conversion processing → PNG adapter: dispatches codec
- Conversion processing → RAW decoder: dispatches decoder
- Conversion processing → TIFF adapter: dispatches codec
- Conversion processing → WebP adapter: dispatches codec