Skip to content

Lumen v2.0.0 — Rust Release

Choose a tag to compare

@github-actions github-actions released this 11 Nov 03:31
· 23 commits to rust since this release

Lumen v2.0.0 — Rust Release

Lumen 2.0 is a milestone release marking the complete transition from the original Go codebase to a native Rust architecture. The core upload engine (lumen-core) and desktop client (Tauri 2) have been rebuilt from the ground up for lower resource usage, smaller binary footprints, and native platform integration.

This release cuts GUI binary size in half (15.9 MB vs 30.7 MB), reduces the standalone CLI binary to 5.3 MB, drops idle memory usage by ~40%, adds native Linux dynamic Material 3 theming via Matugen, and addresses all identified security edge cases and functional bugs across the stack.


What's New

Native Rust Architecture (Tauri 2 & lumen-core)

  • Core Engine (lumen-core): Replaced the Go backend with a dedicated Rust crate handling hashing, SQLite deduplication, directory scanning, and Google Photos API communications with strict memory safety.
  • Resource Footprint:
    • GUI Binary: Reduced from 30.7 MB down to 15.9 MB (48% smaller).
    • CLI Binary: Reduced from 29.2 MB down to 5.3 MB (82% smaller).
    • Idle Memory (RSS): ~40% lower memory usage across the process tree with zero garbage-collection overhead.
    • CLI Execution: 1.9x faster startup and command execution (2.9 ms vs 5.5 ms).
  • Tauri 2 IPC: Replaced the legacy Wails bridge with Tauri 2's zero-copy IPC for improved stability, faster state synchronization, and native window management across platforms.

Linux Dynamic Material 3 Theming (Matugen)

  • Desktop Color Sync: Added native support for Linux desktop dynamic theming. Lumen parses color schemes generated by Matugen, Quickshell, or wallpaper tools (reading from ~/.local/state/quickshell/user/generated/colors.json, ~/.config/matugen/colors.json, or wallpaper images).
  • Live Theme Watcher: Added an inotify directory watcher that monitors active palette files and smoothly transitions the Material 3 theme in real time when wallpaper or system colors change.
  • Dynamic Swatch: Added a dynamic theme swatch in Settings > Appearance (available on supported Linux systems).

Real-Time Scan Progress & Direct Cancellation

  • Directory Indexing Progress: Added live progress events (scan:progress) during local folder scanning, showing file discovery counts as they are indexed.
  • Immediate Cancellation: Cancelling a scan now halts the indexing loop immediately via shared cancellation tokens instead of continuing in the background.

Remote Album Event Pipeline

  • Added dedicated event dispatching (AlbumProgress, AlbumComplete, AlbumError). Managing or creating Google Photos albums now provides live progress and explicit error reporting rather than failing silently.

Bug Fixes

  • Upload Status & Thread Card IPC Casing: Fixed an IPC model casing mismatch between the Rust backend (camelCase) and the Vue frontend (PascalCase). Upload success/error counts, thread progress cards, and real-time byte counters now display accurately.
  • Chromium Process Cleanup on Sign-In Cancel: Cancelling or closing the Google browser sign-in modal now terminates the spawned browser process immediately via tracked process IDs, preventing orphaned background processes.
  • Live Photo Upload Progress: Connected byte-level progress callbacks to both photo and video streams of Live Photos, eliminating paused progress indicators during video uploads.
  • Live Photo Circuit Breaker: Added circuit breaker tripping on network or quota errors during Live Photo operations, preventing repeated requests during connection drops.
  • Windows User-Level Browser Discovery: Added search paths for per-user browser installs in %LOCALAPPDATA% (Chrome, Brave, Edge) and switched detection from which to where.exe.
  • Google OAuth Cookie Matching: Made cookie name matching case-insensitive so authentication tokens returned with alternate casing (such as Token) are captured correctly.
  • Watched Folder Specificity: Fixed folder configuration shadowing by sorting watched folders longest-path-first and enforcing strict boundary checks when subfolders are disabled.
  • Update Check Parameter Casing: Fixed a parameter mismatch (redirectURL vs redirectUrl) that caused update checks to fail on Tauri 2.
  • Vue Template Cleanups: Removed an invalid child v-memo directive in the theme palette picker and resolved frontend lint warnings.

