Skip to content

Latest commit

 

History

History
535 lines (496 loc) · 132 KB

code-map.md

File metadata and controls

535 lines (496 loc) · 132 KB

Code map

Use this page to find an implementation or decide where a change belongs. Read architecture.md for ownership rules, concurrency invariants and compatibility constraints. Paths below are relative to this document and clickable. Module roots (mod.rs) define their public API; implementation helpers generally remain private to their domain. Besides the app (src/) and the domain crates described in architecture.md (model, interop, catalog, engine, decode and export, under crates/), the workspace has crates/rawmakase-protocol (what the app and its control clients agree on: protocol version, control.json endpoint, data folder) and tools/rawmakase-ctl (the control client, used by rawmakase control, rawmakase mcp and the standalone rawmakase-ctl). The last two build without the app.

Where to start a change

Work Start here Related work
Add a develop adjustment Recipe, pipeline Inspector, XMP application, format migration and rendering regressions
Change preview quality or detail Quality rendering Worker renderer, region/fit/export consistency tests
Support another XMP setting Parser, application stages Recipe validation and XMP tests; library discovery stays in presets
Change preset discovery/import Preset library Preset browser UI and shared asset paths
Add DCP support DCP reader, profile model Camera matching, validation, reference rendering
Change JPEG, TIFF or PNG output Export, metadata Export tests, the recorded sRGB fixtures (srgb_fixtures.rs); UI captures a recipe before starting
Change an export colour space OutputSpace, finish_color_in in pixel.rs, output_profile The profile tests in color_management.rs, export_image.rs's and wide_gamut_tests.rs's; sRGB must stay byte-identical (export color spaces)
Change native catalog behavior Catalog API, schema Models, catalog tests, library UI
Improve Lightroom import Importer, Develop translation Preservation tests and unsupported-setting reporting
Change autosave or saved formats Save policy, background saver, legacy sidecars, format migration Catalog edits, native presets and persistence tests
Change navigation or async behavior Workflow, events, task lifecycle History, state reset and app regression tests
Add a command-line operation CLI Call domain APIs directly; keep the operation usable without an editor

Entry points and decoding

