>_EXECUTIVE SUMMARY
AUDIO_HAXOR is a Tauri v2 desktop application for cataloging, analyzing, and arranging music-production assets. The Rust backend (src-tauri/) walks the filesystem to index VST2/VST3/AU/CLAP/AAX plugins, audio samples, DAW projects across 13 formats, MIDI files, presets, PDFs, and video reference material into a SQLite catalog. A separate JUCE 8 sidecar process (audio-engine) handles device I/O, plugin hosting, sample-accurate playback, and waveform / spectrogram rendering over a stdin/stdout JSON protocol. The frontend is a WebKit-rendered cyberpunk HUD with 51 JS modules driving the grid views, command palette, tray popover, and ALS Ableton-project generator.
Source Distribution — 228,362 total lines
Production = Rust src (75,711) + Frontend JS (58,324) + HTML (17,080) + audio-engine C++ (5,802). Tests & benches = 116 Rust integration modules under src-tauri/tests/ + criterion bench + 7 example binaries. Tooling = 60 build / i18n / packaging scripts (Bash + Node + Python).
#SUBSYSTEM BREAKDOWN
The Rust backend (75,711 LOC across 47 files) is partitioned below by role. db.rs dominates — the entire SQLite schema (46 tables, 93 indices), all CRUD helpers, plus filter / facet / stats queries live in a single file. lib.rs is the Tauri-command surface (291 registered IPC handlers) plus app setup. ALS / MIDI / track generators are the largest concentration of domain logic, including the trance-arrangement state machine and Ableton-project XML emitter.
| Subsystem | Key Files | Lines | % | Share | Description |
|---|---|---|---|---|---|
| Database | db | 16,310 | 21.6% | SQLite schema (46 tables, 93 indices), connection management, all CRUD queries, filter facets, stats aggregations, palette preview, cache tables, migration paths | |
| App Core / IPC | lib, main | 12,167 | 16.1% | Tauri entry point, 291 #[tauri::command] handlers, event emission, window setup, prefs load/save, panic handler, async runtime wiring | |
| ALS / Track Generators | track_generator, als_generator, midi_generator, trance_generator, trance_starter, als_project | 16,773 | 22.2% | Ableton Live Set (.als) project synthesizer: scene/track/clip layout, sample auditioning + filtering, BPM-locked alignment, kit selection, group routing, sidechain compressor templates, gzip XML emission | |
| Scanners | scanner, audio_scanner, daw_scanner, midi_scanner, preset_scanner, pdf_scanner, video_scanner, unified_walker, bulk_stat, scanner_skip_dirs, file_watcher, similarity, content_hash | 9,167 | 12.7% | Rayon-parallel filesystem walkers for plugins, samples, DAW projects, MIDI, presets, PDFs, video; unified scan orchestration; bulk stat(); notify-based watchers; SHA-256 content hashing; similarity fingerprinting | |
| Audio Analysis | sample_analysis, bpm, key_detect, lufs, sample_filters | 5,790 | 8.0% | Per-sample BPM autocorrelation, key detection (chromagram), LUFS loudness (BS.1770), filter classification (kick / snare / hat / bass / lead / pad), batch analysis runner with cancellation | |
| History | history | 3,487 | 4.8% | Per-domain scan snapshot store: save / load / diff / list / delete for plugins, audio, DAW, presets, MIDI, PDFs, videos; preferences JSON round-trip | |
| Tray / Menu (macOS) | tray_menu, native_menu, tray_popover_escape_macos, app_activity_macos, space_preview_macos | 3,021 | 4.2% | Status-bar tray icon with now-playing waveform, tray popover positioning, native NSMenu, Cmd+Q passthrough, space-switch preview, app-activation tracking via objc2 / objc2-app-kit | |
| Cross-Reference | xref | 2,218 | 3.1% | DAW-project ↔ plugin / sample cross-reference graph: parses every supported project format for plugin instances and sample references, builds bidirectional lookup tables | |
| i18n | app_i18n | 2,044 | 2.8% | Runtime string catalog loader: 3,033 English keys mirrored across 27 locales; toast strings; placeholder substitution; fallback resolution to en | |
| Audio Engine Bridge | audio_engine, audio_extensions | 1,385 | 1.9% | Sidecar process management: spawn / restart / health-check the JUCE engine; stdin/stdout JSON RPC; EOF watchdog; next-track hinting; process-stats sampling | |
| MIDI / KVR / Misc | midi, kvr, waveform_container_extract, waveform_prefetch, terminal, open_with_app, pdf_meta, path_norm | 3,071 | 4.3% | SMF parser, KVR plugin database scraper, ALS-embedded waveform extraction, prefetch worker pool, PTY terminal, "Open With" launcher, PDF metadata extractor, path normalizer | |
| Tests | tests/*.rs | 64,507 | +85.2%* | 116 integration test modules: handcrafted tables (table-driven regression catchers), behavioral suites (focused / heavy / ton / ultra / expanded / more), DB / IPC / history serde round-trips, BPM detection edge cases, file-watcher patterns, parser corner cases | |
| Benches / Examples | benches/benchmarks.rs, examples/generate_*.rs | 6,938 | +9.2%* | Criterion HTML-report bench harness; 7 example binaries for generating empty / toy / schranz / techno / true-techno ALS projects and sample-filter dry-runs | |
| PRODUCTION TOTAL | 75,711 | 100% | 47 files in src-tauri/src/ | ||
* Test / bench percentages are relative to production LOC (75,711), not part of the 100% above.
$TOP 15 FILES BY SIZE
The 15 largest files in src-tauri/src/ account for 80.8% of the Rust production slice. db.rs is by far the heaviest — SQLite is the catalog spine, every query routes through it, and inlined SQL templates plus filter-stat aggregations push the file past 16k lines.
| File | Lines | Role |
|---|---|---|
| src-tauri/src/db.rs | 16,310 | SQLite schema (46 tables, 93 indices), connection pool, all CRUD + filter + stats queries, palette preview, cache tables |
| src-tauri/src/lib.rs | 12,167 | 291 #[tauri::command] handlers, Tauri setup, event emission, window restore, panic handler |
| src-tauri/src/track_generator.rs | 7,177 | Per-track ALS clip layout: BPM-locked alignment, scene assembly, automation lanes, kit routing, group sidechain |
| src-tauri/src/history.rs | 3,487 | Per-domain scan-history store: save / load / diff / list / delete for 7 inventory domains plus prefs round-trip |
| src-tauri/src/sample_analysis.rs | 3,252 | Background batch analyzer: BPM + key + LUFS for unanalyzed samples; cancellation tokens; stats aggregation |
| src-tauri/src/midi_generator.rs | 2,882 | SMF synthesis: lead / chord / drum-kit MIDI emission with scale + key + velocity humanization |
| src-tauri/src/als_generator.rs | 2,927 | Ableton Live Set composer: scene / track allocation, sample selection, blacklist / whitelist, kit picker, gzip XML emission |
| src-tauri/src/xref.rs | 2,218 | DAW-project cross-reference graph: parses every supported project format for plugin + sample references |
| src-tauri/src/app_i18n.rs | 2,044 | Runtime i18n: catalog loader for 27 locales, placeholder substitution, fallback resolution |
| src-tauri/src/als_project.rs | 1,790 | Standalone ALS-project file emitter: empty / techno / schranz starter templates with embedded XML fragments |
| src-tauri/src/tray_menu.rs | 1,501 | Status-bar tray icon, now-playing waveform render, tray popover positioning, IPC for popover actions |
| src-tauri/src/unified_walker.rs | 1,433 | Single-pass walker that classifies + emits inventory rows for all 7 domains in one filesystem traversal |
| src-tauri/src/audio_scanner.rs | 1,327 | Audio sample scanner: Symphonia-based metadata probe (duration, channels, sample rate, bit depth) |
| src-tauri/src/audio_engine.rs | 1,316 | JUCE sidecar lifecycle: spawn / restart / health-check, stdin/stdout JSON RPC, EOF watchdog |
| src-tauri/src/daw_scanner.rs | 1,224 | DAW-project scanner: 13 formats including .als, .flp, .rpp, .cpr, .logic, .ptx, .bwproject, .song, .reason, .aup3, .band, .ardour, .dawproject |
| TOP 15 SUBTOTAL | 61,055 | 80.8% of 75,711-line Rust production slice |
$TOP 10 FRONTEND MODULES
The 10 largest JS modules under frontend/js/ account for 59.2% of the 58,324-line frontend slice. audio.js at 8,759 lines is the playback / waveform / spectrogram / drag-source / player-history controller — the longest single JS file in the app.
| File | Lines | Role |
|---|---|---|
| frontend/js/audio.js | 8,759 | Playback controller, waveform / spectrogram canvas, native file drag, player history |
| frontend/js/file-browser.js | 6,312 | Power file browser: multi-pane state, drag-resize/swap/reorder, Spotlight FTS, modal toolset |
| frontend/js/audio-engine.js | 4,491 | Browser-side bridge to the JUCE sidecar: device list, MIDI device list, plugin host UI, transport |
| frontend/js/context-menu.js | 3,306 | Right-click menu builder per row type: 50+ actions across all inventory grids |
| frontend/js/settings.js | 2,497 | Settings tab: directory pickers, theme selector, scan throttle, audio device routing, watcher toggle |
| frontend/js/ipc.js | 2,291 | Wrapper around window.__TAURI__.core.invoke: typed helpers per IPC command (~291 wrappers) |
| frontend/js/utils.js | 1,830 | Shared formatters, debounce / throttle, dataset diff helpers, format-size / format-duration |
| frontend/js/command-palette.js | 1,707 | Cmd-K palette: fuzzy match across actions, inventory rows, settings, tutorial steps |
| frontend/js/video.js | 1,706 | Video tab: thumbnail strip, scrub bar, metadata pane |
| frontend/js/visualizer.js | 1,634 | Live FFT visualizer + analyzer modes (oscilloscope, spectrum, spectrogram) |
| TOP 10 SUBTOTAL | 34,533 | 59.2% of 58,324-line frontend slice (51 modules) |
@PROCESS ARCHITECTURE
Three processes per running instance: the Tauri shell (main), the WebKit frontend, and the JUCE audio-engine sidecar. The shell owns the SQLite catalog and filesystem walkers; the WebView drives the UI; the sidecar holds juce::AudioDeviceManager, hosts plugin instances, and renders waveforms. The shell talks to the frontend over Tauri's IPC bus (291 commands), and to the sidecar over a stdin/stdout JSON line protocol.
┌──────────────────────────────────────────────────────────────────┐
│ AUDIO_HAXOR DESKTOP (Tauri v2) │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────┐ ┌────────────────────────────┐ │
│ │ WebView frontend │ ◀─────▶ │ Rust shell (src-tauri) │ │
│ │ (frontend/) │ IPC │ ──────────────────── │ │
│ │ 51 JS modules │ 291 │ • 291 #[tauri::command] │ │
│ │ 58,324 LOC │ cmds │ • SQLite catalog (db.rs) │ │
│ │ WebKit (release) │ events │ 46 tables / 93 indices │ │
│ │ http (dev) │ ──────▶ │ • Rayon-parallel walkers │ │
│ │ │ │ • Symphonia metadata │ │
│ │ • Grid views │ │ • SHA-256 fingerprinter │ │
│ │ • Cmd palette │ │ • ALS generator (XML+gz) │ │
│ │ • Tray popover │ │ • i18n catalog loader │ │
│ │ • Visualizer │ │ 27 locales / 3,279 keys│ │
│ │ • Settings │ │ • objc2 macOS bindings │ │
│ └────────────────────┘ └─────────────┬──────────────┘ │
│ │ │
│ stdin/stdout JSON line protocol │
│ ▼ │
│ ┌─────────────────────────────┐ │
│ │ audio-engine sidecar │ │
│ │ ───────────────────────── │ │
│ │ • C++20 / JUCE 8.0.4 │ │
│ │ • 5,802 LOC (7 files) │ │
│ │ • juce::AudioDeviceManager │ │
│ │ • Plugin hosts: │ │
│ │ VST3 / AU / CLAP* │ │
│ │ • Sample-accurate playback │ │
│ │ • Waveform render │ │
│ │ • Spectrogram (FFT) │ │
│ │ • AU CocoaUI patch (JUCE 8)│ │
│ │ • Crash handler / watchdog │ │
│ └─────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────┘
│
│ persistent state
▼
┌──────────────────────────────────────────────────────────────────┐
│ ~/Library/Application Support/com.menketechnologies.audio-haxor │
│ ─────────────────────────────────────────────────────────── │
│ • catalog.sqlite (46 tables, FTS-eligible search) │
│ • prefs.json (window state, scan dirs, theme) │
│ • cache/ (waveform PNGs, spectrogram PNGs) │
│ • history/ (per-domain snapshot JSONs) │
└──────────────────────────────────────────────────────────────────┘
&SCANNERS & WALKERS
Seven independent scanners plus a unified walker that classifies and emits inventory rows for all domains in one filesystem traversal. Every scanner is Rayon-parallel; cancellation is via AtomicBool stop-flags checked per file. The unified_walker at 1,433 lines collapses 7 individual walkdir passes into one, which is the path used by the "Scan All" button.
Plugin Scanner
scanner.rs (1,042 LOC) — walks the user's plugin directories for VST2 / VST3 / AU / CLAP / AAX. Architecture badges (ARM64 / x86_64 / Universal) come from direct Mach-O / PE binary parsing, no file(1) shellout.
Audio Sample Scanner
audio_scanner.rs (1,327 LOC) — Symphonia-based metadata probe: duration, channels, sample rate, bit depth pulled from file headers. walkdir + rayon::par_bridge.
DAW Project Scanner
daw_scanner.rs (1,224 LOC) — 13 project formats: .als, .flp, .rpp, .cpr, .logic, .ptx, .bwproject, .song, .reason, .aup3, .band, .ardour, .dawproject.
MIDI Scanner
midi_scanner.rs (473 LOC) — SMF (Standard MIDI File) walker. Tempo, track count, duration extracted from track header chunks via midi.rs (752 LOC).
Preset Scanner
preset_scanner.rs (684 LOC) — format-tagged preset file discovery with per-format size bucketing; stacked disk-usage bar in the grid header.
PDF Scanner
pdf_scanner.rs (442 LOC) — PDF file walker with deferred metadata extraction via pdf_meta.rs (220 LOC) using lopdf; page-count and size pulled lazily.
Video Scanner
video_scanner.rs (476 LOC) — video reference walker. Metadata via Symphonia where supported; falls back to size + extension.
Unified Walker
unified_walker.rs (1,433 LOC) — single-pass walker that classifies every dirent into one of the 7 domains and emits inventory rows in one traversal. Used by "Scan All".
File Watcher
file_watcher.rs (472 LOC) — notify-based recursive watcher per scan-root directory. Debounced changes trigger targeted re-scans, not full re-walks.
Bulk Stat
bulk_stat.rs (524 LOC) — batched stat() + size accumulator that avoids a per-file syscall round-trip when totalizing inventory size.
Skip Filter
scanner_skip_dirs.rs (127 LOC) — hand-curated skip list for known-noise paths (node_modules, .git, system caches) applied at every walker.
Cross-Reference
xref.rs (2,218 LOC) — parses every supported DAW-project format for embedded plugin instances and sample references, then builds a bidirectional graph queryable from the project row or the plugin row.
!ALS PROJECT GENERATOR
16,773 lines across six files compose the Ableton Live Set generator — the largest single feature in the app by code mass (22.2% of the Rust slice). Output is gzip'd XML that opens natively in Ableton Live; the generator selects samples from the catalog by genre / BPM / key constraints, lays out scenes, routes groups, attaches sidechain compressors, and emits the complete project file with no post-processing required.
| File | Lines | Role |
|---|---|---|
| track_generator.rs | 7,177 | Per-track clip layout: BPM-locked alignment, automation lanes, kit routing, group sidechain insertion |
| midi_generator.rs | 2,882 | SMF synthesis: lead, chord, and drum-kit MIDI emission with scale + key + velocity humanization |
| als_generator.rs | 2,927 | Top-level project synthesizer: scene allocation, sample selection by genre / kit, blacklist + whitelist enforcement |
| als_project.rs | 1,790 | Standalone ALS-project file emitter: empty / toy / techno / schranz / true-techno starter templates |
| trance_generator.rs | 1,354 | Trance-specific arrangement state machine: intro / breakdown / build / drop / outro section sequencing |
| trance_starter.rs | 643 | Trance-only starter project: standalone short arrangement scaffolding |
| ALS GENERATOR TOTAL | 16,773 | 22.2% of Rust production slice |
// EMBEDDED XML TEMPLATES (raw inline assets in src-tauri/src/)
empty_project_template.als.gz— gzip'd minimal Ableton 11+ project, deserialized then mutatedaudio_track_template.xml—<AudioTrack>fragment with default routingmidi_track_template.xml—<MidiTrack>fragment with default channelgroup_track_template.xml—<GroupTrack>fragment with default colorgroup_sidechain_compressor_template.xml—<DeviceChain>with sidechain wiringmaster_eq8_hpf_template.xml—<Eq8>with high-pass enabledmaster_limiter_template.xml—<Limiter>with ceiling 0.0 dB
~AUDIO ENGINE SIDECAR
A separate process built with JUCE 8.0.4 (pulled via CMake FetchContent) handles all device I/O, plugin hosting, sample-accurate playback, and offscreen rendering. The Rust shell spawns it as a child process; communication is line-delimited JSON over stdin/stdout. Crash isolation: a sidecar segfault never takes the main app down — the shell restarts it with state reload.
| File | Lines | Role |
|---|---|---|
| audio-engine/src/Engine.cpp | 4,667 | Core engine: juce::AudioDeviceManager wiring, plugin hosting (VST3 / AU / CLAP), transport, scrubbing, command dispatch |
| audio-engine/src/VisualPreview.cpp | 328 | Offscreen waveform + spectrogram render to PNG; FFT for spectrum view |
| audio-engine/src/CrashHandler.cpp | 289 | Signal handler that emits a crash JSON before terminating; restartable from shell |
| audio-engine/src/AppLog.cpp | 121 | Rotating log file under ~/Library/Logs/audio-haxor/audio-engine.log |
| audio-engine/src/Main.cpp | 120 | Entry point: arg parse, JUCE init, message-loop pump |
| audio-engine/src/ParentWatchdog.cpp | 95 | Watches the parent Rust process; exits if parent dies (no orphan sidecars) |
| audio-engine/src/CocoaHelpers.mm | 53 | Objective-C++ bridge for macOS-specific NSWindow / NSApplication calls |
| AUDIO ENGINE TOTAL | 5,673 | 7 .cpp/.mm files shown (+ 6 .hpp headers = 5,802 LOC total, 13 files), C++20 |
The CMake build patches juce::AudioUnitPluginWindowCocoa::createView at configure-time: stock JUCE 8 prefers the async RequestViewController path over the legacy CocoaUI path, but the XPC delivery never arrives in a spawned sidecar process, so AUv2 plugins (UAD, Sonimus, etc.) would render permanently blank. The patch gates the async branch on pluginView == nil, restoring the legacy attach path. Idempotent — re-running CMake is a no-op.
%SQLITE CATALOG
46 tables and 93 indices, all bundled in src-tauri/src/db.rs (16,310 LOC). The catalog covers every inventory domain plus history snapshots, KVR plugin metadata, waveform / spectrogram caches, and per-row notes / tags / favorites. rusqlite with the bundled feature so the binary ships its own SQLite — no system dependency.
// SCHEMA DOMAINS
Inventory Tables
One per domain: plugins, audio, daw, midi, presets, pdfs, video
History
Per-domain snapshots: *_history_runs, *_history_items
Analysis
BPM / key / LUFS cache, fingerprint cache, content-hash cache, similarity index
KVR
Scraped plugin database: latest version, download URL, manufacturer link
Annotations
notes, tags, favorites, player_history, smart playlists
Cross-Reference
DAW-project ↔ plugin / sample edges built by xref.rs
Render Caches
Waveform PNG cache, spectrogram PNG cache (paths + hash + mtime)
Filter Stats
Pre-aggregated facet counts per domain to avoid per-query GROUP BY on millions of rows
^IPC COMMAND SURFACE
291 IPC commands defined in lib.rs and registered via tauri::generate_handler!. The frontend invokes them through window.__TAURI__.core.invoke(name, args); frontend/js/ipc.js (2,291 LOC) wraps each one with a typed helper. Domains below break down what the frontend can ask the shell to do.
| Domain | Cmds (approx) | Examples |
|---|---|---|
| Scanning | 14 | scan_plugins, scan_audio_samples, scan_daw_projects, scan_midi_files, scan_presets, scan_pdfs, scan_video_files, scan_unified, stop_* |
| History | 42 | history_get_scans, history_diff, *_history_save / get_scans / get_detail / delete / clear / latest / diff for each domain |
| Database Queries | 22 | db_query_audio, db_query_plugins, db_query_daw, db_*_filter_stats, db_*_stats, db_cache_stats |
| Audio Engine | 9 | audio_engine_invoke, audio_engine_restart, EOF watchdog start/stop, playback flags, BG-job throttle |
| Analysis | 10 | estimate_bpm, detect_audio_key, measure_lufs, batch_analyze, compute_fingerprint, find_similar_samples, find_content_duplicates |
| ALS Generator | 14 | generate_als_project, cancel_als_generation, blacklist / whitelist add / remove / clear / count, generate_midi_lead, generate_midi_kits, generate_trance_starter |
| Annotations | 26 | favorites_*, note_*, tags_*, tag_*, player_history_* |
| Export / Import | 16 | export_plugins_json / csv, export_audio_json / dsv, export_daw_*, export_presets_*, export_pdfs_*, export_videos_*, export_toml, export_pdf |
| Filesystem | 12 | fs_list_dir, delete_file, rename_file, write_text_file, write_binary_file, read_text_file, open_with_app, open_*_folder |
| Tray / Window | 8 | tray_menu::update_tray_now_playing, tray_popover_action / resize / get_state / push_subtitle / get_ui_theme / hide, show_main_window |
| Terminal (PTY) | 4 | terminal::terminal_spawn / write / resize / kill |
| Misc | 86 | prefs, KVR, file watcher, i18n, log, similarity, waveform prefetch, sample-analysis, crate filters, palette preview, etc. |
| TOTAL REGISTERED | 291 | From invoke_handler! in src-tauri/src/lib.rs |
*INTERNATIONALIZATION
3,279 English keys mirrored across 27 locales. Catalogs ship as JSON under i18n/; app_i18n.rs (2,044 LOC) handles runtime resolution with English fallback. The frontend pulls catalogs once on startup and substitutes keys at render time. 43 Python scripts under scripts/ (6,226 LOC) handle catalog generation, gap-fill, audit, and locale-key sync.
Locales: cs, da, de, el, en, es, fi, fr, he, hi, hu, id, it, ja, ko, nl, no, pl, pt, pt-BR, ro, ru, sv, tr, uk, vi, zh-Hans. Audit tooling: i18n_catalog_audit.py diffs each non-EN catalog against EN for missing keys, placeholder drift, and empty values.
.TESTS
9,481 #[test] functions across 116 Rust integration modules in src-tauri/tests/, totaling 64,507 LOC. The largest single test file (handcrafted_tables_massive.rs at 22,878 LOC) is a table-driven regression catcher pinning behaviors that earlier bugs broke. Rule: never delete a test file; never write generic boilerplate tests; every test catches a real bug or pins a real behavior.
// TOP TEST MODULES
| File | Lines | Role |
|---|---|---|
| tests/handcrafted_tables_massive.rs | 22,878 | Mega table-driven regression catcher pinning behaviors fixed bugs introduced |
| tests/behavioral_ultra.rs | 10,984 | Largest behavioral suite: end-to-end scenarios across scan / DB / history / IPC |
| tests/handcrafted_tables_radix_grid.rs | 6,002 | Path-radix / grid-render regression tables |
| tests/handcrafted_tables_fingerprint_grid.rs | 4,869 | Audio fingerprint / similarity regression tables |
| tests/handcrafted_tables_normalize_generated.rs | 1,551 | Generated path-normalization tables |
| tests/behavioral_focused.rs | 796 | Targeted behavioral scenarios — single-feature paths |
| tests/backend_handwritten_history_snapshots.rs | 591 | History snapshot save / load / diff round-trip |
| tests/behavioral_heavy.rs | 587 | Heavy scenarios: large inventories, parallel scan throttling |
| tests/backend_handwritten_db_ipc_json.rs | 585 | DB ↔ IPC JSON serde-shape contracts |
+DEPENDENCIES
51 direct dependency entries in src-tauri/Cargo.toml across [dependencies], target-specific macOS, [build-dependencies], and [dev-dependencies]. Strict preference for foundational crates over fashionable ones; every dep is audited against the build-clean-in-5-years bar.
Tauri Stack
tauri (tray-icon, protocol-asset, image-png, macos-private-api), tauri-plugin-shell, tauri-plugin-dialog, tauri-plugin-drag
Async Runtime
tokio (rt-multi-thread, macros, time), rayon, dashmap
SQLite
rusqlite (bundled, functions, hooks) — bundled SQLite, no system dependency
Audio
symphonia (mp3, aac, flac, ogg, pcm, isomp4, mkv, vorbis) — pure-Rust audio metadata + decode
Serde / Formats
serde, serde_json (preserve_order), toml, plist, flate2, zip (deflate-only)
Filesystem
walkdir, notify, dirs, sysinfo, libc, num_cpus
Hashing
sha2, base16ct — SHA-256 for content fingerprints
HTTP / Web
reqwest (rustls, no default features) — KVR scraper, plugin update checker
printpdf (images, png), lopdf — PDF export + metadata extraction
Terminal
portable-pty — embedded terminal in the in-app PTY tab
macOS Bridge
objc2, objc2-foundation, objc2-app-kit, objc2-web-kit, block2 — native NSMenu, tray, space-switch detection
Bench
criterion (html_reports), seq-macro — dev-only
;PUBLIC API SURFACE
The Rust shell is built as a single rlib (app_lib) consumed by src-tauri/src/main.rs. The public surface is the 291 Tauri-IPC commands registered from lib.rs; internally the crate spans 47 modules.
| Surface | Count | Notes |
|---|---|---|
| IPC commands (lib.rs) | 291 | #[tauri::command] handlers in lib.rs |
#[tauri::command] fns (all) | 294 | Defined across lib.rs (282), tray_menu.rs (8), terminal.rs (4) |
| Structs | 169 | Data shapes — DB rows, IPC payloads, walker state, settings |
| Enums | 5 | Small — most variants are flat tagged-union JSON shapes |
| Frontend modules | 51 | JS modules under frontend/js/ |
| Tutorial pages | 20 | HTML walkthrough under docs/tutorial/ |
?KEY DESIGN DECISIONS
Where the implementation could have gone either way, and why this path was taken.
Sidecar Audio Engine, Not In-Process
A plugin crash inside the host process would take the whole app down. Spawning JUCE as a separate process means a misbehaving VST3 / AU only kills the sidecar — the shell respawns it and reloads state. Cost: a stdin/stdout JSON protocol layer.
SQLite Bundled, Not System
rusqlite with features = ["bundled"] compiles SQLite into the binary. The user never has version drift between system SQLite and what the app expects; the catalog opens identically on every macOS / Linux / Windows install.
Rayon for Walkers, Not Tokio
Filesystem walks are CPU-bound after the kernel returns dirents — metadata probing, header parsing, hashing. Rayon's work-stealing fits this; Tokio's task scheduler would force every probe into a future. Tokio is reserved for the async IPC handlers + reqwest.
Unified Walker
The "Scan All" path used to do 7 separate walkdir passes — one per domain — redoing every readdir() 7 times. unified_walker.rs collapses them into one traversal that classifies and emits per-domain rows in lockstep.
WebKit Frontend, Not Bundled Chromium
Tauri v2 uses the OS WebView (WKWebView on macOS). Saves ~150 MB binary size vs Electron's bundled Chromium; cost: CSS / JS quirks diverge between http://localhost dev and tauri://localhost release WebKit. Mitigated by an explicit Tauri-v2 ruleset (no inline JS, no dynamic canvas resize, no inline styles on innerHTML-inserted elements).
Filter-Stats Cache Tables
Naively, every grid render would GROUP BY on the full inventory to populate facet counts. With millions of files that's hundreds of ms per render. Pre-aggregated *_filter_stats tables are written once after each scan and read instantly on grid open.
Patched JUCE 8 AU CocoaUI Path
Stock JUCE 8 favors the async RequestViewController path for AUv2 plugins, but the XPC delivery doesn't arrive in a spawned sidecar. The CMake build patches the JUCE source at configure-time to gate the async branch on pluginView == nil — AUv2 editors render correctly in the sidecar.
Embedded ALS Templates
Ableton's .als format is gzip'd XML with a strict element schema. Hand-emitting the full XML tree would be brittle; the generator instead deserializes a real Ableton-produced empty project (shipped as empty_project_template.als.gz) and mutates the in-memory tree, then re-emits. Real-DAW round-trip parity.
Locale Catalogs as Plain JSON
27 catalog files under i18n/ — one JSON per locale, sorted-key invariant enforced by sort_app_i18n_catalogs.py --check. Trivial to diff in PRs, trivial to merge, no .po / .mo / .ftl tooling required.
Native macOS Tray via objc2
Tauri's cross-platform tray API can't render a live waveform on the status-bar icon. tray_menu.rs uses objc2-app-kit directly to draw the waveform PNG into an NSImage and assign it — native, no extra process.
Single-Crate, Single-Binary Tauri Target
No workspace / sub-crate split. src-tauri is one crate, one binary, one rlib. Smaller incremental rebuilds, shallower dep graph, simpler release packaging.
Table-Driven Regression Tests
handcrafted_tables_massive.rs at 22,878 LOC pins behaviors that fixed bugs touched. Each row is one input → expected output; refactors that silently break a row fail the test. The rule: never delete a test file, never write generic boilerplate — every row catches a real bug.