Live data from Hacker News

Tauri: An Electron alternative written in Rust

tauri.studio

291–300 of 438 posts

Re: Tauri: An Electron alternative written in Rust

#291
post #19
post #16

Earlier quoted context omitted.

As a developer shipping executables to MacOS, Windows, and Linux today this is the only assumption I can make. I cannot assume that dependencies exist or are the correct version, I can't assume the user knows that package managers exist or that the dependencies shipped by the package managers are correct, I can't assume anything exists on PATH or LD_LIBRARY_PATH, and I can't even assume that libc or libc++ on a syste…

I understand your point, however I still think it's unacceptable to have 1-1.5 GB of RAM consumed by simply two Electron applications running idle.

Honestly I could try to ignore the memory consumption if at least it was snappy. The few electron apps I use have visible lag when I do something that forces a large redraw.

That's a problem that didn't have with GTK app running on a computer with one order of magnitude less computing power and RAM two decades ago. VS code on the first computer I used to program would probably be unusable (if it even launched), yet we had full fledged IDEs back then. I'm not talking about advanced language server plugins here, just basic usage.

The great side effect of this is that if you avoid all this wasteful crap and keep using old school technology, computers are snappier than ever. My terminal always pops up instantly, nvim fires up faster than I can press return, rg lets me search a huge codebase with barely noticeable latency. My IMAP mail client is faster, more configurable and more ergonomic than any webmail I've seen.

Life is good when you avoid the www.

Re: Tauri: An Electron alternative written in Rust

#292

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…

> 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…

In 2008, when IE7 came out, I cried of joy. I turned 22 that year, so the 7 years with only IE6 and Firefox was a significant chunk of my life. Firefox showed us that the web wasn't finished and could still be improved, and then came Firebug which made Firefox first web dev the obvious choice. But the vast majority still used IE6, so there was always a miserable step in the project of fixing all the IE bugs. After doing it for years and knowing your foe, it was by then a relatively quick and manageable experience. The real pain was in knowing all the CSS2 features and other goodies that could never be used. Seeing Microsoft recognizing that, yes indeed, the web wasn't finished in 2001 was actually an emotional moment at that point.