Security & Reliability Hardening

High Severity

  • Upload Engine Concurrency Race (CWE-362): Enforced an atomic compare-exchange (compare_exchange) check on is_uploading. Concurrent upload triggers now queue cleanly into pending_watch_files without spawning overlapping engines or conflicting over SQLite database locks.
  • Tar Slip & Symlink Traversal in Installer (CWE-59 / CWE-22): Replaced bulk archive extraction in the Windows installer with per-entry validation, rejecting any entry with parent directory components (../) or symlinks pointing outside the target directory.
  • Windows Search Path Binary Hijacking (CWE-426): Enforced fully-qualified system paths (%SystemRoot%\System32\...) for all system process invocations (powershell.exe, cmd.exe, where.exe), preventing untrusted binary execution from the working directory during elevated cleanup.
  • Symlink Exfiltration & Deletion Defense (CWE-59 / CWE-61): Switched all file operations across scanning, watching, and Live Photo parsing to symlink_metadata, rejecting symlinks to prevent accidental file reads or deletion outside watched folders.
  • Proxy Bypass Enforcement (CWE-200): Fixed instances in the upload engine and album manager that bypassed user-configured HTTP/SOCKS5 proxies.

Medium Severity

  • SSRF & Open Redirects in Update Checker (CWE-918 / CWE-601): Enforced strict HTTPS origin verification requiring update queries and redirects to point directly to https://github.com/Reiux/ before making requests.
  • Temporary File Race in Windows Installer (CWE-377): Replaced static cleanup script paths in %TEMP% with uniquely randomized filenames and immediate post-run deletion.
  • Windows Drive Letter Casing (CWE-178): Added case-insensitive path normalization on Windows so variations like C:\ vs c:\ resolve to the correct folder configuration and account.
  • Canonicalization Error Fallback (CWE-754): Added fallback handling to original file paths when canonicalize() fails on UNC or long paths, preventing skipped files during directory scans.
  • Cleartext Credential Protection (CWE-319): Enforced HTTPS for all non-loopback custom endpoints, restricting plain HTTP strictly to localhost and 127.0.0.1.
  • Atomic File Creation & Restricted Permissions (CWE-377 / CWE-276): Stored credentials, configuration files, and SQLite databases (including WAL/SHM files) with O_CREAT | O_EXCL | libc::O_NOFOLLOW and restricted 0600 permissions on Unix.
  • Named Pipe / FIFO Hang Mitigation (CWE-400): Enforced strict metadata.is_file() checks before opening files to prevent scanner threads from hanging on special device files or FIFOs.
  • Bounded HTTP Streaming (CWE-400): Added length-bounded response body reading (capped at 4 MB for API/auth, 512 KB for updates) to prevent out-of-memory exhaustion.

Low Severity

  • Installer HTML Injection Prevention (CWE-79): Replaced innerHTML interpolation with safe textContent DOM nodes in the installer webview.
  • Cryptographic Device ID Entropy (CWE-330): Replaced timestamp nanosecond XORing with 64-bit random values (rand::random::<u64>()).
  • Non-Blocking Backlog Counting: Converted recursive folder backlog calculation to an asynchronous background task via tokio::task::spawn_blocking.
  • Sensitive Memory Wiping (CWE-226): Zeroed out cached token memory upon session invalidation and account logout.
  • Clock Rollback Safety (CWE-754): Replaced unhandled .duration_since(UNIX_EPOCH).unwrap() calls with .unwrap_or_default().

Packaging & Workflows

  • Separated CI & Release Workflows: Code pushes to branch rust run a lightweight test and lint suite on Ubuntu (~1-2 minutes). Heavy multi-platform release builds (macOS Universal .dmg, Windows x64 .exe, Windows ARM64 .exe, Linux AppImage/deb) trigger strictly when a version tag (v*) is pushed.
  • Local Build Guide: Added BUILDING.md with comprehensive prerequisites and build commands for all supported desktop targets.