HACKER Q&A
📣 baristaGeek

Is a Rust desktop app faster than a Chromium embedded app?


Rust is evidently becoming the lingua franca for performance critical desktop applications, and moving us away from that memory hog that Electron apps give us. But how does a Rust app compare against a Chromium embedded app?


  👤 duped Accepted Answer ✓
Rust is hardly becoming the lingua franca of anything except crypto. Rust does not have a mature enough UI ecosystem to begin to answer this question. Meanwhile the browser and its DOM is one of the fastest and most mature ecosystems for desktop UI rendering.

Before talking about "hogs" you should really benchmark and quantify what you mean. Rust apps are quite a bit larger than C++ apps in general, whether or not they are more efficient in terms of compute or runtime memory footprint is extremely variant. The reason to compare to C++ is because that's what an embedded chromium app is. The JS side is usually not that big of a deal compared to the rest of the browser engine that does the heavy lifting.


👤 smoldesu
The answer is "it depends". I could cherry-pick examples where Chromium rendering would be circumstantially better, and where Rust's optimization really might make a difference. Ultimately it's up to you to choose the right tool for the job.

I've found that Rust is perfectly usable for writing GTK interfaces for simple apps. Those are much smaller, faster and feel better to use than a Chromium embedded app. It's also harder to port, inherently less capable and generally supported by a weaker ecosystem. It entirely depends on the application you need.


👤 wmf
A real native app in any compiled language is going to be faster than Chromium. Fake Rust apps (like Tauri) may not be faster.