File Responsibility
src/app/develop/camera_thumbnail.rs The camera thumbnail view in Develop: the embedded JPEG, read once per photo off the UI thread, in place of the photo and labelled (a Compare view, Shift+\).
src/app/develop/camera_look.rs Profile → Fit Camera Look: the fit as an app task (generation, cancel flag), applied as one History step unless a newer fit or another profile came meanwhile.
src/main.rs CLI argument parsing and command dispatch; starts the desktop application when no subcommand is selected.
src/lib.rs The module list. The library serves the binary, examples and tests; it is not a stable public API.
crates/rawmakase-decode/src/photo.rs Opens a photo for developing: Raw::open_file's facts, then embedded lens tables, a DNG's profile, baseline exposure, colour matrix and crop, and the imported lens profiles that fit. open_source converts a rendered file (JPEG, PNG, TIFF) to its pseudo-scene with develop::rendered. camera_exif is the camera's EXIF of any photo, which exports (and the CLI's) carry: exif::read's, else a CR3's, MRW's or X3F's from raw::camera_exif. raw_xmp is the XMP a CR3's camera embeds (raw::embedded_xmp), which the catalog reads as a JPEG's.
crates/rawmakase-decode/src/dev/fingerprint.rs A RAW file's decode fingerprint (rawmakase fingerprint): whether it opens and unpacks, sizes, crop, orientation, white balance, matrix, levels, CFA and a hash of the unpacked data, read as development reads them. scripts/corpus/dataset-fingerprints.py compares the test dataset's against tests/corpus/dataset/.
crates/rawmakase-decode/src/dev/half_check.rs A RAW file's half-size check (rawmakase half-check): its half-size decode against its full decode reduced (block CIEDE2000, Laplacian detail) and its half ÷ full time, with the gates against the file's recorded reference. scripts/corpus/dataset-half.py runs it on the test dataset.
crates/rawmakase-decode/src/color_difference.rs CIELAB of linear sRGB and CIEDE2000, which Camera Look's fit and the half-size checks measure with.
crates/rawmakase-decode/src/camera_look/ Camera Look (fitted), rawmakase fit-look (Lightroom profiles): pairs picks and converts the embedded JPEG, aligns it with the photo's small render and masks what can't be learned; solve fits the look's curve and table and, for a camera without a matrix, a forward matrix from the camera input stage; gate scores full renders on held-out tiles and accepts or refuses. with_default is the default fit of a photo without colour data, through the fit cache (cache); fitting is deterministic and reads no catalog.
crates/rawmakase-decode/src/raster.rs Opens a JPEG, PNG, TIFF, WebP, AVIF, HEIF or JPEG XL (by content, whatever the extension): for an unedited one in the Library, decoded upright and converted from the embedded ICC profile (16-bit samples at 16 bits) to 8-bit sRGB through moxcms, for the Library's thumbnails, screen previews and Loupe. A file without a usable RGB or grey profile is taken as sRGB. open is the Develop decode, crate-private and reached only through photo::open_source, which converts its result to the pseudo-scene: the same setup, converted to linear ProPhoto D50 f32 into a CameraImage marked Source::Rendered (identity white balance and matrix, EXIF camera and exposure when present, alpha dropped); CMYK and other colour spaces, HDR (CICP transfer PQ or HLG), animated files, tiled AVIF and HEIF without a system decoder are refused with Unsupported, which probe finds from the header and profile alone; HDR and animated files still give the Library a plain preview (an HDR one tone mapped to SDR from its 203-nit reference white), a tiled AVIF none. dimensions reads a file's size through the same decoder, for catalog_session/backfill.rs. Its EXIF comes from rawmakase-interop, which the decode crate depends on directly.
crates/rawmakase-decode/src/raster/jxl.rs A JPEG XL file through jxl-oxide's image decoder, which renders it upright by its codestream, so no EXIF rotation is applied after it.
crates/rawmakase-decode/src/raster/av1.rs The safe side of rav1d (dav1d in Rust, built without assembly): one AV1 still decoded to its planes; a cut-off stream is an error, not a wait.
crates/rawmakase-decode/src/raster/avif.rs An AVIF still: its container read by isobmff, its AV1 decoded by av1 and turned into RGB with the matrix and range the file says (yuv); colour from the colr boxes (ICC, or CICP), sRGB when it has none; 10- and 12-bit 4:2:0 chroma is upsampled here (deep420_to_rgb), as yuv's ARM code for it is wrong. What it shares with heic is in heif.rs.
crates/rawmakase-decode/src/raster/heif.rs What AVIF and HEIC files share as HEIF images: an item's colour (ICC, or a profile built from its CICP code points), its orientation from irot and imir, and widening decoded samples.
crates/rawmakase-decode/src/raster/heic.rs A HEIC still from its header, read by isobmff: a single picture or a grid's tiles, its size and clap crop, colour (the image's or its first tile's colr), orientation, and refusals for Develop (HDR, sequences); header reading is bounded (associations no more than items, each tile and each hvcC read once, an hvcC of at most 16 KiB) and the tiles, with an alpha image's, are held to 150 MP. Its pixels come from heic/imageio on macOS, heic/wic on Windows and heic/libheif elsewhere; heif_decoder says whether the system can decode them, or what to install; before any decoder reads them, every picture's data, the alpha's too, must be in the file, together (each stored location once) no larger than it, and the pictures at the size their SPS code them (in a tile's hvcC or among its NAL units, padding and all) may take no more than 150 MP together; they are cropped here, unless the decoder cropped them, and any other size is refused before it is allocated.
crates/rawmakase-decode/src/raster/heic/imageio.rs A HEIC's pixels on macOS: the primary image decoded by ImageIO, from the bytes of the file the header was read from, and drawn by CoreGraphics into a bitmap of the colour space and depth the header says (CoreGraphics' own PQ or HLG space for an HDR CICP; sRGB for a profile moxcms or CoreGraphics can't read as RGB), in an autorelease pool, decoded when it is made and refused if it doesn't draw (ImageIO decodes lazily, and a failed decode drew a black photo), unless, transparent everywhere, its decoded pixels are there; alpha comes out composited over black; not turned, and cropped by heic.rs unless ImageIO cropped it.
crates/rawmakase-decode/src/raster/heic/wic.rs A HEIC's pixels on Windows: decoded by Windows Imaging Component (Microsoft's HEIF Image and HEVC Video Extensions) through the handle of the file the header was read from and converted to RGB of the header's depth; when it fails, the error gives WIC's reason and says what to install if no HEIC photo opens. Not turned; cropped by heic.rs unless WIC cropped it.
crates/rawmakase-decode/src/raster/heic/libheif.rs A HEIC's pixels on Linux and other systems: the system's libheif, opened with dlopen when first needed and kept open, decodes the bytes read through the header's open file, uncropped and unturned, to RGB of the header's depth (alpha dropped); without libheif or its HEVC decoder, the error says what to install. Not turned; cropped by heic.rs. As the process exits, before libheif's destructors (which crash its threads mid-decode), no decode starts and those running are waited for, up to 2 s; one still running then ends the process at once (status 1) rather than run the destructors under it.
crates/rawmakase-decode/src/raster/hevc.rs A HEIF item's HEVC configuration (hvcC): its depth and chroma, read from the header (at most 16 KiB), and the size each SPS codes the picture at, there or among an item's NAL units.
crates/rawmakase-model/src/ids.rs Typed catalog row ids: photo, folder, root and collection, each stored and serialized as its integer.
crates/rawmakase-interop/src/edits.rs The edit a photo develops with: its saved edit, else its Lightroom edit, else the raw defaults. Export, Sync and Library preview builds resolve a record at once (resolve, strict: an edit that can't be read is an error). Develop's staged open and Library previews hold a Start, the source chosen once (saved, Lightroom, raw defaults, a preview's recipe JSON or Adobe Default) and resolved when the photo's metadata and profiles are known; each caller keeps its own policy for errors and warnings. The catalog's catalog/edit_records.rs reads the stored records.
crates/rawmakase-decode/src/decode.rs A photo's full-size image: the decode cache's copy, else a decode with highlights recovered and stored; Develop, prefetch, Reference View and export differ only in their DecodePolicy.
crates/rawmakase-decode/src/decode_cache.rs Disk cache of developed camera images and their highlight recovery, keyed by file identity, demosaic setting and build. source_key is the shape every cache made from a file's contents uses (the file's identity, the cache's own part, the build): decodes, AI Denoise results and Camera Look fits. Clones share a live size limit and folder. Its trim, purge and relocation take a Namespace (subfolder and extension), which the AI Denoise cache reuses.
crates/rawmakase-decode/src/ai/denoise.rs AI Denoise's side of decoding, with no model knowledge: PackedBayer, the visible mosaic as four RGGB planes (one mirrored row or column aligns another layout; Raw::packed_bayer in raw/mod.rs demosaics an X-Trans mosaic, takes its white balance off and samples it again as RGGB), with the clipped-sample flags; assemble, the camera image from the model's output, white balanced as development balances the mosaic, the plain demosaic within 8 px of a clipped sample, feathered over 8 more, and where tiles are not done yet; AiBase, how export and the app ask for a photo's complete source (AiService, Refusing).
crates/rawmakase-decode/src/ai/cache.rs Disk cache of AI Denoise results: subfolder ai-denoise of the cache directory, or RAWmakase AI Denoise in a chosen folder, extension .aidenoise, 10 GB cap by default; the model's output with its gain applied at half precision, with the packed layout and clipped flags, checked finite when stored and loaded.
crates/rawmakase-model/src/model/recipe.rs A photo's develop settings as saved: defaults, validation, profile selection and white balance controls, and the local edits saved beside them. valid.rs is a recipe known to be valid, which render entry points take; panels.rs the per-panel switches; hdr.rs High Dynamic Range's mode, limit and SDR rendition, with the one guard that refuses an edit with HDR on until it renders.
crates/rawmakase-model/src/model/camera_raw.rs Camera Raw's keys for the recipe's sliders, named once: key, Lightroom's units per recipe unit and preset group, which XMP reading and writing, presets and a look's settings use.
crates/rawmakase-model/src/model/params.rs, edit.rs, settings_groups.rs The sliders as parameters (ids, ranges, formatting, the Basic slider keys' Lightroom steps), the rules an edit follows (the white balance a changed Temp or Tint gives, which panel a change turns on), and the setting groups Copy Settings, Sync and presets move between photos.
crates/rawmakase-model/src/model/effects.rs The Effects, Detail and Calibration settings a recipe keeps (curves, grading, grain, vignettes, Defringe, noise reduction), their defaults, validation and the Effects panel's reset. Rendering them is in develop/effects.rs.
crates/rawmakase-model/src/model/point_color.rs Point Color swatches as a recipe stores them, in Camera Raw's units: the sampled color, shifts, Variance and ranges, which swatches Camera Raw accepts, and their crs:PointColors text form. Selecting and changing colors, and the dropper, are in develop/point_color.rs.
crates/rawmakase-model/src/model/red_eye.rs Red Eye and Pet Eye corrections as a recipe stores them: the ellipse, Pupil Size, Darken and the catchlight, with their limits, the ellipse geometry the tool draws and edits, and the list that keeps corrections from a later release in place. Rendering and pupil detection are in develop/red_eye/.
crates/rawmakase-model/src/model/retouch.rs Heal and Clone operations as a recipe stores them: mode, spot or brushed shape, feather, opacity and source offset, with their limits and edits (move, resize). Rendering and source search are in develop/retouch/.
crates/rawmakase-model/src/model/image_frame.rs Image space: positions normalised to the oriented photo before lens correction, Transform and crop, where masks, spots and red eye corrections are kept, and how they map to decoded pixels.
crates/rawmakase-model/src/storage/mask_assets.rs The store of raster mask coverage by content ID: unsaved rasters, the catalog-backed loader, limits and eviction of saved ones.
crates/rawmakase-catalog/src/catalog/mask_assets.rs Storing a save's or snapshot's rasters with its rows, the loader over the bitmaps table, and the raster-mask check of the catalog's format.
crates/rawmakase-inference/ The selection models' and AI Denoise's pinned contracts (manifest.rs; DenoiseSpec RAWNIND with its files, tile, providers and the one credit text, RAWNIND.attribution), AI Denoise's tiler, gain fit and deep-shadow correction (denoise.rs), prompt and tensor mappings (process.rs), automatic Subject and Sky from what the models said (auto.rs), reading the panoptic model's answer (panoptic.rs), edge refinement (refine.rs) and the lazily loaded ONNX Runtime sessions: Subject's three networks, Sky's one and AI Denoise's Denoiser (runtime.rs, including the CPU/CUDA/CoreML provider choice). Sky's ONNX file is written by scripts/models/export_upernet_sky.py.
crates/rawmakase-remote/ Optional remote selection (docs): the bounded length-prefixed JSON protocol (protocol.rs), the client the app uses instead of its local session (client.rs) and the worker — one engine trait, the real Model over inference with its two-photos' analysis cache, and the connection loop (server.rs, binary rawmakase-remote-worker).
src/app/develop/tools/subject_mask/ Select Subject / Sky / Background: requests and their guards (mod.rs), the Select tiles, setup card, click-refining overlay (ui.rs), the threads installing and removing the model packs, AI Denoise's included (models.rs; the install itself is src/model_install/) and the inference thread with its per-photo analysis, local or over the configured remote worker (worker.rs).
src/app/develop/ai_denoise.rs AI Denoise in the app: the open photo's request and result (Photo) and their Develop wiring, the Library's Loupe showing a finished result (cached_loader), and the user's cache for the command line (user_ai_denoise_cache). The service is src/ai_denoise/. Tests in ai_denoise_tests.rs.
crates/rawmakase-model/src/model/masks.rs Masks as a recipe stores them: groups of brush, gradient and range components with their local adjustment, Amount and visibility, and their limits. Rendering their weights is in develop/masks/.
crates/rawmakase-model/src/model/transform.rs The Transform panel's settings as a recipe stores them: the manual sliders, Upright's mode with its analysed corrections and Guided guides, and Lightroom's guides read from older edits. Rendering, analysis and solving are in develop/geometry.rs, upright.rs and guided.rs.
crates/rawmakase-model/src/model/white_balance.rs Fallback illuminant and as-shot temperature estimation from a RAW's metadata, Lightroom's named white balance presets, and the Temp and Tint of rendered files: the white balance they render (rendered_white_balance) the gains it gives greys (rendered_gains), and the Temp and Tint that render the eyedropper's or Auto's colour neutral (rendered_controls).
crates/rawmakase-model/src/model/operators.rs Values shared by the operators that render a recipe: the Sharpening sliders' defaults.
crates/rawmakase-model/src/camera_data.rs What a camera captured, as values: a RAW's metadata as RAWmakase keeps it, the demosaic and decode choices, and the decoded camera-space image. No native code, so modules above it need not reach the RAW decoders.
crates/rawmakase-decode/src/raw/mod.rs RAW files read by RAWmakase's own decoders (own): their metadata, development into camera-space images, the unpacked sensor data and levels for fingerprints, oriented embedded thumbnails; and, for export file names, the make and model a RAW file writes before RAWmakase names its camera (file_camera_names, for a CR3 and other files whose EXIF isn't read) and the maker spelled as RAWmakase spells it (maker_name); for files exif::read can't read, a CR3's, MRW's or X3F's camera EXIF (camera_exif, the TIFFs rawmakase_raw::exif_tiffs finds, read by exif::read_tiffs), their capture time (capture_time), a CR3's embedded XMP (embedded_xmp) and the date tags of a CRW's export (capture_date_tags); and an X3F's photo info and names, which RAWmakase reads without decoding it (undecoded: its preview's EXIF, else its property list, by exif::photo_info's and camera_names' rules), for the backfill and file_camera_names. No unsafe code.
crates/rawmakase-decode/src/raw/own.rs RAWmakase's own decoders behind Raw: the file read into memory, rawmakase-raw's facts mapped to the header Raw is made of, its sensor data to what fingerprints and development read. Every photo the app opens goes through it.
crates/rawmakase-decode/src/raw/lens.rs Bounded reader for the built-in correction data in the RAW container: Fujifilm's and Sony's tables, Olympus/OM System's and Panasonic's distortion models and lateral CA, Nikon's distortion, vignetting and lateral CA models (and Coolpix tables), Samsung's distortion and lateral CA models, sampled at the decoded image's radii, into the model's optics::LensCorrection; photo::open puts it in the metadata. See lens corrections.
crates/rawmakase-raw/src/lib.rs RAWmakase's own RAW decoders in pure Rust: open (header facts), preview (embedded JPEG or JPEG XL), decode (sensor data), capture_dates (a CR3's, CRW's, MRW's or X3F's capture dates, read from the few parts of the file that hold them), exif_tiffs (where a CR3, MRW or X3F keeps its camera's EXIF, as TIFFs of their own, read the same way), embedded_xmp (the XMP packet a CR3's camera writes in its own uuid box, that box read alone), preview_from_file (the embedded preview for a thumbnail read in pieces, without the sensor data, for files on network volumes: only in formats whose previews read this way matched the whole-file ones, and None for a preview smaller than asked for; partial.rs), x3f_metadata (an X3F's preview EXIF and the camera and exposure in its property list, which the SD9 and SD10 write instead; none when a section holding them can't be read), the variant selector, codecs, containers, maker notes (vendor), and file_camera_names/maker_name for export file names (the file's own make and model, kept in RawInfo::file_make/file_model by names::apply before it names the camera). See RAW decoding.
crates/rawmakase-raw/src/container/nef.rs Nikon NEF and NRW: the raw directory, which encoding and layout its data has, the header facts, levels and preview, and the decode.
crates/rawmakase-raw/src/vendor/nikon.rs Nikon maker notes: white balance and presets, black level, lens ID, crop, ISO, linearization table, preview, and the decryption of encrypted blocks.
crates/rawmakase-raw/src/codec/nikon.rs Nikon's Huffman-coded NEF data, lossless and lossy, with its measured tables and curves.
crates/rawmakase-raw/src/codec/nikon_sraw.rs Nikon's small RAW: luma and chroma pairs converted to RGB through the measured tone curve.
crates/rawmakase-raw/src/codec/nikon_he.rs Nikon's High Efficiency raws (JPEG XS): RAWmakase's decoder, read by container/nef.rs. Pure Rust, no unsafe code.
crates/rawmakase-decode/src/color_management.rs The profile each export colour space embeds (output_profile: assets/srgb.icc, and the CC0 assets/AdobeCompat-v2.icc and assets/ProPhoto-v4.icc, checked against OutputSpace's conversion with moxcms) and the transform of 8-bit sRGB to a monitor ICC profile with black-point compensation, in pure Rust; tested against Little CMS's recorded results (tests/data/monitor). See color pipeline.
crates/rawmakase-model/src/color/mod.rs Shared matrix and sRGB transfer primitives.
crates/rawmakase-model/src/color/output.rs OutputSpace, the colour spaces an export is written in (sRGB, Adobe RGB (1998), ProPhoto RGB): each one's matrix from linear sRGB, transfer curve, luminance weights and names. See export color spaces.
src/comparison.rs Reference-image comparisons and reproducible resolved-recipe output using the normal development APIs.
crates/rawmakase-decode/src/demosaic.rs RAWmakase's own demosaicing of the unpacked sensor data (Bayer and X-Trans) and its half-size drafts. See demosaicing.
crates/rawmakase-decode/src/demosaic/xtrans.rs The X-Trans half of the demosaic: directional candidates blended by colour-difference smoothness and luminance change along each direction.
crates/rawmakase-decode/src/demosaic/stripes.rs After the X-Trans demosaic: finds stripes too fine for X-Trans's red and blue samples and replaces their false colour with the mean colour along the stripes, keeping luminance.
crates/rawmakase-model/src/cameras.rs The camera table, data/cameras.toml: per-model baseline exposure, with the same-make fallback, per-unit white-balance calibration references, and the names Adobe's profiles use for cameras the decoders name otherwise (data/adobe-camera-names.toml). See camera table.
crates/rawmakase-model/src/dng.rs The rendering hints a DNG carries: embedded camera profile, baseline exposure, default crop, default user crop and opcode lens corrections.
crates/rawmakase-cancel/src/lib.rs Cancel: a borrowed request to stop long-running work (the owner's flag, or Cancel::NEVER), read at the work's own cancellation points; a leaf crate.
crates/rawmakase-tiff/src/lib.rs Minimal bounded TIFF directory reader for RAW containers (ARW, DNG, the TIFF inside RAF), and the TIFF field types: a leaf crate, re-exported as model::tiff.
crates/rawmakase-interop/src/jpeg.rs Walks a JPEG's marker segments up to the image data: embedded XMP and EXIF, and where an export inserts its XMP.
crates/rawmakase-interop/src/exif.rs The camera's own EXIF read from a RAW, JPEG, TIFF, PNG, WebP, AVIF, HEIF or JPEG XL (for exports, capture times and photo info, and with the Software exports leave out, read_for_names, for file names; read_tiffs reads it by the same rules from the TIFFs RAWmakase's RAW decoders find in a CR3, MRW or X3F, and capture_time_of applies the capture time's fallbacks to the dates raw::capture_time reads from these containers), and the names of the EXIF, TIFF and GPS tags RAWmakase uses; maker notes and offsets into the RAW are left out. exif/sequence.rs reads a maker note alone, in place (Tiff::part), for Auto-Stack's Group camera bursts: the sequence a Sony, Fujifilm, Panasonic, Apple, Canon, Nikon or Olympus/OM System camera says a photo is in (sequence: a burst id, a frame number, continuous drive with no number, or a single shot), from the note in its EXIF, an Adobe DNG's private data (its MakN block, or a Panasonic's Pano block's JpgFromRaw) or a CR3's CMT3 box; SEQUENCE_VERSION names what it reads, so catalogs read files again when it learns more; with a test-support fixture.
crates/rawmakase-interop/src/isobmff.rs Bounded reading of ISO base media files: the boxes of a HEIF (AVIF or HEIC) or a JPEG XL container, and a HEIF's items with their locations (in the file or its idat), properties (av1C, hvcC, clap and the colour and transforms) and references (EXIF, XMP, the primary image, a grid's tiles).
crates/rawmakase-interop/src/riff.rs Bounded reading of a WebP file's RIFF chunks: their kinds and where their bodies are, and a chunk's body on request (EXIF, XMP, ICC).
src/diagnostics.rs The system report for bug reports (Report an Issue…, rawmakase system-info): the build (version, commit and target from build.rs, RAW decoder), the system probed once (installation, full OS version, kernel, desktop and display server on Linux, CPU threads; a failed probe leaves only its line unavailable, the installation within 10 s) and the window's facts; untrusted text cleaned and bounded, and withheld whole when it may name a path (or, from the environment, holds the login name); the new issue URL.
crates/rawmakase-model/src/time.rs Calendar dates from Unix time, without a date library.
src/updates.rs Release checks against GitHub, whether this install may replace itself, and the signed download and install (through fastframe-update).
src/platform/mod.rs, network.rs, volume.rs, reveal.rs, web.rs OS integration: Linux GVFS/FUSE path bridge, which drive a path is on (from the file system's mount: macOS statfs and the volume's name, Linux mountinfo's longest mount point, Windows GetVolumePathNameW, the label and, for a local drive, the serial number that tells two disks at one drive letter apart; or from the path alone where it can't be found), showing a file in the file manager, opening web pages.
src/platform/titlebar.rs The macOS header: viewport-scoped mouse-down capture, consumed once for Zoom/Minimize or passed unchanged to native dragging; no current-event lookup, native-strip split or movable-state override (#616). Fill remains native; off macOS, fastframe owns the widget.
src/platform/preview_reads.rs Whether a RAW is shown from its embedded preview read alone (rawmakase-raw's preview_from_file): on network volumes (rawmakase-fs's VolumeFacts::local, asked once per folder off the UI thread), or as RAWMAKASE_PREVIEW_READS (auto, always, never) says. Library thumbnails use it; anything not found that way, or in a format not read in pieces, is read whole.
src/platform/memory.rs The computer's physical memory (macOS NSProcessInfo, Linux sysinfo, Windows GlobalMemoryStatusEx), for the Library's edited previews to render no more side by side than it holds.
src/platform/locale.rs The user's region's decimal separator (macOS NSLocale, Windows GetLocaleInfoEx; elsewhere ., as reading the environment's locale would need the process-wide setlocale), which file names take once per scope for an Exposure's aperture, as Lightroom writes it.
src/platform/trash.rs, trash/macos.rs, trash/windows.rs, trash/freedesktop.rs SystemTrash, the Trash file operations put photos in, failing closed: a receipt naming where the file went, or the file where it was (Unsupported where its volume has no Trash). macOS's NSFileManager trashItemAtURL, needing the resulting item; Windows' IFileOperation with a progress sink that refuses a delete the Recycle Bin wouldn't take and keeps the recycled item; elsewhere the freedesktop Trash, written here (home Trash on its device, else the mount's .Trash/$uid or .Trash-$uid; .trashinfo first, then rawmakase-fs's exclusive rename). supports says whether a drive has a Trash without trying or making anything (Yes, No, Unknown; only a sure No may refuse a plan): macOS by the Trash URLForDirectory names for it on its own volume (never No: a volume whose .Trashes isn't made yet answers as one without), Windows by drive type (removable, network, CD and RAM drives: No; fixed: Unknown), freedesktop by a dry run of the steps the Trash would take.
src/platform/display.rs, src/app/shell/display.rs, src/app/preferences/monitor.rs The Monitor profile choice and the profile renders convert to; the system's display profile (Windows GetICMProfileW, skipped while advanced color is active); macOS Metal surface color declaration and its paint-time hook: sRGB matched by Core Animation when following the system, unmanaged device RGB for sRGB or a chosen profile.

Development and rendering

File Responsibility
develop/mod.rs Public rendering API and exports of Recipe, Geometry and Rendered.
develop/export_image.rs ExportImage: an export's pixels with their colour space, which only render_export makes in a space other than sRGB; the buffer never leaves it as a Rendered, so a buffer is never written with another space's profile.
recipe.rs What rendering makes of a recipe: the measured manual Vignetting and Denoise, AI Denoise's blend (with the source captured when the render started) then colour and luminance noise reduction, with their execution on the camera image.
ai_denoise.rs AI Denoise in rendering: AiSource, a photo's result with highlights recovered on its own, equal only to itself (by pointer), and AiBlend, plain + amount × (ai − plain) before manual noise reduction. The engine never computes or fetches a source.
raw_defaults.rs Raw defaults: the master and per-camera choices (Adobe Default, Camera Settings, RAWmakase Default or a preset), and resolving a photo's starting settings with a fallback note. See raw defaults.
geometry.rs Crop, orientation, rotation, flips, straighten, output sizing and coordinate mapping.
orientation.rs Rotate and Flip on the photo as shown, keeping the crop and straightening on the same part of the photo.
image_space.rs Image space's mapping to and from the view, including the lens distortion inverse. The frame itself is model/image_frame.rs.
retouch/mod.rs Heal and Clone operations (spots and brushed areas), validation and Visualize Spots.
retouch/heal.rs Rendering one operation on linear camera pixels: feathered coverage, Clone, and Heal's multigrid membrane solve in log values.
retouch/layer.rs The retouched image (red eye corrections, then Heal and Clone): built at once for exports, updated in dirty 256-pixel tiles for previews.
red_eye/mod.rs Red eye corrections (Lightroom's ellipse with semi-axes and correlation), validation, and reading saved ones leniently.
red_eye/detect.rs Finding the red (or, for Pet Eye, glowing) pupil inside the circle dragged over an eye.
red_eye/render.rs Rendering one correction on linear camera pixels (Red Eye's dark neutral, Pet Eye's black and catchlight), fitted to Camera Raw 18.7.
retouch/search.rs Automatic source selection on a reduced neighbourhood: border match, texture, clipping and overlap scores.
masks/mod.rs Mask groups, components (brush, gradients, ranges), local adjustments, validation and the overlay weights.
masks/eval.rs Mask weights for a rendered region: tracing pixels to image space, combining components, caching brush rasters.
masks/brush.rs Brush strokes rasterised in image space (flow, density, erase, Auto Mask).
masks/range.rs Color Range and Luminance Range weights from developed Oklab colours.
masks/local.rs A mask's sliders as per-pixel deltas, and where each acts in the pipeline.
pipeline/ The CPU pipeline, one module per seam: colour conversions, per-pixel stages (S1–S5 of the scene tone stage and their PixelOutput taps), tone preparation (the curve tables and the photo's measures), sampling, the fringe and neutral pickers, image fields (exposure ramp, vignetting, lens warp), GPU parameters and render entry points (including the per-sample region renderer).
scene_tone/ The scene tone stage (S3) on linear ProPhoto: global.rs the white point, Whites and Blacks and masks' Whites and Blacks from the measured tables (white3.bin, white.bin, default_black.bin, blacks.bin, masks.bin), negative Dehaze in mod.rs, haze.rs positive Dehaze's haze model (airlight and density from the measurement copy), and measures.rs the PhotoMeasures they read and Measured, what the stage cache keeps of them with the haze, the Contrast pivot, the copy's camera colour and the Shadows/Highlights map's base. See scene tone stage.
rendered.rs A rendered file's pseudo-scene: the inverse of Camera Raw's default rendering, applied once when the file opens.
basic_tone.rs, basic_tone_data.rs Contrast after the profile curve, as Camera Raw's measured curve at the photo's pivot, and the measured tables. See tone controls.
parametric.rs, parametric.bin The parametric tone curve (Shadows, Darks, Lights, Highlights and the splits) as measured Camera Raw curves, and the measured tables. See tone controls.
tone_lut.rs The sampled tone curve that Contrast and the parametric curve build, applied DNG RGBTone fashion.
local_tone.rs, local_tone_data.rs, local_tone_rule.rs, local_tone_rule_data.rs, shadow_context.rs Shadows and Highlights in the scene tone stage: a guided-filter base level on the photo's measurement copy. Positive Shadows and negative Highlights read a curve computed per photo by the global rule (local_tone_rule.rs: a small network from histogram descriptors of the base level, fitted to Camera Raw on mosaic probes and training photos, scripts/corpus/scene-tone-rule.py); negative Shadows and positive Highlights keep the fitted tables (with Dehaze's), and the regional level, the scene-context key and the Highlights tail's fine mean remain for those paths. The map also carries Clarity's gain.
clarity.rs, clarity_data.rs Clarity in the scene tone stage: detail at four edge-aware scales on the map's grid, weighted by fitted tables. See tone controls.
luminance_noise.rs Adaptive multiscale luminance noise reduction on the full camera image, before retouching and the preview pyramid.
texture.rs Texture on the camera image before the scene tone stage: a Laplacian pyramid of each channel's log, fitted to Camera Raw. See tone controls.
laplacian.rs One channel of a Laplacian pyramid (5-tap binomial reduce and expand), shared by Texture and luminance noise reduction.
color_mixer.rs, color_mixer_chart.bin HSL mixer, Saturation and Vibrance as measured hue/saturation/value lookups. color_mixer.bin, the earlier photo-measured tables, is no longer rendered; scripts/corpus/color-mixer.py still reads it. See color mixer.
point_color.rs Point Color swatches as Camera Raw stores them, their validation and text form for XMP and catalogs, and the fitted operator in HSV of linear ProPhoto RGB (develop.wgsl's point_colors on the GPU). See color mixer.
color_grade.rs, color_grade_curves.rs Color grading: Camera Raw 18.7's per-channel curves (color_grade_curves.bin).
upright.rs Upright analysis: vanishing points from straight lines, giving Level, Vertical, Full and Auto, and the Crop panel's Auto straighten angle. See transform.
guided.rs Guided Upright: solving two to four guides into a correction, and what to say when they can't. See transform.
quality/ Full-quality rendering, one module per seam: sizing and resizing (mod.rs), detail (sharpening, mask noise), highlight recovery, local (Texture's image, and the photo's copies for the Shadows/Highlights map and for measuring it), samples (Point Color, Targeted Adjustment, retouching), prepare (what every render derives before its stages: the resolved recipe and geometry, then the camera check, Auto CA and the retouched source) and the cancellable fit/region/export render.
targeted.rs The Targeted Adjustment Tool's targets, and how a drag is shared among the sliders for a sampled color.
preview_renderer.rs Stateful preview backend selection, the photo's resolution pyramid, GPU diagnostics and CPU fallback; the AI Denoise source the next renders use (set_ai), and letting go of the noise-reduced image a render replaces before making the next; render_fitted, its Fit render on the CPU keeping nothing, for the Library's edited previews.
pyramid.rs Resolution pyramid of the recovered (and retouched) camera image for Fit and zoomed-out previews; patched where spot removal changed.
stage_cache.rs Preview cache of geometry samples, the measurement copy and the scene tone stage's measures of it (with positive Dehaze's haze), Texture's detail and image, mask weights and brush rasters, keyed by the recipe fields each stage reads; an image in a key (Same) is held weakly, so an entry never keeps an earlier edit's full-size image alive.
gpu/mod.rs Optional compute device, bounded/reused buffers, command submission and readback for preview finishing.
gpu/finish.wgsl Portable sharpening and separable Lanczos resize compute kernels.
gpu/develop.rs GPU per-pixel color and tone stage: sample buffers kept per stage-cache entry, pipelines per feature set (Variant), the map's grids and each sample set's camera colour kept on the device, dispatch and readback.
gpu/develop.wgsl WGSL port of the per-pixel pipeline (scene colour, Exposure, the scene tone stage, profile tables, Contrast, curves, mixer, grading).
pipeline/pixel_params.rs Which recipes the GPU stage covers, and its parameters (named slots, as gpu/sampling.rs's) and tables.
gpu/resident.rs, gpu/local.wgsl The stages before the per-pixel stage on the device: the photo kept there and region sampling through geometry, lens correction and noise reduction.
gpu/sampling.rs The sampling pass's parameter header: named slots for the Rust side and the S_* offsets generated for local.wgsl. The slots! macro that declares both headers is in slots.rs.
gpu/uniforms.rs The present.wgsl and finish.wgsl parameter blocks as Rust structs; a naga test checks their fields and offsets against the shaders.
gpu/present.rs, gpu/present.wgsl, gpu/reduce.wgsl Finishing developed pixels straight into the viewport texture (sharpening, effects, clipping overlay, monitor profile, histogram) and box-reducing it for the minimap and thumbnails.
gpu/weights.rs CPU-generated resampling coefficients matching reference boundaries and normalization.
rendered.rs Float RGB output buffers, integer pixel conversion, histogram generation with per-channel clipping counts, the clipping thresholds and the clipping overlay.
color/curve.rs Tone-curve points, validation, interpolation and lookup tables.
effects.rs Additional recipe controls used by XMP and spatial finishing such as grain and vignette.
color.rs The colour wheels' hues (hue_rgb), shared by mask tints and the Color Grading panel.
calibration.rs Camera-primary calibration and shadow tint.
black_white.rs Treatment (Color or Black & White, kept with black & white profiles) and the Auto black & white mix, fitted to Camera Raw's Auto. See color mixer.
auto.rs Auto: the Basic tone sliders, Vibrance and Saturation predicted from a reduced render of the photo by fits to Lightroom's Auto values, and white balance from gray world.

Camera profiles

File Responsibility
camera_profiles/mod.rs Profile/table models, validation, camera transforms and profile tone behavior.
dcp.rs Bounded, endian-aware TIFF/DCP tag decoding.
fitted.rs Camera Look (fitted) as an ordinary profile: the look over RAWmakase Standard (from the camera's matrix alone) or over the fitted "Camera Matrix (fitted)" base, its canonical-hash UUID, and whether a base's white balance is uncalibrated.
library.rs Explicit profile imports (DCPs, look XMPs and .cube files as looks), RAWmakase-library loading and camera matching; listed returns the looks' groups beside the profiles (not in them, so recipes are unchanged) and Groups::entry says where the Profile menu lists each profile and titles DCPs that share a name and camera after their files; lists a camera's Adobe profiles on this computer for the one-click import, and reads nothing else from there.
catalogue.rs The community camera-profile catalogue from data/camera-profiles: parsing and validation (pinned GitHub sources, safe file names, sizes, digests, terms the profile's own notice states), matching by the library's camera rule, verification of downloaded bytes, where a profile is installed, and the no-clobber install; generate makes catalogue.toml and excluded.toml from checkouts of the pinned sources (examples/profile_catalogue.rs runs it). No network.
enhanced.rs Bounded XMP HSV big-table decoding, profile curves and internal adjustments; camera and creative look files (LookFile) and Profile Amount (Enhanced::at_amount).
look_settings.rs Exposure, Saturation, colour mixer, parametric curve, split toning and vignette settings inside looks; Recipe::with_profile_adjustments renders them with the user's.
rgb_table.rs Adobe RGB tables (1D and 3D, in their own primaries and encoding) of creative and camera-matching looks, with tetrahedral interpolation; the colour stage applies them after the colour mixer (develop.wgsl's rgb_table on the GPU).
cube.rs The .cube reader (3D and 1D tables, domains, shapers), with tetrahedral lookup. By Luke Walker.
cube_look.rs A .cube imported as a look: the colour space it expects (LutSpace, the one owner of each space's table codes, which the CLI and UI translate to), its RGB table (RgbTable::from_cube), the fidelity measured at import, the generated look XMP and the names and groups imported looks take (group_of: the nearest folder not named for its format). library::import_files writes it. See .cube LUTs.
temperature.rs DNG temperature/tint and chromaticity conversion.
reference.rs A photo's baseline exposure (DNG tag or camera table) and verified neutral calibration data.
dng_tone.rs Adobe DNG default tone-curve data.
open.rs RAWmakase Standard and Color, our own profiles for every camera with a colour matrix.

Lens corrections

File Responsibility
optics/mod.rs Radial correction model: vignetting gain, distortion and lateral CA scales, fill scale. Shared by the lens readers, DNG and the renderer.
optics/lcp.rs Adobe lens profiles as data: parsed LCP entries, an imported profile, and the profiles a photo can choose from.
optics/lensfun.rs A Lensfun lens calibration as data (what an edit copies) and its evaluation for one photo: Lensfun's distortion, lateral CA and vignetting models, focal and vignetting interpolation, the photo frame's scale, sampled into the radial correction. Checked against Lensfun's own output (tests/data/lensfun).
lens/auto_ca.rs Remove Chromatic Aberration: lateral CA measured from the decoded image as red and blue radial scales.
lens/lcp.rs Adobe lens profiles (LCP), imported explicitly into lens-profiles, cached, listed for the photo's camera and matched to its lens; their data is in optics::lcp.
lens/choice.rs Lightroom's lens profile Setup (Default, Auto, Custom), the profile an edit names (an Adobe identity or a Lensfun lens, never both), which one renders, and the Make/Model/Profile menus.
lens/lensfun/mod.rs Lensfun's XML database read into mounts, cameras and lenses; finding a lens by an edit's identity.
lens/lensfun/names.rs, matching.rs Which Lensfun camera and lens a photo has: names split as Lensfun documents, generations, stated focal lengths and apertures, mount compatibility, calibration coverage, the frame's crop factor; the unique best match or a choice.
lens/lensfun/choice.rs The Lensfun lens an edit chose: identity, camera, a copy of the calibration with its provenance and license, resolving one named only (from XMP), and its correction for a photo (cached per photo).
lens/lensfun/installed.rs The database installed in the data folder (lensfun/installed.json and a folder per version), read and cached for editing; rendering never reads it.
src/ai_denoise/ AI Denoise's service, shared by the app and the command line (mod.rs): one queue and worker thread for Develop, export and the CLI; the job key; viewport-first tiles with one partial publication; the GPU-to-CPU rerun; stale results rejected; stop, which hands back the thread. CommandLine for render and render-batch, one service per command (command_line.rs), and the rawmakase denoise development command (bench.rs). Tests and the stand-in model the app's tests share in tests.rs.
src/model_install/ Installing the model packs (Subject's, Sky's, AI Denoise's): their folders, receipts of the checked files, downloads resumed where they stopped, imports from a folder, the lock across instances, and the runtime folder.
src/lensfun_install.rs Installing, updating and removing Lensfun's database: download from Lensfun's update channel, the archive's limits and checks, staged and atomic publication, the lock across instances; rawmakase lensfun.

XMP and presets

XMP translates Adobe settings into a validated recipe. Presets manage reusable recipes and the installed preset collection; they do not own the renderer.

File Responsibility
xmp/mod.rs Parsed preset/settings model and XMP API.
parse.rs Namespace-aware XML parsing, curves, provenance and unsupported-setting notes.
filter_list.rs Lightroom's filters (crs:FilterList, today the Enhance filter): decodes each filter's Table_<id> settings (through camera_profiles::table_bytes); one with Raw Details, Super Resolution and Denoise off is neutral, any other is a named blocker.
apply.rs Named application stages for profiles, basic controls, WB, color, curves, grading, effects and crop; checks consumed settings and validates before returning a recipe. Auto settings (Auto Settings, Auto white balance, Auto B&W) are measured through the model's PhotoMeasures (model/measures.rs), which the engine provides; measures_photo says when a caller must decode the photo for them.
write.rs Writes the Camera Raw-compatible subset of a recipe as crs: settings, the XMP packet exports embed; the keys mirror apply. Not a round trip: spots and masks, Levels, quarter-turn rotation and flips, and built-in lens corrections are not written.
xml/ns.rs, xml/mod.rs XMP namespace URIs and JPEG XMP headers; XML escaping and the packet wrapper RAWmakase writes.
local.rs Lightroom's spot removal, red eye and masks (RetouchAreas, legacy RetouchInfo, RedEyeInfo, mask correction lists) from XMP or a catalog, as retouch operations, red eye corrections and masks; import only.
presets/mod.rs Public preset API.
native.rs Native JSON recipe preset load/save and shared migration handling.
photo.rs A preset applied to one photo (apply_to_photo): lenient application, the profile substitute and the photo's own Upright, shared by Develop's click and a batch on the Library's selection.
amount.rs Lightroom's preset Amount: which presets offer one, and the settings at an Amount from those before the preset and the preset's result.
curves.rs The Point Curve menu's curves: Lightroom's built-in point curves, the curves saved in the data directory's curves/ folder, and the name the menu shows.
builtin.rs Built-in presets embedded from assets/presets, their group order and ids.
library.rs XMP collection discovery, import without overwriting existing files, display names and favorites.

Persistence, catalog and export

File Responsibility
storage/mod.rs Shared persistence and path API.
files.rs Application/asset directories, atomic JSON writes, publishing a file without replacing another (also on exFAT, which has no exclusive rename or hard links), relative parent paths and RAW enumeration.
formats.rs The rendered formats (JPEG, TIFF, PNG, WebP, AVIF, HEIF, JPEG XL) as facts with no codec: extensions, MIME types and names, and is_photo, which file Add Folder and Synchronize Folder take. The one place a new format is named.
model/saved_history.rs A Develop History as kept between sessions, as plain values: Develop's History restores from it and the catalog stores it, neither depending on the other.
model/saved_format.rs Saved schema/pipeline versions, envelope validation and legacy recipe migration, and the one list of obsolete engine and operator settings every recipe read drops. Recipes keep unknown fields from newer releases.
bitmaps.rs Compressed raster data referenced by hash from recipes (future AI masks and patches): catalog bitmaps table, sidecar bitmaps map.
checksum.rs A file's checksum: size, a quick SHA-256 of three blocks, the full SHA-256 read in chunks a caller can pace, and the Identity of the version read; a read during which the file changed gives nothing.
crates/rawmakase-fs/src/lib.rs rawmakase-fs, a crate of its own that knows no workspace crate; its system calls, and all of its unsafe code, are in unix.rs and windows.rs, so the model holds none. What moving a user's file needs of the file system, policy-free: an exclusive rename of a file or folder that never falls back to a link and unlink or a copy, a name's file object (FileId, VolumeId) without following links, a folder's exact listing, how a folder compares names (probed through its own names, never by writing), syncing a folder, whether a path is below its root with no link or mount point between, and a volume's facts (its kind, from f_fstypename, f_type or GetVolumeInformationW, a Windows network drive's from its protocol, FileRemoteProtocolInfo; local, read-only, bytes free, whether its file ids stay: only local APFS, HFS+, ext, XFS, Btrfs and NTFS volumes are taken to; whether it renames exclusively: not macOS's exFAT nor an SMB share). copy.rs has a copy's steps, each on its own for its caller to journal between: an empty file made where nothing has its name, a copy into it through the handle it was made through (never into another file put at its name meanwhile) that hashes (SHA-256) what it reads and can stop between chunks, syncing it, giving it (or a folder) the source's extras (extended attributes on macOS, but for what the system sets itself; user. ones on Linux; alternate data streams on Windows) and times and permission bits (a file's durably, and through that handle too, which a share's drivers, Linux's CIFS and by its source macOS's smbfs, resolve by name all the same, #675), hashing a file or its first bytes, or a file's or folder's extras, a file's birth time, removing a partial copy, and removing an empty folder a copy made. One file per system: unix.rs (rustix; which extended attributes are a file's own), windows.rs.
identity.rs RAW fingerprints (size, modification time and a hash of the first bytes) that tie cached previews to a file, and edits to a photo whatever its modification time.
catalog/legacy_sidecar.rs Edits saved beside photos before editing moved into the Library: validated and imported into the catalog, with their spots and masks from the companion *.rawmakase-local.json, when their folder is added; also read by the CLI's render. The writer stays for the persistence tests.
app/preferences/session.rs session.json as stored (Session: last-opened path, monitor profile choice, raw defaults, the panels each module shows and other preferences, with fields a newer release wrote kept in Unknown), and SessionState, the editor's own part of it while it runs: the preferences it holds (demosaic, Copy Settings groups, auto-advance, checksum pause, the B&W mix, folded and solo sections, maximized), the Library place and layout it remembers (remember_place: a new place at once, a layout alone once settled), and the only writer of the file (write, which adds what other owners keep and every unknown field; nothing without a file).
catalog_session/mod.rs The open catalog and its photos, folders, collections and roots as read, with no window; writes that change those lists (ratings, the Quick Collection, refreshed fields and keywords) keep them in step. Its fields are private: the catalog and lists are read through accessors, the writes that change no list (edits, History, snapshots, camera sequences, the computer's name) have methods of their own, and nothing outside gets the catalog to change; forget_lists and sort_photos_by_capture_time are the two list changes the Library asks for. The Library shows them.
catalog_session/stacks.rs Stack changes written to the catalog, then each photo's place in its stack read back into the session's photos.
catalog_session/import_stacks.rs Stack Camera Bursts for photos added: the files of the batches still to be stacked (Catalog::pending_burst_stacks) read in the background, one of the session's background reads (stopped with them), each for its sequence (what the catalog kept of an unchanged file, else read) and, when the catalog has none, its capture time, both of one file stamp; a batch with a photo offline is left for later; a read that stops before every photo returns nothing.
catalog_session/descriptive.rs Descriptive metadata edits, their undo, Read Metadata from Files, collection membership, and virtual copies with their Copy Names, written to the catalog and read back into the session's lists.
catalog_session/backfill.rs Capture times (from the EXIF, else raw::capture_time for CR3, CRW, MRW and X3F) and photo info (an X3F's from raw::undecoded, as it isn't decoded), with each file's camera sequence (exif::sequence), read from files added from folders, in the background, saved in the catalog and the session's photos; also, once, PNGs whose info earlier releases stored without their EXIF (Catalog::reread_png_info_once). The Library says which photos are online and re-sorts.
catalog_session/checksums.rs Every master's file checksum, read in the background: quick hashes first, then full ones, throttled and paused for heavier work. What was read before a structural change (the session's generation, bumped by every reload, even one that fails) is dropped.
catalog_session/background.rs Reading many photos' files a batch at a time on a thread, waking whoever shows them after each batch; also used by Read Metadata from Files.
catalog/mod.rs Catalog lifecycle, browsing queries (photos, folders, collections, roots), metadata and relinking.
catalog/db/mod.rs Owns the SQLite connection, behind an opaque Db: reads that refuse to write, consistent snapshots, writes and savepoints, the format check and schema, and Lightroom attachment for import. The only catalog module that names rusqlite.
catalog/db/sql.rs Sql and SqliteSql: one SELECT, WITH, INSERT, UPDATE or DELETE statement each, checked at compile time by sql! and sqlite_sql!.
catalog/value.rs The values catalog queries bind and read (ToValue, FromValue, FromRow, TextOrBlob) and row! for named row structs, decoding as rusqlite always did.
catalog/edits.rs A photo's saved edit: recipe and export options, the spots and masks kept beside them, and bitmaps by hash.
catalog/location.rs CatalogLocation: where a catalog is, as the app names and reopens it. A file is the only kind; file-only behaviour (its size, revealing it, session.json) matches on File.
catalog/edit_rows.rs The only writes to a photo's edit rows: a checked save or clear, an exact copy for virtual copies, removal with a copy, and the format upgrade's migration of stored edits and History. A test fails on any other SQL that writes them.
catalog/format_upgrade.rs Upgrading a catalog of an earlier format: the backup beside it, then one transaction that drops the obsolete settings from stored edits, History and snapshots and raises the version; run before anything stores a recipe in an older catalog.
catalog/develop_history.rs A photo's Develop History (model::saved_history), stored in the same transaction as its edit; large settings are stored once per History.
catalog/sequences.rs photo_sequences: where each master falls in its camera's sequences (exif::sequence), with the file's Stamp it was read from (SavedSequence), as read under the current SEQUENCE_VERSION, kept under the photo's master; for Auto-Stack's Group camera bursts.
catalog/checksums.rs photo_checksums: the checksums on record, how many masters have one, and saving one only while its photo is still a master of that folder and name.
catalog/folder_sync.rs Synchronize Folder's engine (issue #432): the inputs read in one snapshot, each photo's state by the evidence rules, sealing a plan with each family's digest. folder_sync/scan.rs lists the folders in scope and matches unknown files with the checksums on record; folder_sync/find.rs is Find on Disk (issue #693): it checks the file picked for an offline photo against the checksum on record and matches the other offline photos of its folder in that directory, giving a plan of moves only, possibly into a new root at that directory; folder_sync/apply.rs rechecks and applies what was accepted (a Find on Disk plan makes no import batch), then adds new files through Add Folder's steps; folder_sync/digest.rs hashes a family's rows, its table list checked against the schema, and, for file operations, where the family is (placement) apart from what the user made of it (user_state, without what background reads write). rawmakase sync-folder prints a plan and applies it with --apply; rawmakase find-photo does the same for Find on Disk.
catalog/naming.rs name_fields: the catalog's part of each chosen photo's export NameFields (capture time, copy name, rating, label, photo info, keywords by name (leaf names, the catalog's only: a photo without a catalog has none), title, caption, copyright, creator and first creator (Artist): a field with no row left None, the file's own, a cleared one empty), read in one snapshot when Export is chosen, and by file_ops::rename_order in its own snapshot.
catalog/copies.rs Virtual copies: create, set as master, rename, remove; deleting a photo's rows, which removing a folder shares.
catalog/export_catalog.rs Export as Catalog (#738): SQLite's consistent copy of the catalog in a folder beside the destination, Lightroom data still only in the archived .lrcat brought into rows, then every photo outside the chosen folders or photos (and their virtual-copy families) deleted with what only they referred to (keywords, collections, stacks, import batches, mask rasters, the archive, the file-operation journal); folders above the ones kept stay, with their locations, and locations and roots nothing kept is in go; compacted, opened again (each photo found where this catalog finds it) and published without replacing anything. A catalog with a table this release does not know is refused. remove_exported_folders removes an exported folder only while its families' digests and its folders' locations are those exported.
catalog/stacks.rs Folder stacks, the only writer of stacks and stack_photos: group, unstack, remove, reorder, collapse, Undo's snapshots, a new virtual copy's place, photos leaving their stack as they move to another folder, the lenient reading of rows other releases changed, and Auto-Stack's grouping by capture time (auto_stacks) and by camera bursts (auto_stacks_with_bursts); Stack Camera Bursts for photos added (stack_imported_bursts): their stacks and the batches marked done in one transaction, which checks again what may still be stacked.
catalog/file_ops/ File operations (#370, planned in #556): Remove from Catalog (which takes no lock: it changes no file), moving photos' files to another folder (one the catalog has no folder of its own for gains one as the rows follow), making a folder and moving photos into it, renaming photos (in capture order for a batch, #342) and folders, moving folders into another folder of their root or of another root, and a root into a folder of another root (#586), and putting photos in the Trash, with the companions only they read, and putting a folder in the Trash whole. mod.rs is the API (FileOp, plan, Plan::confirm, execute, recover, resolve, outcome, rename_order, rename_preview, the Trash the app implements); plan.rs expands a choice into families and resolves, refuses and checks them from one snapshot; execute.rs runs a confirmed plan item by item (moves and renames within a drive up to 100 at a time, a commit per step and a sync per folder for all of them, each folder's names and catalog photos read once, and each item's sidecars read again from the disk once the batch's renames are done, an item another program gave a sidecar meanwhile put back, #681, #692), putting back a failed step and completing rows only on evidence; recover.rs decides what a crash left from the journal and the disk; copy.rs moving photos to another volume: each file copied with its extras, verified and named there, the catalog following the proven copies (re-keying a photo's edit and checksum to a copy whose volume keeps times more coarsely), the originals to the Trash, undoing what fails before the catalog follows (on an SMB share leaving its copies for the user, #675), and recovering such a move; journal.rs is the only code that reads or writes file_operations, file_operation_members and file_operation_copies; preconditions.rs what must still hold of an item's family; lock.rs the operation lock beside the catalog; conflicts.rs whether a name is free in a destination; folder.rs making a folder (New Folder Inside): its journalled state, name rules, the exclusive mkdir, adding it to the catalog on evidence and recovering it, and the catalog's folder a move adds or finds at a destination it had none for; companions.rs which XMP sidecars and earlier releases' edit files go with a photo, by sidecar::sidecar_candidates, asked of a folder's names indexed once per plan or batch (Listing, so planning and running a large folder stay linear, #681, #692), and the names they take when it is renamed; names.rs the names a file or folder may have, and the Stem/FileName a rename is given only through them; rename.rs renaming photos: new names, the all-or-none conflict and chain checks, a batch's capture order (by the catalog's capture times alone; catalog_session's backfill reads and keeps the files' dates), read in one snapshot with each photo's path and catalog NameFields (catalog::naming), and its preview from a naming template, the app adding what the files give (RenameOrder::with_fields); proof.rs which file a name is on FAT, exFAT and SMB shares (macOS's smbfs, Linux's CIFS), whose file ids change or prove nothing across mounts (#573): copies by exact name and SHA-256, originals by name, Identity and SHA-256, journalled per item; tree_copy.rs moving a folder to another volume (#572): its whole tree walked and refused where it can't be copied, built in a hidden folder there with each file copied as a photo is (copy::write) and each folder given its original's extras, named by one exclusive rename, its folders given their originals' dates and permissions once the catalog follows, the catalog following on the evidence, the originals to the Trash whole or one by one, undoing what fails before the catalog follows, and recovering such a move; tree_trash.rs putting a folder in the Trash (#575): its tree walked and journalled name by name, checked again right before one Trash call, the subtree's rows removed on the receipt and the folder proven gone (TreeGone), and recovering it; tree.rs renaming a folder or moving it into another folder of its root or of another root on its drive, one change with two destinations, and moving a root whole into a folder of another root (#586, journalled as move_root): its refusals, its journalled subtree and re-keying the catalog's folders on evidence, a root moved whole leaving the catalog's roots in that transaction; disk.rs the Disk seam over rawmakase-fs that tests inject faults through. The app's Remove from Catalog, moves, New Folder Inside, Move to Trash and a folder's Move to Trash… use it (app/file_ops/mod.rs).
catalog/ingest.rs Adding a folder of photos, each in the same transaction as its file metadata, defaults and the edit an earlier release saved beside it (the default Creator and Copyright, catalog/defaults.rs, give way to the camera's own, read by the reader the app passes in NewPhotoDefaults: catalog_session::new_photo_defaults, through photo::camera_exif, which also reads a CR3's, MRW's or X3F's; NewPhotoDefaults also carries photo::raw_xmp, with which catalog/sidecar.rs reads a CR3's own XMP as it reads a JPEG's, and Read Metadata from Files reads it through catalog_session::read_file_metadata); each folder found is matched with this computer's locations. New photos' files are read side by side on up to four threads before the transaction, in order (read_new_photos); the checks against the catalog follow on the caller's, and PhotoWriter inserts each prepared photo in the caller's transaction (write_new_photos, which raises the format a legacy edit needs and tells stored edits of the commit), the one way Add Folder and Synchronize write a new photo. With Preferences' Stack Camera Bursts (ImportOptions, carried by NewPhotoDefaults, taken once when adding starts), the batch is recorded as still to be stacked (import_burst_stacks, with the gap for unnumbered frames) in the batch's own transaction, Synchronize's additions included (pending_burst_stacks). Removing folders with their photos (files untouched).
catalog/locations.rs Folder locations per computer: the computer id, logical folder paths, adopting legacy mappings on open, resolving, relinking and clearing.
models.rs Folder, photo, collection and saved-edit records crossing the catalog API. The metadata values they carry are in metadata.rs.
schema.postgres.sql The same tables in Postgres types, kept in step with schema.sql by a test; CI's "Portable catalog SQL" job prepares every portable statement against it. No release opens a Postgres catalog.
schema.sql Every catalog table, idempotent: run on creation and on every open, so older catalogs gain tables added since.
preview_cache.rs Separate, disposable SQLite JPEG cache with identity checks, offline hits and a size budget: Library thumbnails, and Standard and 1:1 previews with the catalog photos they were asked for.
lightroom/mod.rs Read-only Lightroom snapshot import, source preservation, relational transfer and atomic destination publication.
lr_develop.rs Parses Lightroom's serialized Lua settings as data, translates supported controls through XMP, and reports unsupported settings. Never executes Lua.
lightroom/history.rs Lightroom's develop history per photo, and its recovery from the preserved .lrcat for catalogs imported before it was kept.
export/mod.rs Export option validation, original-file protection, overwrite policy and atomic publication; export_image/stage_image write an ExportImage with its space's profile, refusing a format that can't hold it; export, export_with and stage take sRGB buffers only. srgb_fixtures.rs records sRGB exports as they were before wide-gamut export; wide_gamut_tests.rs reads Adobe RGB and ProPhoto exports back through their profiles.
export/encode.rs JPEG, 16-bit TIFF and PNG encoding with the ICC profile, EXIF directories and XMP.
export/metadata.rs, export/exif.rs The EXIF directories an export writes (the camera's, with the export's size, orientation, resolution, software and colour space: ColorSpace 1 or 0xFFFF, and Adobe RGB's interoperability index R03), as the TIFF block a JPEG's APP1 segment or a PNG's eXIf chunk holds.
export/job.rs One photo's export from start to finish: the colour space checked with the format (settings and target) before anything else, decode when needed, the complete AI Denoise source through Photo::ai when the edit has it on (else the photo fails with the reason), render, metadata, file.
export_settings.rs The Export dialog's choices (destination, name, format, colour space, size, metadata), saved as export.json for the next export, a photo's own ExportOptions, Rename Photos' own choices (RenameSettings, export_settings/rename.rs, saved as rename.json, which only this release on reads), the user's saved file-name templates (SavedTemplates, export_settings/saved.rs, filename_templates.json: chosen by value, so changing one never changes a dialog's choice; a file that can't be read is never written over; what a later release adds is kept), and NameTemplate, Lightroom's naming templates filled (with Sequence's start and padding), which renaming photos uses too, from a photo's NameFields (what a name is made from, taken once per export). A custom template is kept as name_template {tokens, over} beside the preset it was made over, so earlier releases keep loading the settings; a format, colour space, Rename To or setting only a later release knows is saved back untouched (a later colour space is refused by output_space, the one check of space and format every export makes before rendering, rather than exported as sRGB). Below the catalog and export, which both use them.
export_settings/tokens.rs Lightroom's Filename Template Editor templates (TokenTemplate): its {{id}} token form read and written back exactly, the editor's form with tokens by their menu labels (lossless, with positioned errors), every Lightroom token id and label (TOKENS; those not filled yet kept and noted), filling a name from NameFields with the whole name made a safe file name, what a template needs from the files (Needs), and RAWmakase's own templates (BUILTIN).

Desktop application

The desktop owns interaction and task coordination. Panels use the domain APIs above rather than implementing SQL, file formats or pixel processing.

State and operation policy

File Responsibility
app/mod.rs Editor, initialization, lifecycle, worker connections and explicit session-write destination.
app/shell/crash_log.rs Every panic appended to crash.log in the local data folder (moved to crash.old.log past 1 MB), and a panic that ends the desktop app returned as an error, which Windows shows in a dialog (#623).
state.rs Separate document, decoded-image pair, preview, viewport and preset-browser state. The Document (the open photo, its edit session, decoded images) owns its load: open starts a fresh document and its load together, close ends both, invalidate_load ends only the load (quitting before the final save, a file moving while it loads), so no document is replaced without its load following. Not yet a headless session: the editor still coordinates its renders, catalog and views.
edit_session/history.rs Bounded undo/redo, redo-branch invalidation, one transaction per editing gesture, and saving and restoring History with the edit.
editing.rs Before/after frame snapshots bound to a document generation so navigation cannot mix histories.
step_name.rs The name the controls drawn in a frame give the History step they make: owned by the editor, passed explicitly to the sliders and resettable sections, handed to History as the edit frame finishes.
activity.rs Mutually exclusive foreground states: file choice, folder changes, a batch edit (Sync Settings, Auto Settings or a preset on the selection, with its progress and Cancel) and file operations; which of them hold the catalog's writes (autosave, flush and undo wait).
file_ops.rs File operations in the app (#556): Remove from Catalog from Delete, ⌥Delete and the thumbnail menu; a folder's Move to Trash… from the Folders panel; moving photos dropped on a folder or chosen in Move to Folder…; New Folder Inside…; the open edit saved and the catalog kept quiet (Activity::ChangingFiles, background reads and Read Metadata from Files stopped) while it is planned and run on workers; its confirmation and progress; and the outcome, read from the journal, applied to the Library, the open photo (which follows a move), the reference, the undo log and the preview requests. file_ops_dialogs.rs has Move to Folder…'s and New Folder Inside…'s windows, and recovery when a catalog opens with "Unfinished file operations". file_ops_rename.rs has Rename Photo (one photo, by its new name), Rename Photos (several, by a naming template from File Naming or the Filename Template Editor, from the fields rename_order read with their order and the camera names naming::read reads from their files when the template needs them, Rename waiting for that read; the choice kept in rename.json when Rename is asked for) and Rename Folder….
task.rs Load/render generations, cancellation and completion ownership.
edit_session/save_state.rs Clean, pending, saving, failed and protected edits; debounce and retry policy.
autosave.rs The background saver thread and its catalog connection.
workflow.rs Opening/navigating photos, flushing edits, scheduling previews, publishing textures and launching exports.
events.rs Receives worker messages, rejects stale generations and applies accepted results to editor state.
dialogs.rs Typed dialog intents and native file/folder choosers.
treatment.rs The Basic panel's Treatment (and V), the B&W panel's Auto and the "Apply auto mix when first converting" preference, each change one History step.
auto.rs Runs Auto on the open photo (the Basic panel's Auto button, the WB menu, Ctrl/Cmd+Shift+U in Develop) off the UI thread and applies the estimate as one History step. In the Library the same key is Auto Settings on the selection (sync.rs).
catalog/mod.rs UI workflows for native catalogs (including the default one in the data folder), Lightroom import, folder addition, relinking and applying imported edits; Waiting, what waits for the next catalog (the launch place, restored once by a catalog that opens; a photo from outside, opened once its catalog is ready, its folder added first, given up on a failure), and keeps_open_photo, whether the catalog read again after a synchronization keeps the photo open in Develop.
export_catalog.rs Export Folder as Catalog… (Folders panel) and Export as Catalog… (thumbnail menu): saving the open edit, the file dialog and export in a task that always ends the dialog activity, the result dialog (offline photos, imported lens profiles), opening the export, and the folder's removal through the usual confirmation, refused if it changed since.
folder_sync.rs Synchronize Folder and Find on Disk… in the app: the file picker, the scan on its own thread (top bar progress and stop), the review dialog, applying as a folder change, and the open photo following a verified move of its file (an unverified file picked for it is refused).
folder_locations.rs Preferences › Catalog › Folder locations, and the questions changing a root or adding a folder can raise.
bulk_import.rs Importing camera profiles, lens profiles and presets from chosen files or whole folders, reporting what could not be imported; a preset import takes the look profiles among its files through the profile import; ImportKind::Luts imports .cube LUTs only, for the colour space chosen in lut_import.rs.
upright.rs Runs the Transform panel's Upright analysis off the UI thread.
report_issue.rs Report an Issue… (sidebar bug icon, Preferences › General › Help, macOS Help menu): the window's facts captured when it opens, the system probed once per process off the UI thread and kept apart from them, the one report text shown and copied, and opening the new issue.
updates.rs The update notice under the toolbar and the About rows in Preferences; the checks and downloads themselves are in src/updates.rs.

Panels and interaction

File Responsibility
messages.rs What the app says to the user, by level: note (status line), done, warn and fail (top bar, a failure until dismissed), and the running work shown beside them (app::work), read each frame from what owns it.
work.rs The work-policy table: each kind of work in one ordered row, with whether closing waits for it (and its name there), its status-line entry or where its progress shows instead, whether it slows edited previews or pauses checksums, and its exit step. closing_waits_for, running_work, preview_pace, the checksum pause and stop_workers read it.
workspace.rs Frame composition, workspace switching, shortcuts, filmstrip, status, pending work, autosave and close handling.
toolbar.rs Develop toolbar and menus.
settings_transfer.rs Copy Settings and its dialog, Paste Settings and Paste from Previous, through model::settings_groups.
sync.rs Batch edits of selected photos: Sync Settings and Match Total Exposures from one photo onto the others (in Develop from the open photo; in the Library from the active photo, its edit resolved through edits with the targets'), and, with no source, Auto Settings and a Develop preset on every selected photo (each measured on its full-size decode, from the decode cache when it has it, as Develop measures the open photo; a preset through presets::apply_to_photo). Inputs captured when it starts, run off the UI thread with progress and a Cancel taken between photos and right before saving, saved in one transaction with a History step each (the switched-off panel rule of model::edit applied as in Develop), undone as one command; the open photo, when it is a target, is saved first and opens again.
export/mod.rs, export/dialog.rs Export dialog, remembered export settings, background exports and their progress. Choosing what to export commits Library typing and reads the photos' NameFields once; the dialog's Example and the batch's names both come from them.
naming/editor.rs The Filename Template Editor (Rename To > Edit…), knowing nothing of who opened it: the template with tokens as chips, Lightroom's token menus inserting at the cursor, a preset to start from, the Example its host makes for the template typed, and Done (giving the host the template) or Cancel.
naming/menu.rs The naming templates a dialog offers (Export's Rename To, Rename Photos' File Naming): Lightroom's presets, RAWmakase's own, the user's saved ones, the template made in the editor, and Edit….
naming/presets.rs The Filename Template Editor's Preset menu, as Lightroom's: the preset the template started from ("(edited)" once changed), presets to start from, and Save Current Settings as New Preset…, Update Preset, Rename preset… and Delete preset… for a saved template, acted on by the one chosen (never found again by its tokens), each saved before it shows; Library, the saved templates as read, or why their file can't be.
naming/read.rs What file names need from the files, read in the background for a host's scope only when the template needs it: each photo's camera make and model (EXIF, else the RAW header through raw::file_camera_names), the title, caption, copyright and creator of a photo the catalog has none of its own for (its sidecar's or own XMP, a CR3's included, through catalog_session::read_file_metadata, else its EXIF's Image Description, Copyright and Artist through photo::camera_exif), what names take from the file alone (FileFacts: EXIF Software through exif::read_for_names, 35 mm focal length, and the XMP's IPTC headline and place names), and a photo without a catalog's capture time and photo info (as catalog_session's backfill reads them, file_capture_time and file_photo_info). One read per scope, cancelled with it; each read has an id no other reader's has, so a stale completion, or another dialog's, is dropped; a file that can't be read, a failure or a panic ends it as Failed, keeping what the other files gave.
stand_in.rs The stored Standard preview Develop shows while a photo opens, read for the photo and its neighbour on a worker each; an offline RAW's, or edited rendered file's, for the Loupe, which zooms into its 1:1 preview (library/zoom.rs).
preview_build.rs Build Standard-Sized Previews: the selection's previews rendered as export renders them, on a background worker, into the preview cache; their identity, progress, Discard and Clear.
preferences.rs Preferences window: app, catalog, profile (with Lensfun's database: download, updates, removal, terms), cache and display settings.
profile_download.rs Community camera profiles for the open photo: which of the model's catalogue profiles match and where they are installed (measured once per camera and profile library), when the offer shows, the per-camera dismissal kept with the session, and the bounded, cancellable HTTPS download. Completion refreshes through bulk_import::list_profiles_after_import as a manual import does, then applies the profile as one History step only to the photo it was asked for while that photo is unchanged; an installed profile applies without a download.
raw_defaults.rs Preferences' Raw Defaults block, and keeping the open unedited photo and the Library's previews in step with the defaults.
onboarding.rs First-run setup: photos added to the default catalog (or a Lightroom catalog imported), then optional Lightroom profiles and presets; and the Library's start while it has no photos or no catalog.
theme.rs, icons.rs Interface colors (Lightroom's neutral grays, with fastframe-theme's palettes) and the Lucide icon set.
design.rs The interface's design tokens: spacing, insets (stage, panel, dialog, card, bar), radii, type sizes, row and control heights, button padding, and the greys as named Tones. Drawing code names a token, never a number; Palette::tone maps a Tone onto the palette in use.
inspector.rs Histogram, the adjustment panels in order and the actions they return, tool drawers and export settings.
inspector/panels.rs Develop's adjustment panels, one file each (basic, tone_curve, mixer, color_grading, detail, lens_corrections, transform, effects, calibration), and the Actions they return for the editor.
basic_keys.rs Lightroom's Basic slider keys: . and , select a slider (view state, kept across photos and modules), = and - step it by ParameterId::key_steps, each key event one History step through change_edit, applied last in the frame before pending work and skipped while closing, typing, dragging or a dialog is open.
inspector/lens_profile.rs Lens Corrections' Setup, Make, Model and Profile menus over the imported lens profiles, then Lensfun's lenses.
inspector/lensfun.rs Lens Corrections' Lensfun card: the download before Lensfun is installed, then the lens this photo matches (Use), a choice of possible lenses, resolving an edit's named lens and updating its calibration.
inspector/profile_offer.rs Basic › Profile's offer of community camera profiles, on the Lensfun card's band: each matching profile with its credit, terms and source link, and Download & Apply, Apply, progress and Cancel, or the conflict; Dismiss. Reports clicks only.
inspector/ai_denoise.rs Detail's AI Denoise: the switch, Amount, the ⓘ popover with the model's credit, the status line, and the install offer (credit first, then Accept and download).
lensfun.rs Lensfun's database jobs in the app (install, check, remove), one at a time on their own thread, their progress and outcome for Lens Corrections and Preferences.
inspector/profile_menu.rs The Profile menu's profiles: the top level, then a submenu per group of looks, laid out from Groups::entry.
color_grading.rs The Color Grading panel: 3-Way and single-wheel views, hue/saturation wheels (Shift constrains, Cmd fine, double-click resets), Luminance, Blending and Balance, over the recipe's grading values.
targeted_tool.rs The Targeted Adjustment Tool over the photo: its drag, the sample off the UI thread, the panels' target buttons and shortcuts.
point_color_panel.rs The Color Mixer's Point Color tab: the dropper, swatches, shifts, Variance, Range, the range handles and Visualize Range.
tone_drag.rs Dragging in the histogram: its five regions, the slider each drives, and one History step per drag.
clipping.rs The histogram's clipping triangles: independent shadow and highlight warnings, hover preview, J, and the triangles' channel colours.
viewport.rs Photo canvas, fit/100%, pan, crop (with its guide overlay and Straighten ruler) and white-balance picking; hands the pointer to the active tool.
magnifier.rs The magnifier (Aperture's loupe, named apart from Lightroom's Loupe view) over the fitted photo in Develop and the Library's Loupe (Shift+Z): its region rendered in the renderer's magnifier lane, or read by the Loupe's own region reader for photos it shows itself; the lens drawing and the toolbar's magnifier control.
minimap.rs The minimap over a zoomed-in photo in Develop and the Library's Loupe, with its grip to move it between corners; with the toolbar's zoom slider (navigator::zoom_slider, toolbar::zoom_controls) it replaces Lightroom's Navigator.
before_after.rs Before/After views (Before alone, side by side, split), their panes and shared zoom, the open photo's Before settings (set from History or a snapshot, copied or swapped with the edit), and the render of the side beside the edit (Before, or the reference photo).
readout.rs The RGB readout under the histogram: the rendered pixel under the pointer in Melissa RGB, and asking renders to keep their pixels only while the pointer is over the photo.
reference.rs Reference View: the reference photo (set from the filmstrip's menu or by dragging it onto the Reference side), its lock, layout and own Fit/100% zoom, developing it with its saved edit, and keeping it while moving between photos.
crop_drag.rs A drag on the crop: the handle pressed, held to the release, and the crop it makes, from its own sides or (Alt) about its centre, keeping the ratio Editor::crop_constraint gives. No egui input: the viewport passes the pointer and Alt in. See transform.
crop_tool.rs The Crop tool's guide overlays (O, Shift+O), Straighten ruler, portrait/landscape swap (X) and Auto straighten. See transform.
history_panel.rs Develop's History panel: this session's steps, going back to one, and the photo's imported Lightroom steps applied or copied to Before.
guided_tool.rs The Guided Upright tool (Shift+T): drawing, moving, selecting and deleting guides, its loupe and grid. See transform.
overlay.rs The active tool's drawing over the photo (pins, circles, brush cursor, handles) and pointer ownership.
retouch_tool.rs Remove tool (Q): spots, brushed areas, source dragging, keys and its drawer.
red_eye_tool.rs Red Eye tool: Red Eye and Pet Eye, finding a pupil from a dragged circle or a click, moving, Delete, Pupil Size, Darken and the pet eye's catchlight.
mask_tool.rs Masking tool (Shift+W): mask list, components, brushes and gradients on the photo, and the local adjustment sliders.
panels.rs Which side panels and filmstrip each module shows (Tab, Shift+Tab, F6–F8), and Develop's open tab, kept in the session; a panel being hidden first saves or ends what it was doing.
chrome.rs The one whole-window mode: F hides the workspace bar, the panels, the filmstrip and the views' toolbars so the photo fills the window on its backdrop; in the Library the grid takes the window first and the photo on the next F. The window itself is unchanged and the saved panel layout is kept.
presets.rs Preset search, groups (preset_groups, shared with the Library's chooser), favorites, compatibility, application, the Amount slider and temporary hover previews.
batch.rs The Library's Quick Develop Saved Preset chooser and Auto Settings on the selection, and the progress window with Cancel every batch edit shows while it runs.
side_tabs.rs Develop's tab panel beside the adjustments (Presets, or Snapshots over History) and the rail that switches the adjustments between Edit (which also folds them) and the Crop, Remove, Red Eye and Masking drawers, then switches and folds the tab panel.
snapshots.rs Develop's Snapshots panel: named states of the open photo's edit, kept per photo in the catalog (catalog/snapshots.rs, including Lightroom's imported snapshots).
lut_import.rs The Import .cube LUTs window: the colour space a batch of LUTs expects (LutSpace), chosen before the files, at sRGB every time it opens.
curve_menu.rs The Tone Curve panel's Point Curve menu: choosing a curve as one History step, and the Save Point Curve window.
user_presets.rs New Develop Preset; a preset's menu: Update, Rename and Delete for presets made here and imported ones, an imported one backed up before its first update (presets/user.rs, written by xmp/preset_write.rs), and Reveal in Finder for any preset file.
photo_metadata.rs Rating, color label and pick/reject controls and shortcuts.
native_menu.rs, platform/menu.rs macOS application, File, Edit, Photo (Stacking › Auto-Stack by Capture Time…), View, Window and Help menus (Keyboard Shortcuts, Report an Issue…): AppKit transports typed actions; the editor checks current availability and runs existing commands. Native targets are disconnected at exit.
widgets.rs Shared buttons, adjustment sections (with Lightroom's panel switches, and per-side Solo Mode that pinned panels stay out of), sliders (Up/Down over a hovered slider; a lit, clickable label for the Basic slider keys), curve editor, workspace tabs, and the confirmations: confirm_modal, and destructive_confirm, where Cancel has the focus and keys held from before do nothing.
library/mod.rs The Library: composes the owners below, hands metadata and virtual-copy changes to catalog_session and records them for undo, and draws the sidebar, grid, filmstrip and info panel.
library/outbox.rs What the Library asks the editor to do (Find on Disk, Remove Folder, Read Metadata, Export as Catalog, virtual copies, previews, file operations), queued in the order asked and handed over in that order the same frame (Editor::library_requests): an equal request in a row is queued once, a request that opens a window (Remove Copy, Remove Folder, Read Metadata, a file operation) while another is open is refused with a message, and photos no longer listed by then are left out.
library/filter.rs The source (folder scope or collection), the filter bar's search, flag, rating and label, the offline filter and sort order; computes what is shown, each folder stack together and a collapsed one as one photo.
library/import_stacks.rs Stack Camera Bursts for photos added: what catalog_session::import_stacks read, planned per batch from the session's photos (masters in no stack whose cameras say something; a batch with a photo not read waits) and made through CatalogSession::stack_imported_bursts as one undo command; only while the Library is shown and free (the editor calls it), Auto-Stack's window closed and reads not suspended; a read under another structural generation is read again.
library/stacks.rs Stacking commands and keys (Cmd+G, Cmd+Shift+G, S, Shift+S, the thumbnail menu's Stacking), their undo commands, and Auto-Stack by Capture Time's window, with Group camera bursts' sequences: each candidate's file checked against what the catalog kept of it, read again when it changed (catalog_session::file_sequence, in a catalog_session::background::Reader the window owns and drops) and saved.
library/availability.rs Which originals are online, found out in the background while the Library already shows them.
library/sidebar.rs The catalog's sidebar in both modules: Catalog, Folders by drive (a folder located on another drive than its root under that drive) and Collections, with their folder and collection trees built once per change to the session's lists.
library/volumes.rs Which drive each root folder is on (platform::volume::locate), whether each drive is attached (a drive known by its serial number only while that disk is the one at its mount) and its free space, probed off the UI thread; the drive each root was last found on, kept in drives.json in the data folder so a detached drive's folders stay under its name; and the volume header row.
library/textures.rs The bounded embedded and edited preview textures, their requests to the preview workers and the tickets that drop stale results; at full pace, the edited previews asked for ahead of being shown, from just after the view on; a new list drops the ones asked for the last and not started.
library/copy_name.rs The Copy Name field: the name being typed, saved on commit and kept across selection changes and failed saves.
library/tree.rs Folder/collection hierarchy, rows and tree actions: which rows a dragged folder or root drops on.
library/folder_selection.rs The folders chosen in the Folders panel: one, a Shift-click range of the rows shown or Cmd/Ctrl-clicked ones, with the anchor the session saves.
library/cell.rs Individual photo grid cells.
library/kinetic.rs Kinetic scrolling for the grid and the filmstrip: a trackpad swipe keeps gliding after the fingers lift (where the platform does not glide itself), fed to the scroll area as wheel input.
library/thumbnails.rs Batched file availability and bounded thumbnail work using the RAW API (a RAW's file facts and its smallest embedded preview that reaches the thumbnail's size, without photo::open; on a network volume that preview read alone, platform::preview_reads) and preview cache.
library/previews/ The two preview workers with their disk cache and progress (progress.rs): embedded thumbnails, made by two to four workers side by side at normal priority (thumbnails.rs); and each photo's edited preview (what it is rendered from, source.rs; how, render.rs; the scheduler, edits.rs), rendered as Develop's Fit (develop::render_fitted) and cached under EditSource::preview_tag, from an EditQueue whose Pace the workspace sets (one render at a time on two threads, or, with the Library in front and nothing else rendering, up to four renders side by side on every core but one (one per 4 GB of memory, platform::memory), and, once the grid's embedded previews are in, up to 500 photos after the view asked for ahead).

Background work

What each long-lived worker blocks on, how it stops and whether exit may wait for it: the shutdown contract.

File Responsibility
worker/mod.rs Named event payloads, load/render jobs, task kinds, render stages and repaint notification.
worker/latest.rs Single-slot mailbox: submitting a new job replaces pending work rather than growing a queue; optional lanes each keep their own latest job. A panicking job does not end the thread.
worker/loader.rs Opening a photo for Develop: metadata and profiles, then for a RAW its embedded preview, the half-size then full decoded image and the neighbour's prefetch; a rendered file (JPEG, PNG, TIFF, WebP, AVIF, HEIF or JPEG XL) goes straight to its full-size image, never through the decode cache, and its prefetch is held in memory for the next load. The file's identity is read once, before it is opened: the header carries it, the decode cache key is made from it, and each stage checks it again before its image is shown or stored, failing the load when the file changed meanwhile.
worker/reference.rs Develops Reference View's photo with its catalog edit on its own thread: a RAW at half size first for Fit, then in full (through the decode cache) for 100%; a rendered file in full at once.
worker/renderer.rs Fit previews, reduced-then-full 100% regions, cancellation, monitor conversion and clipping overlays, for the edit and, in its own lane with its own caches and textures, Before beside it. After a panic it reports the job failed and rebuilds all of its state.

How an operation moves through the app

  1. Open a photo: workspace/dialog/catalog actions enter app::develop::workflow. It flushes the old document, resets document state, starts a load generation and submits a loader job. The loader uses raw, camera_profiles and storage. app::events accepts only current results. A saved catalog recipe, when present, replaces the loader's resolved defaults for a catalog photo.
  2. Edit and preview: panels change the recipe. app::develop::editing and history group the change; save policy marks it pending. workflow submits the effective recipe and viewport to the renderer. The worker calls develop; with a usable GPU and a recipe the GPU stage covers (every recipe resolved with a camera profile, see pipeline/pixel_params.rs), the color and tone stage and the finishing run on the device and the result is drawn straight from its texture; otherwise the worker renders on the CPU and prepares the display bytes. Accepted results become the preview. At 100%, an edit or pan whose region is not already cached and takes more than a moment publishes a reduced draft first, then the full-resolution region.
  3. Save edits: workspace autosave and navigation/close flushing call workflow; autosave writes in the background (autosave), and flushing waits for it before saving synchronously. Photos are edited only through the Library, so edits always save through catalog. An edit the catalog cannot load is protected and cannot autosave, and failed writes remain pending for retry. Presets are separately saved reusable recipes.
  4. Export: foreground activity coordinates destination/overwrite handling. The export job captures the recipe, renders through the development API, then calls export to encode and publish, in the colour space the export settings chose (sRGB by default) and with its profile, independently of the monitor profile. Navigation is held during export.
  5. Apply a preset: presets discovers assets, xmp parses/translates Adobe settings, and the app handles compatibility and hover state. Hover is temporary; application commits a recipe through the editing/history flow.
  6. Import Lightroom: the app or CLI calls catalog::lightroom. It reads a source snapshot, preserves source data, transfers relationships, and publishes a new native catalog. Develop translation is best effort and reports unsupported settings; it does not promise Lightroom rendering parity.

Where data lives

storage::data_dir() selects RAWMAKASE_DATA_DIR when set. Otherwise it uses ~/Library/Application Support/RAWmakase on macOS and $XDG_DATA_HOME/rawmakase (default ~/.local/share/rawmakase) on Linux.

Data Location and lifetime
Original RAW and Lightroom catalog User-selected source files; treated as read-only.
Legacy sidecar edits Adjacent photo.ARW.rawmakase.json / photo.RAF.rawmakase.json, plus photo.ARW.rawmakase-local.json for spots and masks, or identity-keyed JSON under the data directory's sidecars/, saved by releases before 0.1.8. Imported into the catalog when their folder is added and left on disk unchanged.
Native catalog User-selected .rawmakase SQLite file; authoritative catalog metadata, edits and preserved import data. Spots, red eye corrections and masks are in the local_edits table, Develop History in develop_history, raster data in bitmaps.
Native preset / exported photo User-selected JSON / JPEG / TIFF / PNG destination.
Session preferences session.json in the data directory (session.rs); the last catalog and place, panels, layouts and preferences. Each field reads leniently (a malformed one resets alone), fields a later release wrote are written back as read, and the output stays readable by older releases (copy_groups never names AI Denoise, which v0.4.10 cannot read). UI tests inject a temporary destination or disable writes.
Preset favorites preset-favorites.json in the data directory.
Imported preset backups preset-backups/ in the data directory: an imported preset as it was before its first Update with Current Settings, at its path under xmp-presets/Imported/.
Saved point curves curves/ in the data directory: one XMP file per curve, named by the curve.
Installed assets xmp-presets/ and camera-profiles/ under asset roots; shared discovery also checks the legacy XDG/Linux data location. Imported XMP files go to xmp-presets/Imported/ under the current data directory.
Library previews previews.sqlite3 in the data directory; disposable cache, not a source of edits.
Decoded photos decoded/ in the cache directory (~/Library/Caches/RAWmakase on macOS, $XDG_CACHE_HOME/rawmakase, default ~/.cache/rawmakase, on Linux; %LOCALAPPDATA%\RAWmakase\Cache on Windows; RAWMAKASE_CACHE_DIR overrides it), or RAWmakase Cache/ in the folder chosen in Preferences > Performance: developed camera images of opened and prefetched photos, capped at 4 GiB by default (Preferences > Catalog > Decoded images changes the limit), least recently used removed first. Disposable.
AI Denoise results ai-denoise/ in the cache directory, or RAWmakase AI Denoise/ in the folder chosen in Preferences > Performance, which moves and purges them with decoded photos: one .aidenoise file per job key (file identity, model SHA-256, adapter version, provider, build), capped at 10 GB, least recently used removed first. Disposable; saved edits never need it. The model itself installs in models/rawnind-utnet2-bayer-v1/ in the local data directory, with its LICENSE, NOTICE and model card.
Build output target/; generated binaries, documentation and local macOS bundle.

Tests and reference tools

Most unit tests live alongside their implementation, either inline or in a sibling tests.rs. Keep regressions with the domain that owns the behavior.

Location Coverage / use
app/testing.rs What the app's tests share: editors with a catalog or a photo (editor_with_catalog, community_editor, editor_with_blue_photo, two_photo_editor), frames run through them (in_edit_frame, controls_frame, panel_frame), and the clicks and keys they send (click, press, key_down, labelled, centre).
app/<feature>_editor_tests.rs (editor_tests.rs inside a feature's folder), library/tests.rs The whole editor driven through its frames, beside the feature each test is about (crop_tool_editor_tests.rs, chrome_editor_tests.rs, events_editor_tests.rs, undo_editor_tests.rs…): interactions, state transitions, worker results, navigation, library trees and metadata. app/tests.rs keeps the tests of app/mod.rs itself (the icon, the GPU adapter, eframe's errors). Small state owners also contain inline tests.
develop/pipeline/tests.rs Rendering, geometry and reference regressions; numeric helpers also have inline tests.
camera_profiles/tests.rs Profile parsing and validation.
camera_profiles/catalogue_tests.rs The shipped catalogue's pins, terms and cross-body matching; refused entries; deterministic generation; verified, no-clobber installs; and an ignored check of the pinned checkouts.
xmp/tests.rs, presets/tests.rs Settings parsing/application and native preset compatibility.
catalog/legacy_sidecar/tests.rs Migration, source identity, conflict protection and fallback persistence.
catalog/tests.rs Catalog, import and relinking behavior; preview-cache tests live in its module.
catalog/export_catalog_tests.rs, app/catalog/export_catalog_tests.rs Export as Catalog: what goes and what stays out, virtual-copy families, mask rasters by reference, the Lightroom archive, failures that write nothing, and removing an exported folder only while unchanged.
catalog/locations_tests.rs One catalog on several computers: adoption, per-computer relinking and clearing, import matching and legacy paths.
export/tests.rs JPEG, TIFF and PNG precision, ICC and EXIF output.
develop/gpu/tests.rs Explicit hardware tests for CPU/GPU agreement, borders, buffer reuse, crop/region handling, effects and fallback.
tests/color/, tests/corpus/README.md The color corpus: synthetic chart DNGs rendered and compared with committed snapshots and Camera Raw renders on every cargo test; private photo and Adobe-profile tiers behind RAWMAKASE_CORPUS.
examples/preview_benchmark.rs Read-only release benchmark of first Fit, slider Fit, 100% region and export renders on a supplied RAW; checks Fit against the resized export.
examples/titlebar_probe.rs, scripts/test-macos-titlebar.swift Opt-in manual macOS regression for #616: an isolated window and Accessibility state checks after real trackpad double-clicks, held second clicks and dragging at two header heights. The script sends no synthetic input; legacy mode compares fastframe 0.13, and modal mode checks the native strip. No catalog or session is opened.
scripts/test-windows-maximized.ps1 Opt-in native Windows regression for #553: maximize, close/reopen, compare actual window bounds, minimize, restore and reopen restored. Runs the supplied executable on an interactive desktop with a temporary session and empty catalog.
tests/persistence.rs Public API regressions for relative paths, malformed legacy recipes and invalid export defaults; isolates process-wide path settings in a child process.
tests/raw_fixtures.rs Ignored private RAW development/export and repeated-navigation memory tests (RAWMAKASE_FIXTURES).
tests/private_profiles.rs Ignored installed/private DCP coverage (RAWMAKASE_PROFILES).
tests/xmp_presets.rs Ignored installed XMP collection audit.
catalog/private_tests.rs Ignored private Lightroom catalog validation (RAWMAKASE_LRCAT).
tests/data/README.md, curve samples Small checked-in Lightroom point-curve reference data and its provenance.
scripts/make-curve-fixtures.py Generates synthetic TIFF ramps for manual Lightroom curve comparisons.
scripts/compare-preview.py Compares resized sRGB previews without exposure/color fitting; distinct from the Rust comparison command.

Use the README's development section for the standard suite. Private fixture checks require external data and are explicitly ignored by default. A passing unit suite does not replace the photographic/manual checks in the validation docs.

Build, packaging and documentation

Location Responsibility
Cargo.toml, Cargo.lock Package/toolchain requirements, dependencies and locked resolution.
build.rs The app's build script: the MCP guide's link and, on Windows, the executable's icon and version information. No C code is built or linked.
Makefile Build/check and local install/uninstall shortcuts.
packaging/macos/app.sh, Info.plist Local Finder-launchable macOS bundle and its metadata.
rawmakase.desktop, rawmakase.svg Linux launcher and application icon.
LICENSE, Adobe notice Project licensing and third-party DNG attribution.
README Build/run instructions, controls, CLI examples and supported scope.
Documentation index Every page under docs/, with its status (Current, Record or Plan).

When adding or moving a module, update its entry here. Put API contracts in Rust doc comments, ownership decisions in the architecture guide, and measured results in dated pages under records so each has a clear home.

Camera parity diagnostics

scripts/cameras/check-calibration.py audits converter metadata against the camera table; data/camera-calibration-facts.json holds public-sample and anonymous local numerical evidence. scripts/cameras/parity.py captures and verifies Camera Raw renders and compares frozen references with RAWmakase. See camera parity.