DEV Community

Debajyoti sarkar
Debajyoti sarkar

Posted on

Starting Desktop Application Development: An Introduction To Tauri

I'm writing this cause I couldn't find a dev post that circles around the power of writing desktop native applications. Whenever I think about desktop native apps, which are somewhat good-looking and functional, only word that pops into my mind is "Electron". But sadly, I'm not a node developer (I can write node but simply don't want to).
On the other hand, I love rust. Shuffling through internet pages, I found Tauri.
For starters, if you've never heard of tauri, welcome to the club. Tauri is a framework for writing cross-platform applications where the backend will be in Rust, and you can choose from a plethora of js frameworks like React, Vue, and Svelte for the frontend.
Now, if you're an annoying and techy person like me, you'll ask why Tauri, why choose a new framework when you have something like Electron with a huge developer base and community support? To that, I have a few pointers below:

Versertality

The beauty of a framework like tauri with a Rust backend is that it enables you to leverage the low-level features of Rust and still lets you get away with not having to take all the hassle of writing an installer and operating system shenanigans.
Being honest, will it be truly cross-platform if you play around with the dependencies and small things? Probably not, but it's still worth using all the reliability and low-level features Rust has to offer.
Now, tauri provides you with a bunch of inbuilt little modules, utilizing which you can do almost anything a normal application can handle. On top of that, you can use any Rust crates of your choosing.

Performance

Everything I'm gonna say in this section will be stolen from a random internet blog linked here
Now for some stolen metrics to impress you:

πŸ“¦ Bundle

  • Tauri: ~2.5MB πŸ†
  • Electron: ~85MB 🐘
  • βœ… Winner: Tauri

⚑ Startup

  • Tauri: ~2s πŸš€
  • Electron: ~4s 🐒
  • βœ… Winner: Tauri

πŸ’» Performance (Idle, Win)

  • Tauri: 1% CPU, ~80MB RAM
  • Electron: 1% CPU, ~120MB RAM
  • βœ… Winner: Tauri (esp. on Linux 🐧)

πŸ› οΈ Backend

  • Tauri: Rust πŸ¦€
  • Electron: JS (Node.js) πŸ§‘β€πŸ’»
  • βœ… Winner: Electron (easier)

πŸ–ΌοΈ Rendering

  • Tauri: System WebView (buggy on Safari πŸ›)
  • Electron: Chromium (consistent πŸ”’)
  • βœ… Winner: Electron

πŸ” Security

  • Tauri: Secure by default 🚫
  • Electron: Full Node access πŸ”“
  • βœ… Winner: Tauri

πŸ”„ Auto Update

  • Tauri: Manual or JSON config πŸ“„
  • Electron: GitHub Releases βœ…
  • 🀝 Tie

πŸ‘¨β€πŸ’» Dev Experience

  • Tauri: All-in-one CLI 🧰
  • Electron: Manual setup 🧱
  • βœ… Winner: Tauri

🏁 Final Verdict

  • Tauri: πŸ”₯ Fast, secure, modern
  • Electron: πŸ’ͺ Mature, consistent, dev-friendly
  • Tauri is the future 🌟 β€” just needs time

Comment if you want a getting-started blog for Tauri.
Thank you

Top comments (2)

Collapse
 
sanjay_kumar_584 profile image
sanjay kumar

Yeah, you know that I have been using the combination of Electron + React, once I made a project of local media player overall. Yeah have you built any project using the above stack? Let me know. I am interested to know the things that you have done overall.

Collapse
 
debajyotisarkarhome profile image
Debajyoti sarkar

Yeah, I have done a few projects on Tauri, sadly, none of them are public. I'd say it's robust enough to get started. Let me know if you want a getting started guide for Tauri.