4 ms·
Not to rain on the parade, but: - What's the point of mentioning Rust when the heavylifting is done by the system's webview widget, and applications are writte
by flohofwoe 4y ago
Not to rain on the parade, but:
- 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.
- Humphrey 4y agoI 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.
- javajosh 4y ago>I can imagine a lot of less complicated apps don't need this Also, more complicated apps don't need this, the ones that want to control every aspect of the render, with SVG or Canvas.
- Octoth0rpe 4y ago> 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.
- deleted 4y ago[deleted]
- trinovantes 4y agoBut Electron apps can also launch separate programs written in any language with child_process.exec() e.g. ffmpeg wrapper GUIs
- rvz 4y ago> 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.
- mcdonje 4y agoDo you need to own a mac to develop flutter desktop apps? If so, that'll limit adoption.
- rvz 4y ago> Do you need to own a mac to develop flutter desktop apps? No. [0] [0] https://docs.flutter.dev/development/platform-integration/desktop https://docs.flutter.dev/development/platform-integration/de...
- mcdonje 4y agoThanks. "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.
- rvz 4y ago> 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. [0] https://tauri.studio/v1/guides/building/cross-platform https://tauri.studio/v1/guides/building/cross-platform
- iffycan 4y agoThere's also more to it than just the webview windows: - Cross-platform auto-updating - Desktop tray features - System notifications - Menu stuff These are some of the "extra" things that also made Electron nice. You have a point about browser API compatibility, though. That's the big downside to using the system-provided webview widget.
- pornel 4y agoIt'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.
- stjohnswarts 4y agoSo people who use Rust will be interested if they were looking for a GUI framework?
- ilikehurdles 4y agoWell it’s a fun way to trick them into writing html/js for those GUIs.
- Vaslo 4y ago
- deleted 4y ago[deleted]
- waplot 4y ago>What's the point of mentioning Rust marketing
- nu11ptr 4y agoThis 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.
- neurostimulant 4y agoHmm, 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.
- klabb3 4y agoAs 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.
- jeremychone 4y agoThat’s the point of Tauri. UI is html/css/js, and the backend logic is Rust.