7 ms·
I build and ship a production application using tauri and linux support is the most painful experience I had in a long time. They use WebKit GTK which is reall
by Sytten 3y ago
I build and ship a production application using tauri and linux support is the most painful experience I had in a long time.
They use WebKit GTK which is really not a good fondation IMO, its hard to test for all versions, its much slower than other browser, it has weird bugs.
In general the idea of not shipping a browser bundle is nice, in practice it doesn't really work for a startup. It's just too much unrelated testing and debugging work you need to do to support old outdated systems.
We were very excited to use tauri since we are a rust shop, but we are strongly considering moving to electron unless we get a way to bundle a renderer.
- rickstanley 3y agoThanks for sharing the experience. From time to time, I go to https://www.areweguiyet.com/ https://www.areweguiyet.com/ to check out how rust GUI is doing. I've heard good things about Iced framework (the one that System76 is building their DE on).
- chrismorgan 3y agoBut do note (given the context of this discussion) that Iced is completely unsuitable for the web. Early on it had an actual web renderer (iced_web), but they stopped maintaining it and it doesn’t work any more, so what you get if you use Iced on the web is the pure-canvas approach, which is fundamentally and irredeemably unsuitable for general-purpose web content and apps. (I’ve written about this a number of times here on HN; https://news.ycombinator.com/item?id=33861831 https://news.ycombinator.com/item?id=33861831 is one.) By all means use it on desktop platforms, but it won’t get you an acceptable web version.
- lifthrasiir 3y agoI have used Tauri (or more accurately, WRY) for Windows and macOS and it worked very great in my opinion. It still needed some tweaks to suit my needs, which was the main reason I didn't use Tauri proper, but I guess your issues are more related to the lack of well-known system web view in linux. It might make sense for Tauri to bundle the browser engine only for linux if this is a big concern.
- remram 3y agoI think using Electron is excusable if you are a startup, like you said your time is limited. It's much less acceptable if you are Slack and still ship a slow bloated Electron app 10 years in.
- nine_k 3y agoThe truth us that once you have shipped Electron, there's no way back, the cost of switching is too high. This is not specific to Electron, it's a similar effect with every core technology, all the way to COBOL.
- dathinab 3y agoMost electron apps are (mostly but not solely) a bundling of the web-app. So the cost is less the cost of "switching" and more the cost of initially writing a native app. In turn the actual question is how to reuse as much code as possible between the web-app and native apps without it introducing a lot of friction. And one of the few reliable, nicely (developer) usable answers for this is currently electron. For "business logic" there somewhat are already other answers, some languages run on most targets reliable and there is also wasm which often still needs a bit more tooling but has a lot of potential for such use cases (e.g. see Disney which AFIK does have their core business logic compiled to a wasm blob and then "only" provide UI/system glue to bundle it in on all platforms their streaming app runs on). The problem is UI, you really don't want to reimplement UI and the mapping of non HTML/CSS producing UI to a mix of HTML/CSS on some platforms and native components on other often doesn't work grate so it's not surprising people decided to "just go with HTML/CSS everywhere". And if you are already there going with electron isn't "that" much more overhead.
- theappsecguy 3y agoThis right here. Something monumental would have to happen for senior leadership to green light a rewrite, because that’s a massive project that will bring in no additional revenue.
- remram 3y ago
- txdv 3y agoI wanted to have apple notes on linux, so I used tauri and just redirected to the apple notes web app. I could really feel the lag and the lack of snappiness when interacting with that UI. Its webkit, safari also uses webkit? Why is it so slow?
- PaulRobinson 3y agoI think you might be confusing an OS web view - which is what Tauri uses - with WebKit, which is the web view on Apple operating systems. It’s the way to get Safari inside your app if you are on an Apple device. On Linux, there is no WebKit, the web view will be your system browser. That might not be very fast.
- saagarjha 3y agoWebKit definitely compiles for Linux. You can try it in GNOME Web.
- c-hendricks 3y agoTauri uses WebkitGTK, which has pretty bad performance compared to other browsers on the same hardware. https://github.com/tauri-apps/wry/issues/890#issuecomment-1479654073 https://github.com/tauri-apps/wry/issues/890#issuecomment-14...
- creshal 3y agoWebKit is five loosely related browser engines in a trench coat. A lot of the code is "platform" specific, and most of the optimization happens in that layer. Apple's Cocoa webkit is a lot more polished than WebkitGTK could ever hope to be with its meagre dev resources.
- pjmlp 3y agoHere is an idea, do a Web application. Most of the Electron junk can be easily done as pure Web application, of course authors don't want to pay for hosting and ship a browser and server with the application. There are a very tiny percentage of such startup ideas that really need features not available on a standard Web browser.
- graftak 3y agoNow that at least Windows, Chrome OS, and soon macOS properly support PWAs it will finally get feasible to add web apps to your desktop environment. I know I’ll upgrade to the new macOS ASAP just to get rid of slack. (I don’t know about Linux).
- nottorp 3y agoJust because you can put a link to a site on your desktop and make it run in its own window (and maybe process) it will make the "app" less bloated?
- graftak 3y agoYes because electron comes with its own distinct instance of chrome (usually an outdated version) for each individual app, introducing massive overhead versus running on the OS provided browser engine.
- nottorp 3y agoIt will still be a browser and a modern "app" done by people who think guis should refresh at 120 fps instead of just when something changed on screen...
- Sytten 3y agoFunny enough that is exactly what we did and our users asked for a desktop application since this is what they were used to by our competitor.
- cmrdporcupine 3y agoI tried this same approach (embedded webview instead of e.g. electron -- https://github.com/rdaum/vstwebview https://github.com/rdaum/vstwebview) for something last year and I agree the biggest problem is Linux support, specifically WebKit GTK. On Windows, and to a lesser degree on the Mac, this approach actually went pretty smoothly. But WebKit GTK introduces all sorts of problems -- having to tie into GTK's event loop even though you don't want it, dealing with distribution variances, event binding issues, etc. I suspect the answer here for Tauri is that someone needs to expend the effort to come up with a good Rust crate bundling of Chromium or Gecko or etc that isn't tied into GTK. Yes, it would defeat the "just use the platform's webview instead of bundling" line, but really it would only be a concern for Linux.