Technology

Why We Chose Rust and Tauri Over Electron for a Video Desktop App

Electron ships a whole browser. Tauri ships a native webview. For a video application that decodes RAW formats and manages large libraries, that difference shows up in memory, installer size and CPU work.

FrameQuery Team31 March 20263 min read

One of the first decisions in building FrameQuery was the desktop framework. The two candidates were Electron and Tauri. We chose Tauri with a Rust backend.

Electron

Electron is the standard framework for cross-platform desktop apps: VS Code, Slack, Discord, Figma, Notion. It bundles Chromium and Node.js and runs your web app inside that browser.

The developer experience is good. You write a web app, wrap it, and it runs on Windows, macOS and Linux. For a video application the costs of that approach add up.

Memory

An empty Electron app starts at 80 to 150 MB of RAM. With a few webviews, state management and a media player it reaches 300 to 500 MB.

FrameQuery holds large libraries, search indexes and a video preview. Memory spent on Chromium is memory not available for those.

Tauri uses the native webview (WebView2 on Windows, WebKit on macOS and Linux) instead of bundling Chromium. A Tauri app starts at 20 to 40 MB.

Installer size

An Electron app ships Chromium with every install, which is 150 to 200 MB before any application code. Tauri adds 3 to 5 MB. The FrameQuery installer is about 10 MB.

CPU work in Node.js

Electron's backend is Node.js. It handles I/O-bound work (HTTP, file reads, database queries) well. It is a poor fit for CPU-bound work, and video applications have a lot of it:

  • Decoding proprietary formats. R3D and BRAW need vendor SDKs written in C/C++. Node.js can call native code through addons, with awkward ergonomics and measurable overhead.
  • Video encoding pipelines. Spawning processes and piping frame data through them.
  • Large search indexes. Loading and querying indexes with millions of entries.
  • GPU acceleration. CUDA and Metal integration calls system APIs directly.

Once you are writing native addons for all of that, you are writing C++ and paying Node.js overhead on top.

Why Rust

Native performance

Rust compiles to native code with no runtime, no garbage collector and no interpreter. When thousands of frames go through a GPU pipeline, a garbage collector pause mid-decode is a dropped frame or a stalled pipeline. Rust has no collector.

Safe integration with C/C++ SDKs

FrameQuery links the RED R3D SDK and the Blackmagic BRAW SDK, both C/C++. Use-after-free, double-free and data races are the errors that crash video applications in production. Rust turns most of them into compile errors.

Cross-platform

The codebase compiles on Windows, macOS and Linux. Platform-specific code is limited to the GPU backends (CUDA on Windows and Linux, Metal on macOS) and a few OS details.

Why Tauri

Tauri is one of several ways to build a desktop app in Rust. We could have used egui or iced, or embedded a webview by hand.

Web frontend, native backend

The FrameQuery UI is a web application built with the usual web tooling, including hot module reloading in development. The backend is Rust. Tauri's command system lets the frontend call Rust functions with typed arguments and return values, so the UI asks for "clips matching this query" and Rust does the search.

Tauri 2 and mobile

Tauri 2 supports iOS and Android. FrameQuery is a desktop app, but the Rust core would carry over to mobile with only the frontend changing.

Plugins

Tauri's plugins cover file system access, OS dialogs, the system tray, auto-updates and deep linking, so we did not write those per platform.

Local data

Search data lives in a search engine compiled into the application binary. There is no search server and nothing to connect to.

Video metadata, source folders, processing status and settings live in a local database file. Backup means copying files. Moving to a new machine means copying files.

Trade-offs

Compile times. A clean build of the Rust backend takes minutes. Incremental builds are faster, and the loop is still slower than Node.js.

Smaller ecosystem. npm has a package for almost everything. Rust's ecosystem is smaller, and we have written more from scratch than we would have in Electron.

Learning curve. Engineers coming from JavaScript or Python need time with the ownership model. The borrow checker rejects some code that would be fine elsewhere until you learn the idioms.

Webview differences. WebView2, WebKit and WebKitGTK render slightly differently. Electron's bundled Chromium is identical everywhere. The differences have been small and fixable with standard CSS.

For a video application that decodes RAW formats, manages large libraries and drives GPU acceleration, the memory, size and performance gains outweigh those costs.

Download FrameQuery to try it.