Live data from Hacker News

Tauri: An Electron alternative written in Rust

tauri.studio

111–120 of 438 posts

Re: Tauri: An Electron alternative written in Rust

#111
post #64

This kind of makes me think... is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? Or is this impossible? It looks like Tauri uses system webviews, which use a lot less memory, but the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet. That's why the Electron approach is…

It seems like Electron is decently optimizable for a lowish memory footprint. Both the Element and Discord desktop client run with consistently ~50MB RAM each.

Are you sure about that? Most of the time, Electron apps are split into multiple processes, and the task manager (by default) only shows the main one. Order your processes by name and I'd be surprised to see the total under 150MB.

Re: Tauri: An Electron alternative written in Rust

#112

This kind of makes me think... is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? Or is this impossible? It looks like Tauri uses system webviews, which use a lot less memory, but the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet. That's why the Electron approach is…

> the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet Is this really different from the current state of web development? Front-end developers have to test against Chrome, Firefox, and Safari, at a minimum. For apps that are basically installable websites (like Slack, which has a perfectly functional webapp) this doesn't seem…

> Front-end developers have to test against Chrome, Firefox, and Safari, at a minimum.

Do many companies actually do this though? I've only ever been with companies that test against Chrome. The one time at FF bug was found, that company told that client to switch to Chrome.

I know there was a kerfuffle about Airbnb and Groupon only doing Chrome as well.

https://www.reddit.com/r/AirBnB/comments/dv7v6n/customer_sup...

https://thenextweb.com/dd/2017/11/28/please-build-websites-w...

Maybe in theory all platforms are considered, but in practice many companies just do one and the others mostly just work.

Re: Tauri: An Electron alternative written in Rust

#113

Earlier quoted context omitted.

A major benefit of Electron is that you can develop against a single browser and runtime version and don't have to deal with all the small but time consuming compatibility quirks. On Windows the default webview engine is still not the new Chromium but old Edge (WebView2 has to be installed separately), Safari has a fair amount of issues and gtk-webkit can be very quirky as well. This is not so significant if your app…

> A major benefit of Electron is that you can develop against a single browser version and don't have to deal with all the small but time consuming compatibility quirks. Somehow I doubt the ideal solution is to bundle a web browser with every app. Electron feels like a prototype that went out of control.

I think they're overstating the browser compatibility problem too. It was really bad 15 years ago, but today it is almost a non-issue. Between significantly improved standardization of web technologies, and new tricks like polyfills, I think it has become pretty uncommon for apps to not just work on multiple browsers without any tinkering.

Re: Tauri: An Electron alternative written in Rust

#114

Looks like it uses system webviews instead of bundling a copy of Chromium? This to me seems like the real headlining feature, but strangely I had to dig pretty deep to find it: https://tauri.studio/en/docs/getting-started/technical-detai... I kind of wonder why it took this long for someone to try this approach. It just makes a whole lot more sense on the surface. Interesting thing I just thought about: since users d…

> I kind of wonder why it took this long for someone to try this approach. It just makes a whole lot more sense on the surface. Like other replies have mentioned, it's not a new idea DeskGap uses the native OS Webviews. https://github.com/patr0nus/DeskGap/ Electrino (4 years old) was an experiment where they forked Electron and removed Chromium to replace it with the native OS Web views. https://github.com/pojala/ele…

Also wxWidgets/wxWebView and pywebview

https://docs.wxwidgets.org/trunk/classwx_web_view.html

https://github.com/r0x0r/pywebview

Re: Tauri: An Electron alternative written in Rust

#115
post #93

Earlier quoted context omitted.

> don't have to deal with all the small but time consuming compatibility quirks > Webviews are also a moving target so you need a big testing matrix I say this as a front-end web app dev who would most likely be affected by this kind of shift: it might be slightly less convenient, but I wholeheartedly think it's worth doing, on several levels. People built web apps 15 years ago in the dumpster-fire that was web stand…

Also: a lot of our "Electron" apps are essentially Electron frontends to the existing web frontend. For example, Slack-the-Electron-app and Slack-the-web-app are fundamentally identical, aside from likely some platform integration features and so on. That means that, likely, a lot of these Electron apps would already work in, for example, a Safari or Edge webview, since the web version has to anyway. I sincerely doub…

Slack originally was platform specific webviews, and migrated to avoid issues like what is mentioned in this thread. One of the engineers who did it has even commented on HN to explain this.

Re: Tauri: An Electron alternative written in Rust

#116
post #64

This kind of makes me think... is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? Or is this impossible? It looks like Tauri uses system webviews, which use a lot less memory, but the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet. That's why the Electron approach is…

It seems like Electron is decently optimizable for a lowish memory footprint. Both the Element and Discord desktop client run with consistently ~50MB RAM each.

>~50MB RAM each

You _are_ measuring the total RAM usage, right? Something like `free -m` right before starting the application, and then after it warms up?

Every time I see these "electron is not heavy, it only uses X MBs of RAM", it turns out that the author looked at a single electron process (out of typically 5-10), and then only measured RSS, completely ignoring shared memory.

Re: Tauri: An Electron alternative written in Rust

#118
post #26

Will PWAs make Electron obsolete?

Electron gives you far, far more access to native libraries and hardware than PWAs will ever dream about. People are still arguing about how to expose USB devices, bluetooth, etc. in the browser for example. With an electron app you can just npm install a few native wrapper libs and go to town. It's great for moving clunky old native GUI apps (IDEs, etc.) to a more modern cross-platform codebase.

Re: Tauri: An Electron alternative written in Rust

#119

This kind of makes me think... is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? Or is this impossible? It looks like Tauri uses system webviews, which use a lot less memory, but the burden is then on the developer to make sure that they build essentially 3 (maybe more) UI's on platforms that might change under their feet. That's why the Electron approach is…

> is there room for a much more stripped down version of Chromium that is suitable for lower memory footprint? That's basically the history of Flutter. The initial goal was something like "Web: The Good Parts" and the results of that experiment led them to where they are now.

I mean, where are they now? Promising or DoA? I fear touching it because of it being a Google project (killedbygoogle.com)
Post reply on HN