改善
Kaizen  · Today I Learned by Ville Säävuori

Testing Tauri Beta

Tauri is an interesting lightweight alternative to Electron which recently graduated to beta. These are my first impressions and experiences trying it out.

Installing and Hello World

Tauri docs are pretty good for a project that is just barely reached beta. Tauri can be added as an dependency to any Node project but before you can do that you need to install some Rust tooling first. I wrote my first Hello World with Rust just few months back so I got to skip the most part. But the installer broke with a generic error message due to too old rust version. Quick rustup update fixed the issue and the tooling installation was all done in few minutes.

Next step was to integrate Tauri to my app. I created a small test repo using my Vite template and followed the instructions. In a couple of minutes I had the new dependencies installed, Tauri initialized and the native development window open. These steps were easy and fast and the Tauri CLI commands seemed pretty clear. Using Tauri in a Vite project means basically just adding one src-tauri source directory and native yarn tauri dev development window to your workflow.

I’ve worked with Electron projects before but haven’t published a native app myself. As Tauri is very young compared to Electron it’s understandable that it’s not as polished or deep yet. Some first impressions:

All in all, my first impressions of Tauri Beta 2 were positive. I like the philosophy and I really hope the project matures to be a real competitor to Electron. I’m considering starting a new native app project using Tauri to ship it on all three desktop platforms, it would probably be an interesting excercise.