- What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?
- Isn't the whole point of Electron to have version/feature stability for the browser APIs by bundling a specific Chromium runtime? Without this requirement, it was also trivial before Electron showed up to write a small native wrapper application around the system-provided webview widget.
This is what I thought at first until I dove in more. AFAIK, Tauri makes it possible to write your ENTIRE app in Rust _EXCEPT_ the view. This means you can take events and send them directly to Rust for processing and vice versa. While porting an existing web app might not use any Rust, someone using this to specifically create a Rust GUI app can use the HTML/CSS/JS portion as just a view for their Rust app for the most part.
Hmm, I was thinking about writing a nodejs native module with rust to access some system library in an electron app for one of my side project, but using this might be easier instead. I guess I should check it out.
As a tauri user, I can highly recommend it. If you can write the backend code in Rust only it's very simple and you have a much smaller footprint than electron.
> What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?
You're assuming the 'heavylifting' part of the application is in the UI itself. Imagine some data processing app where the heavylifting part would benefit from a backend running in Rust. Say, an image enhancer of some kind.
> Without this requirement, it was also trivial before Electron showed up to write a small native wrapper application around the system-provided webview widget.
Electron also made the packaging of such an app dramatically easier when building on macos/linux/windows.
But if you write your "backend" in rust, then with tauri you don't need a separate process, which may or may not be important depending on how your application works, and your tolerance for additional overhead.
It's an application framework, with UI being only one part of it. It has a native Rust API for writing non-UI parts of the apps in Rust. Plus there's a lot of Tauri's own code for window management, clipboard, networking, auto update, bundling, etc.
Another difference is that it doesn't need to bundle a Node.js or another language runtime.
I think it depends on your use case. Yes, a huge selling point Electron is being able to control the Chromium version. But, I can imagine a lot of less complicated apps don't need this.
Also, the Chromium renderer is only half of an Electron app. There is also a background thread running in node, which can pass messages to the renderer.
So, I can imagine that for apps that are more background thread heavy, swapping out node for rust could work quite well.
> What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?
That is true. It's basically exposing a Rust API and using FFI to the Desktop APIs. Nothing special going on apart from hype and marketing and possible over-promising on features.
> Isn't the whole point of Electron to have version/feature stability for the browser APIs by bundling a specific Chromium runtime?
Yes. The selling point here is that there are no fundamental rewrites needed for using Electron but only small Javascript / Typescript tweaks to get it up and running. This is why unfortunately Electron is used all the time despite the giant negatives. As with Tauri, it is basically a wrapper around the system Webview and using Rust FFI to the Desktop APIs.
I'd rather bet on Flutter Desktop as a possible long term Electron competitor.
"To compile a desktop application, you must build it on the targeted platform: build a Windows application on Windows, a macOS application on macOS, and a Linux application on Linux."
So, I essentially do need to own a mac if I want to target macs along with other platforms.
> So, I essentially do need to own a mac if I want to target macs along with other platforms.
If you want to target other platforms than the one you are currently running, then you need to compile and run on that target machine as well. It is not a hard requirement that you need a Mac to develop Flutter applications. The Flutter SDK is also on Windows and Linux machines as well.
It is exactly the same thing for Tauri. [0] This is why they tell developers to use GitHub Actions or CIs to do it for them. Again, the same can be done for Flutter.
Electron on the other hand, does not need any of that.
- What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are written in HTML/CSS/JS, just as in Electron?
- Isn't the whole point of Electron to have version/feature stability for the browser APIs by bundling a specific Chromium runtime? Without this requirement, it was also trivial before Electron showed up to write a small native wrapper application around the system-provided webview widget.