5 ms·
> One of the main core differences with Tauri is that it uses a Webview instead of using chromium like in Electron. This means that every desktop application do
by palata 3y ago
> One of the main core differences with Tauri is that it uses a Webview instead of using chromium like in Electron. This means that every desktop application doesn’t have to ship with chromium and can rely on the native browser’s webviews. The downside here is that because it is using Webview you have to deal with different quirks of different operating systems.
ElectronJS is a cross-platform framework. It is bloated because it ships a full cross-platform browser (Chromium) in order... well in order to be cross-platform.
Tauri wants to be less bloated, and therefore removes Chromium. Which makes it... not so cross-platform, apparently.
Genuine question: why not going for a JVM-based technology? That's cross-platform, and it doesn't require a web browser / webview to show text.
- cheeseblubber 3y agoI guess we aren't aware of any Electron alternatives built with JVM. We started out as a web app so we need something that would bundle web based technology. Besides electron Tauri seemed like it was the next best bet.
- mike_hearn 3y agoI'm curious if you would have considered it if there was a Tauri-like thing with a JVM backend (maybe natively compiled AOT)? That is, if you could write "backend" code in a high level GCd language whilst using HTML/CSS as the UI layer, would that have been preferable to Rust? Asking for a friend, of course.
- bojo 3y agoChromium or Tauri, you are still building platform specific binaries either way.
- IshKebab 3y agoSure but with Electron you don't have to worry about browser differences. And you can use experimental web stuff. If your app is primarily a website and you want to wrap it as an app then I guess Tauri makes some sense. E.g. something like Slack or Gmail. If you're just using it as a way to make a desktop app then it makes more sense to use Electron unless your UI is very simple and download size is very important (e.g. something like the Raspberry Pi Imager app; though that uses QtQuick).
- littlestymaar 3y ago> why not going for a JVM-based technology? That's cross-platform, and it doesn't require a web browser / webview to show text. Because then you require the user to install a JVM?
- ezst 3y agoYou've been able to package your java apps so to not require that from your users for a very long time, and in the more recent years, with the compartmentalization of the JDK, you've been able to ship a very striped down version of it, and even more recently, an AOT compiled/PGO optimized binary, so nowadays you can ship your instant starting/low footprint/well performing java code without Java/a JVM.
- silisili 3y agoIt's been years since I've messed with Java. OpenJDK can do all that? How big are the binaries?
- ezst 3y agoJLink (JEP 282) does the first part and was released with Java9 (6 years ago), the native compilation stuff is a product of GraalVM. Binaries are reasonably small but it depends of course on what your app is doing. There is a whole ecosystem of web frameworks that's being built on that (quarkus.io, micronaut) and IIRC you can build a simple REST API that ships as a <20MB container.
- ipsi 3y agoThey're pretty big. I've got a fairly basic JavaFX app that's compiled with Graal, and it weighs in at 98MB, or 32MB when zipped.
- Alupis 3y agoNobody is going to blink at a 98MB program being installed...
- 3y ago
- bastawhiz 3y ago> why not going for a JVM-based technology? Not to pick on the JVM, but does anyone actually build new desktop software for the JVM that's meant to be downloaded and installed by mainstream consumers? Qt and other frameworks work pretty well (with their own flaws) but I'd simply never even consider the JVM as a viable option for desktop software. The last JVM app I installed was probably Minecraft in 2012.
- dijit 3y agoexception to the rule, and should be popular on this site: IntelliJ IDEA (and derivatives) are JVM based.
- lopatin 3y agoI use IntelliJ, which is a Java + Swing app I think.
- X6S1x6Okd1st 3y agoInitial release was 2001
- lopatin 3y agoLooks like Java is working pretty well for them then.
- deleted 3y ago[deleted]
- pzo 3y agoOk the other hand jetbrains is developing new IDE - Fleet, that’s supposed to compete with VSCode - not sure if it’s written using JVM stack for that
- evntdrvn 3y agohttps://blog.jetbrains.com/fleet/2022/01/fleet-below-deck-part-i-architecture-overview/ https://blog.jetbrains.com/fleet/2022/01/fleet-below-deck-pa...
- JoshTriplett 3y agoIf you offer developers the choice of either embedding a whole web browser and not dealing with platform differences, or not embedding a whole web browser and dealing with differences between the now-evergreen browser engines on each major platform, many may pick the latter to be more user-friendly. I certainly would.
- notatoad 3y agoBut as long as you’re maintaining a webapp anyways, you still have to do all that browser support. Using tauri doesn’t make it worse than a webapp that only runs in a browser context.
- JoshTriplett 3y agoExactly; electron only gives you a benefit on that front if you don't otherwise have a need to be portable.
- giovannibonetti 3y agoYou mean the former?
- JoshTriplett 3y agoNo, I mean the latter: picking "not embedding a whole web browser" is worth it for the user-friendliness, even though it means having to deal with those browser differences, which have grown a lot less onerous than they used to be.
- wilg 3y agoThe web browser is a feature, it allows developers to not have to code a second UI for their app, when they often have already built a web version. And it neatly end runs around having to make a cross platform UI toolkit that doesn’t look like hot garbage on every platform.
- datadeft 3y agoBecause of Oracle?
- deleted 3y ago[deleted]
- virtue3 3y agoThe JVM being truly cross-platform was a bit of a lie depending on what you do.[1] "Java is write once, test and debug everywhere." Also the ui toolkits for JVM ecosystems are just not as nice to develop with. But I was pretty hardcore C#/.net back in those days so take what I say there with a grain of salt. [1] https://softwareengineering.stackexchange.com/a/20024 https://softwareengineering.stackexchange.com/a/20024
- 0x000xca0xfe 3y agoIMO native widgets are dead. Users have become accustomed to the graphical gimmicks that are easy with a full-blown browser rendering engine. Even a resizable background image is really hard to do with pure native widgets. This means cross-platform libraries that wrap native widgets are dead as well. Now you need to ship your own rendering engine, and suddenly an entire browser looks reasonable. E.g. JavaFX isn't a featherweight either...
- satvikpendem 3y agoOr why not use Flutter? You can integrate with Rust as FFI via flutter_rust_bridge. That's what I do as Flutter is pretty cross platform yet much leaner than even using a browser engine.
- jasfi 3y agoA good idea. I think Flutter loses quite badly to React for web apps. But if you want to build a cross-platform app it works well. Dart is similar to Javascript and not difficult to pick up.
- WorldMaker 3y ago> Tauri wants to be less bloated, and therefore removes Chromium. Which makes it... not so cross-platform, apparently. It's certainly cross-platform. Name a current OS that doesn't have one WebKit-forked webview or another available at all times. If you don't like Apple's insistence on only baseline WebKit out of the box, there's Microsoft's WebView2 which ships a known Chromium to every major desktop OS. But really, if you are a web developer complaining about the differences between WebKit and Chromium, you may be spoiled. If you are a web developer complaining that you can't package a specific Chromium version (which is the real Electron benefit, not just that it packages its own Chromium but that every Electron app can pick and choose down to the exact Chromium version they want to ship), you've gone beyond spoiled to basically distrusting how the web platform is supposed to work. (That's before you get to the other monoculture assumptions that no modern OS is instead shipping something like Firefox as the system default webview in 2023. It's all one tiny family tree with WebKit as the trunk.)