So yeah, the situation is without doubt much better now. I think people tend to forget (or aren't aware) that Microsoft actively said "there's no more work to be done here" and stopped all progress for 7 years. There's been some progress on the web since 2014, as a point of comparison.

Re: Tauri: An Electron alternative written in Rust

#293

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…

People have been trying the WebView approach for years. (Projects include: Quark, Electrino, DeskGap, Revery, and Neutralino.) Historically, it worked terribly on Windows. On Windows, if you used the OS WebView, your Windows 7 users would be forced to use IE11 to run your app, even if they had a newer/better browser installed locally. On Windows 10, you'd get whatever random version of Edge was installed, or the new…

Fortunately MacOS users upgrade very quickly. High Serria which is slowly waning at 7% came out in 2017. Compared to windows where twice as many (16%) at still using Windows 7 and won't be able to download the Webview2 update which Microsoft kindly provides.

https://gs.statcounter.com/windows-version-market-share/desk...

https://gs.statcounter.com/os-version-market-share/macos/des...

Really depends on your market I guess and how much legacy webview browser support you need.

Or really how much you'd need to add polyfills like `@babel/preset-env` to keep the JS equal.

Re: Tauri: An Electron alternative written in Rust

#294

Earlier quoted context omitted.

It isn't your fault that you have to do this, it is that our industry hasn't created enough quality, easy to use, cross platform gui libraries for popular languages, such that the only viable place to turn is to use a whole web browser.

We've had about 60 years and multiple huge attempts at it, and IMHO HTML & CSS _are_ the easy to use cross-platform GUI platform. Nothing else stuck--flash, java swing, qt, etc. were all super capable and promising but failed to gain mass usage. HTML & CSS is the way. Nothing in existence has as much capability, developer usage and talent pool, accessibility and internationalization features, etc. A good GUI system i…

I think you're right, but I'm not sure about "easy to use". It's only easy to use because everybody uses it, so as you point out there's a massive talent pool and massive resources.

As somebody who only started developing for the web a few years ago after a long time working with Qt, winforms, GTK and other "old school" native toolkits, I really don't find the web superior in terms of simplicity outside maybe of a few niches. You end up having to resort to dozens of external libraries to emulate the base functionality of something like Qt. And unless you want to go the transpiler way (which, admittedly, is incredibly common these days) you have to do it all is Javascript which is easy to pick up but a pretty huge liability in the long run IMO. It's just not a very good language, even if you stick to "the good parts".

Re: Tauri: An Electron alternative written in Rust

#295

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 this impossible?" Possible, see Sciter.JS : https://github.com/c-smile/sciter-js-sdk 10 times more compact than Tauri, 20 times less than Electron.JS Yet it has Rust API ( https://github.com/sciter-sdk/rust-sciter ), that if someone need "Made with Rust" label :) And it works even on Windows 2000, do you remember that thing? See: https://sciter.com/necromancing-sciter-on-windows-2000/

From what I understand the internals (aka the engine). That is a problem IMO. I understand it's to create a dependency on the maintainer in order to make money, but yeah... it's the reason I've stayed away thus far.

Re: Tauri: An Electron alternative written in Rust

#296

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 this impossible?" Possible, see Sciter.JS : https://github.com/c-smile/sciter-js-sdk 10 times more compact than Tauri, 20 times less than Electron.JS Yet it has Rust API ( https://github.com/sciter-sdk/rust-sciter ), that if someone need "Made with Rust" label :) And it works even on Windows 2000, do you remember that thing? See: https://sciter.com/necromancing-sciter-on-windows-2000/

I like Sciter for the possibilities, but it needs better compatibility with web standards. Being able to port an existing application that uses React -for example- and have it just run would be the cat's meow.

Needing to rewrite with other UI/JS frameworks to account for quirks gives me pause.

Re: Tauri: An Electron alternative written in Rust

#297

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…

In 2008, when IE7 came out, I cried of joy. I turned 22 that year, so the 7 years with only IE6 and Firefox was a significant chunk of my life. Firefox showed us that the web wasn't finished and could still be improved, and then came Firebug which made Firefox first web dev the obvious choice. But the vast majority still used IE6, so there was always a miserable step in the project of fixing all the IE bugs. After do…

I've had to say this a fair few times here, but I'll keep saying it.

IEDevToolbar, which Firebug was pretty much a clone of, came out a year before Firebug. And it took Firebug years to catch up in feature parity, as far as I remember.

So, firebug didn't make it the dev tool of choice. We all just hated microsoft. And tabbed browsing was great.

Re: Tauri: An Electron alternative written in Rust

#298
post #232

Earlier quoted context omitted.

"almost a non-issue" doesn't sound very convincing to me. As someone who doesn't write GUIs often, I just don't want to have to worry about it at all. What's the cost of electron over webviews? 100mb hdd space? On the other side of the trade, never having to worry about cross platform concerns again? Not having to support or test on multiple platforms? Seems like a no brainer to me. But it's entirely possible, even l…

I really don’t share your point of view, but I understand it, for me feels like we as developers are getting worse and worse with the time, we get every year more powerful machines but our software is getting worse every year, who cares about performance if is cheap to develop, maybe if our apps uses less resources it would have less impact in the environment (less energy consumption is better for everyone, except fo…

I also hate electron apps, I refuse to install them on my personal machine, and use a(n independent) web browser.

Efficient software is great, the cool parts of the projects I work on are efficient. In my case, the GUI doesn't need to scale in the same way, and I'm pretty confident the customer would rather have better cross platform support (at a lower cost than if we had to test a bunch of OS web views) than 100MB of their disk back.

But yeah, there are plenty of examples of software I use where I disagree. Although this is often based on my aesthetic dislike for an inelegant system, than on any kind of resource constraint.

Re: Tauri: An Electron alternative written in Rust

#299

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…

It seems every couple of months there is an alternative to Electron posted here which uses system webviews. A quick search turns up a wide variety of them.

Re: Tauri: An Electron alternative written in Rust

#300

Question: Why do we need Electron alternatives? Why do we need to develop applications that need a bundled browser to run? Why can't we just use GTK/Qt?

Have you tried developing relatively complex UI with QT? You need to hire a team of engineers and spend man-years of effort to build custom UX that in the web / Electron can be replicated with an npm install fancy-library.

Yes, I hate Electron, but the alternative is not QT; it's something like Sciter.JS with real Web API compatibility (or perhaps a stripped down WebKit2 which is much less resource-heavy).

Post reply on HN