News for hackers. Stuff that matters.
Re:Tauri – Electron alternative written in Rust by krapp on Wednesday January 05, 2022 @05:38AM (#29807423)
"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.

Re:Tauri – Electron alternative written in Rust by wokwokwok on Wednesday January 05, 2022 @06:43AM (#29807827)
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 <3 rust), but tell me this won’t sit there guzzling all the memory it can get it’s hands on for the UI?

Ie. really, do you get meaningful benefits from using this over say, literally just using https://github.com/webview/webview?

Re:Tauri – Electron alternative written in Rust by rebolek on Wednesday January 05, 2022 @07:26AM (#29808120)
> 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.

Re:Tauri – Electron alternative written in Rust by wokwokwok on Wednesday January 05, 2022 @08:58AM (#29808952)
Yes, but this is my point.

https://github.com/tauri-apps/tauri/discussions/3162

> FabianLars, 3 hours ago, Collaborator

> ...for example my somewhat simple app uses ~120MB

> But only ~5MB is the actual tauri/rust process, the rest is WebView2.

So, if 60MB is a large download, surely a simple app using 120MB of ram is pretty outrageous too?

> There is no reason why hello world UI should be 60MB.

Absolutely, but you can't have everything. Fast. Small. Doesn't use any memory. Easy to develop for. Free. Consistent cross platform behaviour.

You can't have them all.

So... the question isn't "is 60MB ok?"

The question is: What do you care about the most? Is it really the download size?

It's not the download size for me.

Re:Tauri – Electron alternative written in Rust by jen20 on Wednesday January 05, 2022 @09:24AM (#29809268)
I’d encourage you to rethink whether the “all” you describe is desirable. I couldn’t care less whether an app is consistent across platforms - in fact I consider that a strict negative since apps should be consistent with the platform on which they are running not with themselves on other platforms.
Re:Tauri – Electron alternative written in Rust by phil294 on Wednesday January 05, 2022 @12:20PM (#29811848)
I don't think that "consistent" always necessarily refers to pixel-perfect equality. When using this term in web dev, most would refer to browser standards as in spacing, layout, JS apis, availability of native elements etc. In this context, consistency is rather the opposite of negative. I don't think anyone really cares about how date picker looks on Firefox vs. on Chrome.

Maybe you are referring to Gtk/Qt vs. win32 etc. with their integrations in the operating system. I agree that they look and feel the best for their respective OS, but eventually require you maintain multiple unrelated codebases. It is understandable and necessary for this approach to die. A middle ground would be best, say, Qt support on all existing platforms. Or more likely, prettier browser defaults for standard elements like lists and tables, with browsers themselves respecting the underlying OS theme. Probably never gonna happen...

Re:Tauri – Electron alternative written in Rust by jen20 on Wednesday January 05, 2022 @07:37PM (#29817477)
I'm not that interested in using lower common denominator software on any platform - for my purposes I am only interested (and willing to pay for) software written to integrate with macOS in a first party manner. That means I want all of the accessibility controls to work, all of the system integration to work and so forth. I'd expect anyone serious about software to want the same on whatever platform they use. Lowest common denominator crap is the thing that needs to die.
Re:Tauri – Electron alternative written in Rust by heurisko on Wednesday January 05, 2022 @08:09AM (#29808414)
I can remember using 56k dialup and downloading ISOs around 650MB.

A 60MB download would have been fine.

Indeed, with the annoying habit of proprietary software to install "Download managers" that download the actual software, I would be happy for just a 60MB runtime for the actual program itself.

Re:Tauri – Electron alternative written in Rust by pjerem on Wednesday January 05, 2022 @08:45AM (#29808776)
I'm not sure you really remember. With 56k dialup, downloading 650MB could easily take days. Downloading 1MB could have taken 3 to 4 minutes.

60MB, even today, is really big when you have to download it while boarding a train or with poor connectivity (even in rich countries, just being in a metallic building is enough for 60MB to be painful to download.

Re:Tauri – Electron alternative written in Rust by heurisko on Wednesday January 05, 2022 @12:06PM (#29811640)
I remember leaving the computer on to download 650MB overnight, which used to be an ISO for an operating system. It was usually finished sometime the next day.

And 60MB would have been a couple of hours, not bad to wait for some software.

It wasn't prohibitive to do this.

Indeed, I seem to be back at square one, as downloading a AAA game for me once again takes about a day.

Re:Tauri – Electron alternative written in Rust by projct on Wednesday January 05, 2022 @12:48PM (#29812302)
Add a little line noise for the average 30-70y/o house wiring and you get 43 hours for 33.6 or 50 hours for 28.8. It took running a brand new line in order for me to get 56k. So, the parent comment is accurate.

It was absolutely prohibitive for the average person with a shared line, and the direct comparison to shared line today is a metered connection. Even in the US it can be as much as $30 per gigabyte which would make that 60MB download cost $1.80.

Re:Tauri – Electron alternative written in Rust by liketochill on Wednesday January 05, 2022 @12:40PM (#29812164)
650,000 kb / 5 kb/s = 36 hours
Re:Tauri – Electron alternative written in Rust by HatchedLake721 on Wednesday January 05, 2022 @10:13AM (#29809917)
You download desktop apps while boarding a train?
Re:Tauri – Electron alternative written in Rust by int_19h on Wednesday January 05, 2022 @02:00PM (#29813330)
I also remember using 56k dialup, and we paid per minute. A 60 Mb download would take several hours.
Re:Tauri – Electron alternative written in Rust by wolframhempel on Wednesday January 05, 2022 @10:40AM (#29810305)
Arguably both Slack and Spotify (and Visual Studio?) have reached significant scale with Electron apps - so at the end of the day it seems to be less of an issue for end consumers.
Re:Tauri – Electron alternative written in Rust by msbarnett on Wednesday January 05, 2022 @01:11PM (#29812686)
Spotify is built on Chromium Embedded Framework, not Electron. Common misunderstanding.
Re:Tauri – Electron alternative written in Rust by hendersoon on Wednesday January 05, 2022 @01:51PM (#29813230)
Lots of things are popular, but that doesn't imply quality. McDonald's does not make the best hamburger in the world.
Re:Tauri – Electron alternative written in Rust by AlexAndScripts on Wednesday January 05, 2022 @11:56AM (#29811465)
VSCode is Electron, not VS.

I would add Discord to that list.

Re:Tauri – Electron alternative written in Rust by nine_k on Wednesday January 05, 2022 @08:18AM (#29808510)
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 by tekknik on Wednesday January 05, 2022 @10:50AM (#29810431)
But you don’t pay RAM usage fees.
Re:Tauri – Electron alternative written in Rust by c-smile on Wednesday January 05, 2022 @07:33PM (#29817430)
You would be surprised but that is exactly what you do when you access VMs on clouds.

To be short: if you can make your app less greedy - do it.

In some cultures we have a concept of "engineering conscience" (ru: "инженерная совесть"). Are we loosing all that?

Re:Tauri – Electron alternative written in Rust by tekknik on Wednesday January 05, 2022 @11:48PM (#29819531)
Oh sure, not just VM, but in all rented server instances. But we’re talking about home machines here.
Re:Tauri – Electron alternative written in Rust by cozzyd on Wednesday January 05, 2022 @03:42PM (#29814637)
Don't give them any ideas.
Re:Tauri – Electron alternative written in Rust by hkalbasi on Wednesday January 05, 2022 @08:11AM (#29808427)
Per https://github.com/Fournux/tauri-vs-electron it uses just 20 MB of ram on linux.

Why? I guess because webkit-gtk is less ram hungry than blink.

Re:Tauri – Electron alternative written in Rust by tuananh on Wednesday January 05, 2022 @08:54AM (#29808890)
any idea why the memory usage difference on windows are very close but significantly different on linux?
Re:Tauri – Electron alternative written in Rust by hkalbasi on Wednesday January 05, 2022 @09:45AM (#29809550)
WebView2 is chromium edge. This was the reason that I guessed webkit-gtk uses less ram than chromium.
Re:Tauri – Electron alternative written in Rust by tuananh on Wednesday January 05, 2022 @09:49AM (#29809611)
ah, that makes sense. thanks
Re:Tauri – Electron alternative written in Rust by dotancohen on Wednesday January 05, 2022 @09:27AM (#29809313)

  > I really don’t care if my hello world UI is 60MB to download,
If you're writing Hello World for fun, then sure. But _I_ won't be using any of your software if it's that bloated. I'm not going to even complain to you about my internet connection or hard drive space or personal preferences. If you are not going to respect my resources as a dev, I will not use your software. Just like I won't ride with a cabbie who curses and cuts off other drivers.
Re:Tauri – Electron alternative written in Rust by bastardoperator on Wednesday January 05, 2022 @10:42AM (#29810333)
How do you feel about video games that range hundreds of gigabytes?
Re:Tauri – Electron alternative written in Rust by tekknik on Wednesday January 05, 2022 @10:52AM (#29810476)
Games with hundreds of GB are using high poly models and high res textures. The actual code segment of the game is much much less. This isn’t really the same.
Re:Tauri – Electron alternative written in Rust by bannable on Wednesday January 05, 2022 @03:11PM (#29814283)
Games at that size are not clocking in because of their models and textures. It's from use of lossless, uncompressed audio files, and shipping multiple language files.

The issue is most common on games that release on consoles, but also for ones that want to support older hardware: the audio formats they use are designed to minimize the amount of decompression necessary for play, and so reduce resource requirements in exchange for storage space.

Re:Tauri – Electron alternative written in Rust by tekknik on Wednesday January 05, 2022 @11:47PM (#29819519)
i’ve not yet seen a sound sample above a few 100mb, uncompressed. however it’s quite common to see a source model, or even a cooked down version, can absolutely be above 1gb. sound, except soundtracks (mostly), are also reused whereas models are not usually. couple that with one of your reasons, supporting all possible resolutions (PC games are the big offender here), and i don’t see sound being a huge issue. you can also compress sound while in transit, textures will only compress so much. wavs/PCM compress quite well
Re:Tauri – Electron alternative written in Rust by dotancohen on Wednesday January 05, 2022 @01:25PM (#29812883)
I don't play video games, so I have no opinion of them. I actually do play Kerbal Space Program, though I think that it is a few hundred megabytes, certainly not even a single gigabyte.
Re:Tauri – Electron alternative written in Rust by bastardoperator on Wednesday January 05, 2022 @02:13PM (#29813492)
1.9 GB on disk not including expansions.

https://www.gog.com/game/kerbal_space_program

Re:Tauri – Electron alternative written in Rust by dotancohen on Wednesday January 05, 2022 @04:49PM (#29815496)
In that case, I feel that I'm getting a decent experience for the size.

Would you argue the same for a 60 MB Hello, World application?

Re:Tauri – Electron alternative written in Rust by bastardoperator on Friday January 07, 2022 @04:28PM (#29845071)
Depends, if someone presented a hello world example in unreal engine I would expect the binary to be larger than 60MB.
Re:Tauri – Electron alternative written in Rust by dotancohen on Saturday January 08, 2022 @03:12PM (#29855672)
Fair point.
Re:Tauri – Electron alternative written in Rust by WolfOliver on Wednesday January 05, 2022 @10:55AM (#29810511)
To download the zipped version of https://www.monsterwriter.app/ it needs 100MB. If I build an universal file (Intel and M1) it doubles in size.

I assume this to be a conversion killer. If you have to wait 10 min do download you loose interest in trying it out.

Re:Tauri – Electron alternative written in Rust by jmondi on Wednesday January 05, 2022 @11:15AM (#29810838)
100MB in 10m is 166.7KB/s. I’m gonna go ahead and guess that most people have internet faster than that.
Re:Tauri – Electron alternative written in Rust by jraph on Wednesday January 05, 2022 @07:20AM (#29808070)
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 framework, of course.

Hopefully, developers turning to Tauri will have some sensibility to lightness.

Re:Tauri – Electron alternative written in Rust by nine_k on Wednesday January 05, 2022 @08:16AM (#29808490)
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 by dmingod666 on Wednesday January 05, 2022 @08:16AM (#29808494)
It's got better memory stats than electron on the tests I saw..
Re:Tauri – Electron alternative written in Rust by kitsunesoba on Wednesday January 05, 2022 @05:53AM (#29807503)
I’ve always felt that engine inconsistencies in electron-alikes are a bit overblown, particularly now with the old IE-based webview out of the picture (modern Windows uses a Blink-based webview). They’re all capable of the basics, and the greatest inconsistencies will be found in newer features. Stick to a slightly older well supported set of features and you’ll be fine.

There are some significant differences between engines when it comes to things like local file access, but that’s what the native component of electron/tauri/etc is there for.

Re:Tauri – Electron alternative written in Rust by FooBarWidget on Wednesday January 05, 2022 @06:31AM (#29807754)
I'm not sure why downvoting is needed. What's said is true: on the web we already have to deal with different browsers and versions. It should be a fact of life for web developers. And things today are still infinitely better than back in the IE 6 days: many modern features work on all major targets. Why do people insist so much on engine consistency for "desktop web apps"?
Re:Tauri – Electron alternative written in Rust by usrusr on Wednesday January 05, 2022 @06:44AM (#29807837)
Yeah, and large fraction of the dev appeal of Electron is that a concern that has haunted web development for a quarter of a century is completely out of the picture when you do Electron. You're not even concerned with possible differences between past, present and future versions of the engine because your code runs with exactly the version you bundled.

Sure, if your app is just a faux-native variant of something that is developed for the browser anyways nothing is lost, but if it's an offline first application that just happens to use web tech for UI the difference is huge.

Re:Tauri – Electron alternative written in Rust by schwartzworld on Wednesday January 05, 2022 @06:38AM (#29807794)
Most cross compatibility issues have been resolved in browsers. Firefox and Chrome are pretty much at parity, Edge is chrome and Safari is the exception.

Web views are less standardized though and require more finesse.

Re:Tauri – Electron alternative written in Rust by dmitriid on Wednesday January 05, 2022 @10:22AM (#29810033)
> Firefox and Chrome are pretty much at parity, Edge is chrome and Safari is the exception.

Firefox and Safari are very much at parity. Chrome ships ~40-70 new "standard" APIs every month or so: https://web-confluence.appspot.com/#!/confluence

Re:Tauri – Electron alternative written in Rust by tekknik on Wednesday January 05, 2022 @10:55AM (#29810515)
In my experience it’s Chrome that does weird things. I write for Safari and it works great in FF. Chrome and Edge will require some tweaking of CSS to make it look correct.
Re:Tauri – Electron alternative written in Rust by fragmede on Wednesday January 05, 2022 @07:20AM (#29808069)
Chrome is the new IE6, and guarantees cross platform compatibility everywhere it uses its own renderer though. (Basically !iOS.) It's a strong reason for choosing to Electron for your "native" app.
Re:Tauri – Electron alternative written in Rust by pjmlp on Wednesday January 05, 2022 @07:29AM (#29808146)
Nice IE reference, helping Google to spread ChromeOS is exactly one reason not to package Electron everywhere, besides the bloat to have multiple copies.
Re:Tauri – Electron alternative written in Rust by awestroke on Wednesday January 05, 2022 @05:44AM (#29807453)
Everyone is basically using Chrome or Safari nowadays - so WebKit. Very little incompatibilities to consider compared to writing something that works on different WebView implementations
Re:Tauri – Electron alternative written in Rust by Semaphor on Wednesday January 05, 2022 @05:47AM (#29807469)
Luckily, that is not the case. In Germany, FF still has 20% on Desktop and 10% total (and I wonder if those numbers are maybe too low, as FF blocks those trackers by default).
Re:Tauri – Electron alternative written in Rust by gefhfffh on Wednesday January 05, 2022 @06:33AM (#29807771)
That means that there are about 8 million people using Firefox in Germany.

The world has more than 3 billion internet users

Re:Tauri – Electron alternative written in Rust by jcelerier on Wednesday January 05, 2022 @06:52AM (#29807889)
I don't understand why this relative metric matters. Past the size of a small city it just shouldn't matter how many more users the competition have. There are more firefox users today (~200M) than there were total internet users in 1998 (~150M), and surely you would agree that it does not make sense to discard that, any more than it makes sense to discard, say, UK or France from diplomatic relationships because they have ~70M inhabitants while India and China account for almost 3 billion.
Re:Tauri – Electron alternative written in Rust by gefhfffh on Wednesday January 05, 2022 @01:22PM (#29812846)
Hmm it matters because when everyone basically uses competition, it doesn't matter if a few people use something else
Re:Tauri – Electron alternative written in Rust by brnt on Wednesday January 05, 2022 @10:28PM (#29818970)
Just because only 17M people live in the Netherlands, does not mean it's OK to block them. Just because people in wheelchairs don't wall, does not mean we don't need to build streets such they can get around too. Just because some people use the Greek script, does not mean ASCII is enough.

It's called accessibility, and it's a very good thing.

Re:Tauri – Electron alternative written in Rust by gefhfffh on Thursday January 06, 2022 @07:14AM (#29822590)
You are arguing against a straw man
Re:Tauri – Electron alternative written in Rust by ben-schaaf on Wednesday January 05, 2022 @06:03AM (#29807574)
WebKit and Blink have many significant differences, especially when it comes to supporting newer features. In terms of incompatibilities they're about as different as Gecko is from Blink, if not more so.
Re:Tauri – Electron alternative written in Rust by elpescado on Wednesday January 05, 2022 @06:38AM (#29807802)
> as different as Gecko is from Blink

As someone who has been playing with some web dev in early 2000s, that sounds funny. Gecko, WebKit and Blink seem very consistent to me. I remember dealing incompatibilities between IE6 and "standards-compliant" browsers (mainly Firefox/Mozilla Suite back then). And don't get me started on dealing with "classic" Netscape!

`<layer>` tag anyone?

Re:Tauri – Electron alternative written in Rust by capableweb on Wednesday January 05, 2022 @06:25AM (#29807709)
Not sure how familiar you are with the history of browser engines, but Blink and WebKit are definitely more similar than Gecko and Blink.

Gecko comes from the heritage of Netscape. Blink comes from the chain of KHTML > WebKit WebCore. They don't share any points, while Blink probably wouldn't have existed without WebKit.

But yes, today there are differences between WebKit and Blink.

Re:Tauri – Electron alternative written in Rust by carlhjerpe on Wednesday January 05, 2022 @06:40AM (#29807816)
"In terms of incompatibilities they're about as different as Gecko is from Blink, if not more so."

> Not sure how familiar you are with the history of browser engines, but Blink and WebKit are definitely more similar than Gecko and Blink.

I see we interpreted parent poster differently, he wasn't talking about the history of rendering engines, but rather compability with the various web specs. Since Chrome forked WebKit quite a long time ago now and Blink has been reworked quite a bit they have deviated from eachothers implementations. Since everyone is trying to follow an open spec it might be that in certain areas FF and Chrome implement more of the same API's than Safari, which doesn't have anything to do with codebase history.

You might and probably will feel more comfortable in the WebKit codebase if you're a Blink developer or vice versa in comparision to Gecko, but that is if you're writing the engine itself and not pressing the pedals (targeting it).

Re:Tauri – Electron alternative written in Rust by sanxiyn on Wednesday January 05, 2022 @05:56AM (#29807521)
Sorry, I am using Firefox.
Re:Tauri – Electron alternative written in Rust by roblabla on Wednesday January 05, 2022 @05:49AM (#29807480)
WebKit, WebKitGTK and WebView2 are all webkit-based too currently. WebView2 was always chromium-based afaict, I think the old trident-based edge had a separate control.

Also, on the web, firefox still exists.