Live data from Hacker News

Tauri – Electron alternative written in Rust

tauri.studio

101–110 of 435 posts

Re: Tauri – Electron alternative written in Rust

#101
post #98

Earlier quoted context omitted.

I don't know about that, one data point: an ES2018 feature, regex lookarounds, is still not implemented in Safari. And the JS engine is the thing that's the most compatible across browsers, nowhere near the level of incompatibility of the rendering engine for example.

Ignore stuff that was added to HTML, CSS, and JS for last 4-5 years. You'll still have a pretty solid? GUI platform, likely more capable and accessible than Qt or GTK or AWT. With the usual compiler / transpiler stack, you'll have a nice, fast-to-market, non-esoteric development environment. All without the need to ship 100MB binaries.

Sorry but requiring web devs to ignore the last 4~5 years of progress is just unacceptable.

Not that that would fix the situation, there are still rendering inconsistencies between browsers when using stuff like margins floats and tables.

Re: Tauri – Electron alternative written in Rust

#102
post #61

Earlier quoted context omitted.

I mean… fair, but is the 60MB runtime the issue? I really don’t care if my hello world UI is 60MB to download , I care that it consumes 1 GB of my precious ram to run. How is running js with a rust backend any better than running js with a C++ backend? I guess your “backend” is rust here, which is nice (because I Ie. really, do you get meaningful benefits from using this over say, literally just using https://github.…

One can hope that the code of the engine will be shared across apps in memory, thanks to shared libraries, and that the engine itself will use shared things too, by virtue of being distributed with the OS. ... if you happen to run other browsers and apps using this WebKit / libwebkitgtk / webview. and that embedded apps won't be obese frontend code with bazillion npm dependencies and a heavy, all too widespread frame…

The code size is usually epsilon compared to the amounts that the JS heap, DOM, and JIT consume. These are not shareable.

Re: Tauri – Electron alternative written in Rust

#103
post #6

Earlier quoted context omitted.

"cross-platform compatibility" isn't guaranteed on the web either, yet somehow "cross-platform compatible" websites exist. It isn't a problem that's so difficult it requires wrapping a 60Mb runtime around every individual app instance.

I mean… fair, but is the 60MB runtime the issue? I really don’t care if my hello world UI is 60MB to download , I care that it consumes 1 GB of my precious ram to run. How is running js with a rust backend any better than running js with a C++ backend? I guess your “backend” is rust here, which is nice (because I Ie. really, do you get meaningful benefits from using this over say, literally just using https://github.…

It's got better memory stats than electron on the tests I saw..

Re: Tauri – Electron alternative written in Rust

#104

One very important thing I'd like to highlight: using one shared browser instance rather than N is not gonna make your apps that consume 1GB+ of memory suddenly consume much less than that, the problem for those apps is the code they run, it's not the language, it's not the platform, it's the badly written code, and Tauri doesn't change that.

Back in the day people coded lightweight because it wouldn't run otherwise, and speed mattered in single core sub-GHz CPUs. We don't have that same constraint today, how do we get people to write more efficient code?

Re: Tauri – Electron alternative written in Rust

#105
post #94

I have a hard time understanding why platforms like electron are so popular. The predictions from Gary Bernhardt seem to really be true, in the future everything will be javascript. I wonder if somebody actually tried to make an OS that only has a browser, that's what Chrome OS actually is, after all.

> I have a hard time understanding why platforms like electron are so popular.

To what extent is Electron's popularity due to getting cross-platform availability without writing your code 3x?

The advantages of a native app have to be worth the costs... and I'm seeing plenty of Electron apps so there's a lot of people making that cost-benefit tradeoff.

I share the dislike for bloated apps... but every time my stuff takes 10 seconds to start up I think more about keeping it running the whole day than submitting a PR to remove cruft.

Re: Tauri – Electron alternative written in Rust

#106
post #65

Earlier quoted context omitted.

I mean… fair, but is the 60MB runtime the issue? I really don’t care if my hello world UI is 60MB to download , I care that it consumes 1 GB of my precious ram to run. How is running js with a rust backend any better than running js with a C++ backend? I guess your “backend” is rust here, which is nice (because I Ie. really, do you get meaningful benefits from using this over say, literally just using https://github.…

> I really don’t care if my hello world UI is 60MB to download lot of people cares, they may have a slow connection, must pay per MB and so on. There is no reason why hello world UI should be 60MB.

While true, you pay the price to download a program once, but the price to run the program, every day.

Re: Tauri – Electron alternative written in Rust

#107
post #87
post #63

Earlier quoted context omitted.

With all due respect, I think the web’s layouting (or lack of) is the most complicated out of any framework I have ever used (including qt, swing, javafx, winforms, wpf). I think the great majority of web devs would have trouble recreating something like bulma (regarding layouting) even without responsiveness — I definitely would have quite a bit of trouble doing that. So if anything, we are just accustomed to the we…

I agree with that. Doing layouts with HTML and CSS is too open, flexible, which means you have to do everything yourself from scratch every single time. Another thing you have to do from scratch is the eye candy aspect of every webapp. I guess the web is more flexible in the sense that you can do anything you want UI-wise, but honestly, how much time and work and money is spent on making pretty webapps? How much more…

And my biggest gripe is that the product you would get out of the aforementioned frameworks without any design would look.. ok, usable. But even if you just want a website that is not just a bunch of text (though even that require some css to make it readable smh) you have to get quite invested into CSS, or at least bring in a css lib that provides you with some basic design. Otherwise it will look like it is the remains of some website from ARPANET.

Re: Tauri – Electron alternative written in Rust

#108
post #82
post #75

Is there still an easy way to use node.js with Tauri? I'd appreciate an easy to use cross-platform tool on the backend. Or is it better to build the backend features needed (e.g. file access, config management, network etc.) fully in rust?

If you do that, wouldn’t it be NW.js?

that seems to use Chromium on the frontend and not the native webviews

Re: Tauri – Electron alternative written in Rust

#109
post #94

I have a hard time understanding why platforms like electron are so popular. The predictions from Gary Bernhardt seem to really be true, in the future everything will be javascript. I wonder if somebody actually tried to make an OS that only has a browser, that's what Chrome OS actually is, after all.

Aside from the improvements to project timelines, Electron and similar products are popular because they improve the developer experience, and in 2022 the developer experience is what matters the most to many software companies (yes, in many cases ahead of the customer experience).

DX directly drives engagement and retention, and good developers are hard to find (and keep!).

And like it or not, there are more and more developers entering the industry with web-only training, so we have products that reflect the stack and tooling those developers are most proficient with.

Re: Tauri – Electron alternative written in Rust

#110
post #4

If anyone wants to know how it works: > [leverages] WebKit on macOS, WebView2 on Windows and WebKitGTK on Linux. So cross-platform compatibility isn't guaranteed, unlike Electron. https://github.com/tauri-apps/tauri

It would be better to use Rust+Servo (no JS, or at least optional) IMO

Tauri allows you to build apps that are pure rust - the js is optional and has multiple configurable integration models called 'patterns' that allow defining and constraining the engines includsd, the interfaces between them, and the tradeoff between binary size and distribution simplicity/robustness.

https://tauri.studio/en/docs/usage/patterns/about-patterns

Post reply on HN