Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m a bit confused. I thought the main selling point of Tauri was that it uses the OS’s native WebView to create lighter apps compared to something like Electron. So why would I want to bundle a Servo or Verso? Doesn't that defeat the purpose of Tauri?


Because its main selling point isn't its only selling point. At $work we use Tauri because of the great Rust<->JavaScript API it offers. We wanted an Electron-like JS Frontend that could seamlessly use our existing IPC to talk to a long-running service, as well as being able to offload heavy work to native code. Tauri fits that beautifully.

For our use case don't care too much about the kind of webview it uses and would be fine with shipping a larger binary. Servo integration could be interesting to have one known webview to target if cross-platform consistency ever becomes a challenge


Optionally bundling would help in situations where the OS's native webview has degraded performance https://github.com/tauri-apps/wry/issues/1064


Yeah I opened this issue and still stand by the problems. We actually switched to electron since then because of the horrible performances on Linux.


Tauri is an application framework. If you want to use Rust for your application, there's going to be one more option for rendering its UI.

This does make it closer to Electron. We'll see whether Servo can be made leaner or faster (Servo is focused on GPU-based rendering).

Long term, I dream, there could be tighter integration between Tauri and Servo's DOM, so that UI changes won't have to go through JavaScript.


For one thing, not all OSes have a "native WebView".


In practice, it’s only Linux that is distro dependent out of the big ones, but most package managers have some WebKit gtk package to hook into afaik.

In theory yes you could go outside Linux as well, like maybe bsd? Or which ones are you thinking of?


I think it makes sense if you think of Tauri as a "view layer" for rust apps. If you're building a rust GUI app using something like Dioxus, I could easily see wanting to bundle a cross-platform renderer with consistent "quirks", vs having to adapt your frontend to work with all the platform web views.

It has trade offs in terms of memory usage and binary size, but Electron has already conditioned users to expect every todo and chat app to be 500mb on disk and use a gigabyte of ram at idle. In other words, if Electron would make sense for your project, but you want to use rust, this seems like a good fit.


At some theoretical future time bundling servo doesn't necessarily imply a render process of Rust Tauri UI -> JS -> DOM -> render. It's theoretically possible to cut out the JS step, at which point you'd just be focusing on DOM as a well-supported intermediary between Rust and a very well-tested DOM renderer. In theory.


consistency between platforms


> I thought the main selling point of Tauri was that it uses the OS’s native WebView to create lighter apps compared to something like Electron

It was a talking point for angry at clouds people.

It was never a selling point, because nobody cares how big apps are today. For a regular user with a 256/512 GB drive, even if they had 50 electron apps 1 GB each, it would not matter in the grand scheme of things.


well,what about memory usage. storage is cheap indeed, but memory is limited still


From the 1 GB a typical Electron app uses, only about 300 MB are binaries which might be shared if they were a WebView.

So yes, using a WebView might decrease your memory usage by 30%, maybe 50% for small apps. Not a huge game changer, maybe it would make a 8 GB RAM laptop more usable.


You talk like that's not a big deal! What percentage of users do you think still spends a lot of time working on 8gb ram laptops? If it was more than 50% I wouldn't be surprised.

The lowest hanging fruit when it comes to societal good that you can do as a programmer is writing software that is also usable for people with less money for hardware. And a lot of us don't even bother


The big gain is from replacing a 1 GB Electron app with a 50 MB native app. Tauri is an improvement, but not a transformative one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: