Skip to content

Replacing Electron with Rust: Reducing Application size from 149 MB to 7 MB

How cutting the browser runtime shrank our application payload by 95%.

Replacing Electron with Rust: Reducing Application size from 149 MB to 7 MB

Electron is still the default recommendation for desktop software. You get fast prototyping, but your users pay a quiet tax: hundreds of megabytes of bundled browser runtime, heavy memory consumption, and sluggish startup times.

We challenged that default by migrating A1 Slice, our open-source desktop tool for video clipping, from Electron to native Rust. The results were decisive: our core application and runtime payload dropped from 149 MB to 7 MB (bringing the full GPU-bundled AppImage from 342 MB down to 193 MB), cold startup dropped to milliseconds, and our feature velocity actually improved.

The Real Numbers

Both versions were built and packaged under identical conditions for Linux x86_64, including local GPU support for speech recognition.

MetricElectron VersionRust Native VersionDifference
Total Linux AppImage342 MB (326 MiB)193 MB (184 MiB)149 MB smaller (43.5% reduction)
Whisper CUDA GPU Binary195 MB195 MBIdentical compiled binary
Application and Runtime~149 MB~7 MB~95% smaller payload
Cold Startup Time2.5 to 3.5 seconds< 100 millisecondsOpens immediately
Idle Memory (RAM)180 to 250 MB~35 MBOver 80% reduction

Notice what the numbers show: the compiled CUDA Whisper binary takes up 195 MB in both versions (compressing to about 178 MB inside squashfs). Once you look past that shared model engine, the actual application payload dropped from roughly 149 MB down to just 7 MB.

Framework Choice Matters More Than Language

The dramatic size difference is not just about Rust versus JavaScript. It is about the framework architecture you choose to wrap around your product.

When you package an Electron app, you ship an entire Chromium web browser and a complete Node.js runtime. A1 Slice has four core jobs: transcribe audio, find highlights, reframe to portrait, and burn subtitles. To show those four workflows, the Electron build had to pack:

  • Chromium rendering engines and GPU helper processes
  • A Node.js runtime and hundreds of bundled npm packages
  • A bundled 77 MB static FFmpeg executable
  • Complex IPC serialization layers between main and renderer threads

In Rust, we used egui for the interface. The UI compiles directly into the application binary. The compiled release binary is only 14 MB stripped. It talks directly to the operating system graphics stack (Wayland, X11, or OpenGL) without an embedded browser. It also uses the FFmpeg tools already available on the host system instead of bundling redundant binaries.

You do not need to ship an entire web browser to paint buttons, sliders, and video previews.

Startup: From Seconds to Milliseconds

Startup speed is where users feel the difference immediately.

An Electron application has to initialize multiple operating system processes before the first frame can even render:

  1. Spawn the main Node.js process.
  2. Spawn the Chromium GPU process.
  3. Spawn the renderer web process.
  4. Initialize the V8 engine and parse megabytes of bundled JavaScript.

The native Rust binary is a single executable. The operating system loads it into memory, creates the window, and paints the initial screen in under 100 milliseconds. When you click the app, it is already open and ready for work.

The Developer Velocity Myth

Teams often choose Electron because web development feels fast, while native systems programming has a reputation for being slow and difficult.

With modern AI coding workflows, that trade-off no longer holds true.

Writing native software with AI assistance is just as fast as building web frontends, and it is significantly safer to maintain:

The compiler acts as an automated reviewer

When AI generates code in JavaScript or TypeScript, silent runtime errors, loose type coercion, and IPC serialization bugs often slip through into production. In Rust, the compiler rejects invalid memory lifetimes, concurrency race conditions, and type mismatches immediately. If it compiles and passes tests, it works.

AI accelerates systems engineering

Writing timeline geometry, SRT subtitle timecode parsers, and subprocess managers in Rust used to require substantial boilerplate. AI generates this logic quickly, and cargo test verifies correctness in milliseconds.

Fearless architectural refactoring

When we split the codebase into modular crates (a1slice-core for pure business logic and a1slice for the window and processes), cargo check ensured every caller remained valid. Refactoring in a strict type system is much faster than chasing runtime bugs across loosely-typed components.

What We Are Building: A1 Slice

We built this architecture for A1 Slice, an open-source tool we created and maintain on GitHub.

A1 Slice solves a practical problem for content creators: taking long video recordings and turning them into short, captioned reels without uploading confidential footage to cloud servers. It runs entirely on your local machine:

  • Local transcription: Uses Whisper with automatic CPU or NVIDIA CUDA GPU acceleration.
  • Smart clip finding: Connects to installed AI agents (like Claude or local models) to analyze the transcript and select the strongest moments.
  • Visual reframe: Lets you pan and zoom horizontal footage into vertical 9:16 or square formats.
  • Burned captions: Renders animated subtitles directly onto the final video.

Because it is fully open source, you can inspect the entire native Rust codebase, test the performance yourself, and see how the UI and processing pipelines are structured.

How The A1 Lab Can Help

Choosing the wrong technology stack creates compounding debt. You end up paying for bloated downloads, sluggish customer experiences, and fragile maintenance pipelines that slow your team down every time they add a feature.

At The A1 Lab, we help companies solve complex problems using the right technology and architecture from day one.

Whether you need to build high-performance native desktop tools, deploy local AI pipelines, or integrate disconnected business systems, we build software that runs fast, stays simple, and remains easy to maintain long after we finish. We work directly on your real records, build the solution, hand over the code, and make sure your team owns the result.

The Bottom Line

You do not have to accept a 150 MB framework tax and sluggish startup times just to deliver desktop software.

Native code delivers smaller downloads, instant startup, and predictable resource usage. With modern AI pair-programming and a strict compiler, building native applications is no longer a slow compromise.

Check out the A1 Slice repository on GitHub to see the native implementation in action.


See also:

Need help with this?

You get a write-up of the work, the fix on your data, and a plan to keep it running. The work is finished. The code is yours.

Talk to the Lab