3 ms·
I hate to bash, but I would not recommend Tauri/webview to anybody. Here's my list of the problems: - For Windows, it requires the MS WebView2 runtime to be ins
by petabyt 2y ago
I hate to bash, but I would not recommend Tauri/webview to anybody. Here's my list of the problems:
- For Windows, it requires the MS WebView2 runtime to be installed. It's installed by default in Windows 11, but Windows 10 users will need to make sure it's installed. (not sure if there's an error popup or anything?) There's no chance of running Tauri apps on Windows 7.
- (For MacOS, it should work with no problems. NSWebView has been a thing for a very long time now.)
- For Linux, packaging is a nightmare. Since Linux has no standardized webview (or UI framework), Tauri Linux apps have to be distributed as .deb packages which users need to install with dpkg (They might support .rpms other formats now, not sure). New users installing Linux Tauri apps will most likely have to install WebKitGTK (and possibly some other deps) for the first time (around 70mb).
Either that or you can package your Tauri Linux app as an AppImage (I've seen a few Tauri apps do this), but that will include WebKitGTK in the final binary... and you end up with a binary that's on par or larger than Electron.
Also, back when I was playing with and contributing to webview I did some RAM usage tests, and WebKitGTK actually did worse than Electron. We did briefly look into Netsurf or a 'lite' version of WebKit but RAM usage ended up being the same, and WebKitGTK3 was too popular and easy to use for the devs to want to switch to anything else.
And finally for all platforms, you will probably be eating up a lot of RAM (and impacting launch times) by using WebView2/NSWebView/WebKitGTK, which is probably not the primary browser that most users use and have running and loaded into RAM. This should improve improve if you run more than 1 Tauri/electron app - but that seems unlikely to me.
WebUI doesn't solve all of these problems (users must have a compatible web browser installed) and has some quirks, but it mostly solves the RAM usage issue (checks for what browser is already loaded, starts a new instance) and compiles into very small .AppImage/.app/.exe applications as users would expect.
I would only recommend WebUI if you have a HTML/CSS/JS frontend that you absolutely can't depart with, or have some other scenario/limitation that forces you have to use a browser. Otherwise, it's so much better to just use a native framework :)
(As a side note, Tauri used to use webview as a backend, but eventually switched to a rewrite.)