The Problem

Photographers need a fast, non‑destructive RAW editor that runs on desktop and mobile without the heavyweight footprint of commercial tools. Existing open‑source editors are either UI‑heavy or CPU‑bound, leading to sluggish workflows on large images.

What This Does

RapidRAW delivers a lightweight (≈ 20 MB) editor built on React for the UI, Tauri for native packaging, and wgpu‑driven Rust code for GPU‑accelerated image processing.

  • The UI lives under src/ – e.g. src/App.tsx boots the React tree and src/components/ui/* provide the toolbar, panels and property editors.
  • All image‑processing kernels are in src‑tauri/src/src-tauri/src/image_processing.rs, src-tauri/src/adjustment_utils.rs, and src-tauri/src/ai_processing.rs implement GPU‑based transforms, AI‑assisted masking and denoising.
  • Asset and configuration files (public/, src-tauri/icons/, src-tauri/lensfun_db/) are bundled by Tauri at build time.

How It Is Wired

Entry points – the only top‑level start‑up code is src/App.tsx (React) and the native binary src-tauri/src/main.rs. The Rust main spawns the Tauri event loop and registers commands that the front‑end calls via invoke.

Core call flow (example: opening a RAW file)

  1. src/App.tsx → user selects a file → calls the Tauri command load_image.
  2. src-tauri/src/lib.rs receives the invoke and forwards to src-tauri/src/image_loader.rs::load_and_composite.
  3. load_and_composite calls load_base_image_from_bytes (7 callers) → parses EXIF (src-tauri/src/exif_processing.rs).
  4. The image bytes are handed to src-tauri/src/gpu_processing.rs::run (the only entry that reaches GPU code).
  5. run calls into_cow (four distinct places) which converts the data into a GPU‑friendly buffer, then dispatches WGSL shaders.

Blast‑radius modules

  • src/components/ui/AppProperties.tsx is imported by 59 modules (instability 0.05) – any change ripples widely.
  • src/store/useEditorStore.ts participates in an import cycle with src/store/useLibraryStore.ts (11‑module cycle).
  • src/utils/adjustments.ts contains 802 lines; it is a hotspot for future bugs.

External effects – only a handful of functions touch the OS:

  • src-tauri/src/file_management.rs::resolve_virtual_path and related helpers perform file I/O (74 functions, 12 callers).
  • src-tauri/src/ai_processing.rs::download_model makes a single outbound network request.
  • No persistent database is used; all state lives in memory or the OS file system.

Unmapped wiring – the React component tree (e.g., src/components/panel/right/ExportPanel.tsx) registers callbacks that ultimately invoke Tauri commands, but the static call graph cannot resolve those framework‑driven edges.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/RapidRAW.git
cd RapidRAW

# Install Node dependencies (npm is implied by package.json)
npm ci

# Build the Rust side (Cargo is declared in src-tauri/Cargo.toml)
npm run tauri build   # typical Tauri script; falls back to `cargo tauri build`

No .env file is referenced in the source tree. The only runtime requirement is a GPU that supports wgpu. Running npm run tauri dev launches the development window; the binary produced by npm run tauri build can be distributed for Windows, macOS, Linux and Android (see src-tauri/gen/android/).

Real‑World Use

A photo‑editing pipeline could invoke RapidRAW as a desktop helper:

import { invoke } from '@tauri-apps/api/tauri';

async function editRaw(path: string) {
  await invoke('load_image', { path });
  // UI shows adjustments; user clicks “Export”
  await invoke('export_image', { dest: `${path}.jpg` });
}

The UI handles adjustments while the Rust side streams GPU‑accelerated transforms, keeping UI latency below 30 ms on modern hardware.

Code Health & Issues

Static analysis (104 findings)

  • High – import cycles (11 files, e.g. src/components/ui/AppProperties.tsx, src/store/useEditorStore.ts).
  • High – oversized files (12 files > 800 LOC, e.g. src/utils/adjustments.ts).
  • High – hub module (src/components/ui/AppProperties.tsx with 59 dependents).
  • High – deep nesting (24 files, max depth 6, e.g. src/components/ui/Dropdown.tsx).
  • High – duplicated 6‑line blocks across 57 files.
  • Medium – high branching density (src/hooks/useLibraryActions.ts with 103 branches).

Code‑health audit (8 actionable findings)

  • HIGH – Pin GitHub Action versions to commit SHAs (.github/workflows/*).
  • HIGH – No test suite (148 source files, 0 tests).
  • HIGHcontinue-on-error on correctness step (.github/workflows/lint.yml).
  • MEDIUM – Declare least‑privilege GITHUB_TOKEN permissions (.github/workflows/build.yml).
  • MEDIUM – Enable Dependabot/Renovate for dependency updates.
  • MEDIUM – Add a dependency‑vulnerability scan in CI.
  • MEDIUM – Set persist-credentials: false on checkout steps.
  • LOW – Add timeout-minutes to workflow jobs.

No secrets are committed; CI is present; a license (AGPL‑3.0) exists.

The Bottom Line

RapidRAW is a well‑structured, GPU‑accelerated RAW editor that cleanly separates a React front‑end from performant Rust back‑end code. However, the codebase suffers from large, tightly coupled modules, import cycles, and a complete lack of automated tests, which raises maintenance risk. It is suitable for teams that need a fast, extensible editor and are prepared to invest in refactoring and test coverage.