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:
- the initial native app doesn’t have any native menus (at least on macOS). It would be useful to have at least basic bare bones main menu with quit command to make the initial bootstrapping faster and easier. (In general it’s much faster to modify and extend than to learn how to do something from scratch.)
- Tauri ships with default icons for the app but not for Dock (“System Tray” in Tauri language). Again, the default app shows up in Dock so it would be helpful to have these icons configured by default as well.
- Tauri has a concept of patterns which is well documented but I still found it confusing. It would probably help if there was more documentation on how the default initialized app is configured in terms of these patterns and other features. I also would have appreciated some kind of easy default “use this if you are not sure what you want yet” path that would have gotten me started faster. (I’m actually not sure if one even needs to worry abut these patterns when just starting out with a first demo app.)
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.