as someone who mostly uses C and doesn't do much web stuff, 25 MB being "lightweight" is crazy
One time, someone was angry I didn't approve their PR with a library choice which was an extra 5mb bloat on build, which provided basically nothing useful for a frontend, and they called their manager on me. The 5mb wasn't even the main reason why I said no...
classic argument failure: when you provide a list of problems, your opponent will choose the weakest one to focus on it and they will ignore the rest.
on the other side, was this a +5mb shipped to clients? or just a "build dependency" cached on dev machines?
That's really interesting, I had never heard of that. I will keep that concept in mind for the future.
Yeh it was legit 5mb shipped Chinese fucking malware, that was the real issue, luckily the higher ups sided with me.
Out of curiousity I wrote the simple cli app ( https://geni.dev ) in nodejs, Go, Java and C.
NodeJS - 24 MB
Go - 2MB
Java (GraalVM) - 9MB
C -18 kb
Yes, the C version is just 18kb.
you could probably get it lower with some clever linker flags
Is that possible for the others? I know with game engines you can reduce build sizes by omitting parts of the runtime you aren't using
No worries, anyone who genuinely thinks a 25mb web app is lightweight, is crazy
Agreed. 25MB is a lot, I'm actually mad with how bloated terminal emulators have gotten (let alone browsers, but browsers are a beast I'm not willing to tackle. I tried that and I'm not trying that again without a few million and a team of programmers). Nary a one below 20MB memory footprint nowadays. Almost enough to make me write my own, a VT10X compatible terminal emulator has absolutely no reason to use more than 20MB, let alone the hundreds I've seen in some cases.
electron 🤮
Tauri 😍
Native apps 🤯
I don't think anybody argues against the advantages of native apps, it's just that it's generally a financial and developmental pain in the ass to write platform-specific code for a cross-platform app, frameworks like Electron and Tauri have their problems but also solve some.
how well along is tauri?
Hit 2.0 recently and is gaining steam! The main thing that keeps some from adopting it is it's main selling feature: it's the OS native web view.
That means if you're a lazy web developer who uses non-standard APIs in Chromium, your web app is going to break.
But if you actually respect the web as a platform and write code that works in all environments, Tauri is the way to go at this point.
Did they fix webview issues on tauri 2.0? Last time i try use it i had all sorts of issues, global menu didn't work, the app didn't know the system theme (defaulted to light theme), clicking links didn't open they on the native browser, neither did they app if it tried to, making logins that redirect to the native browser unusable, it has like the app couldn't do any interaction with the system at all.
And my system isn't exotic, i have firefox and chromium installed, i'm using kde plasma, i have tons of libraries of all sorts installed because of many "dense" native apps, electron apps worked fine, native apps worked fine, tauri apps didn't.
So, if they fixed the incompatibility issues it would be awesome to have a new tool available for desktop development.
Nah there's a bunch of issues still, people keep promoting it without having really used it
Let’s just never use any new tech ever, there might be bugs.. chocker. In any case I haven’t had such issues in the 3 apps I deployed with it so far. The 2.0 from release some months ago isn’t the same as the current one. They had made a Herculean effort to fix bugs.
My problem isnt "new tech" my problem is tech that overstates it's maturity level constantly. Might be they fixed a lot in the last few months. Last I checked there were important issues open since years, and basic features were in experimental.
Give it some slack it is a open source project maintain by simply passionate people, the core functionality has been there for a long time regardless. Webview support on Linux has been finicky in some aspects. If they don’t hype it up no one would use it and the project would be dead, if stability is the issue god ol’ electron is solid in any case. Regardless I use it to create controls for pick and place cnc machines for years with 1.0. I just never had trouble with it.
I'm not making any demands about development whatsoever. I'm not entitled to anything from Tauri. But they sprinkle major versions on something that most big OSS projects wouldn't dream of, and the community sells it based on hate for electron, many without experience with it. In practice it's just not an electron replacement for many projects, both ergonomically and feature-wise.
The main issue with not having chromium only, is that chromium has a fuck load more APIs baked in that the other browsers don't have.
When developing for electron I can actually feel confident in using those APIs without having to think that most users wouldn't be able to use them
Yeah, that's exactly what I pointed out about lazy web developers not liking Tauri because it's using web standards
Except it's not laziness... There are just features which are not present in the other browsers that I want to use but can't.
Look at the Houdini API, or the MIDI API, etc...
Then why are you building a web app in the first place if you're not going to support the general web platform?
Presumably, you are also deploying your app as a website, otherwise why are you using Electron instead of another tool if it doesn't need to be on the web at all?
There are lots of cross-platform frameworks that don't require you to use web technologies that don't require shipping a whole web browser to the user.
Because the web and its technologies are the best framework for developing an application that is performant, looks good and is fast to develop.
If I develop an application with electron it means I don't plan to make it work on the web as I need electron's features together with being able to run things on an actual host rather than the web.
I actually do 99% of my apps to run on the web with web compatible things, when most of the people who do similar things make it run on the device because the web is seen as a limitation.
I don't know if you ever developed with any other GUI system, i have had a really bad experience with all of them and very slow development speed.
I tried with java, kotlin, rust, react native, flutter etc... the web just works
Fair enough.
I've found non-web GUI's to be quite straightforward personally, to the point where I'm extremely excited to never have to write JavaScript professionally ever again as WASM becomes more viable over the next few years, but to each their own.
NeutralinoJS.
Tho honestly any WebView based solution
It's gonna be THE FUTURE!
who cares about everything else , have you seen slack? Make your own slack!
25 mb and lightweight in the same sentence is gold
Javascript, lightweight and performant in the same sentence ??????
Only one of those three is a real word according to Merriam Webster
25 mb getting called lightweight makes me further realize how insane javascript development is
Do a progressive web app…
Then ios/safari breaks everything :(
Then fuck em ios users
That's it. You're getting the green message bubble.
It's still a web app, it will never be a real app
I like wails… I build a macOS image converter with it and it was a blast. Final app size? Only 33MB where the largest thing was ffmpeg binary included.
You make react/svelte/vue… app and required business logic in Go.
Well, you just added an entire browser engine, what did you expect?
just use tauri in this situation genuinely, no reason to use electron
I immediately stopped using it and trying to learn more once I learned that it uses an entire browser and an entire nodejs at the same time. It also has a very cumbersome 3 party sandboxing measure where you have to go from a file with the app, to a strange middleware file, to then call the 'backend' file.
Flutter 💪
I don't understand why electron started to require Windows 10 but also doesn't use WebView2.
These 2 things in combination just don't make sense to me. Just use Tauri if you're building something new
Because it bundles Chromium which doesnt support old versions of Windows anymore either.
Devs shouldn't be bending over backwards to support dead operating systems. Its like <1% of most user bases and generates a lot more than that in support tickets. Not worth the time and effort for 99% of us.
But why does it ship with Chromium when Windows 10 already comes with Chromium?
No reason to bundle over 700mb of dead weight imo
Windows ships with Edge. Edge is not Chromium.
Linux installs often have Firefox as their default browser and no Chromium implementation whatsoever.
The whole point of an Electron app is to be self-contained without needing dependencies.
Microsoft could update the version of Chromium that underpins their Edge install at any time (and they do.) If Electron is using the version built into Windows and there's a breaking change, congrats, now all your Electron apps are dead and won't function.
Enterprises are not fond of critical apps failing because of an overnight update. Bundling a specific version with the app guarantees ongoing compatibility.
So self contained apps use Electron and Steam uses Proton?
now someone has to come up with a neutron
Steam also uses electron, so now we just need some neutrons to stabilise the whole ordeal.
You're comparing a toaster to a lawn mower. Not the same concept.
I was trying for a pun but ah well
Windows ships with WebView2, which is what Tauri uses. Apple and Linux have similar APIs. You might want to look into it, it's actually a pretty cool feature
While the concern about breaking changes is legit, the same could be said about any critical web app
No. It can't be said about one with baked-in dependencies. Which is Electron.
But is electron a web app?
Web apps run in the browser and will always depend on the browser the user has installed. Electron builds desktop apps that use web technologies but they don't run in a browser and have no connection to the web unless explicitly built in
Thats all Electron is. It wraps web apps so they can run as desktop apps.
I would rather define it as an app that uses web technologies. Web apps always depend on the browser of the user
But at this point this argument is just about terminology, I don't care
[deleted]
Dynamic linking to save a couple MBs in shared libraries is why spending GB dockerizing to ensure a consistent runtime environment sounds reasonable and sane. When 99% of hard drive space is consumed by 4k 60FPS video, "oh you can share a couple library files between programs to save space!" Is a red herring.
This crap was already stupid in the late 90s. So many support calls, just to avoid a 50mb DLL. Yeah, in principle, its shared and re-used, in practice, the software never knew what it was going to get and user hated seeing the "DLL not found" error box.
And it's why its both unavoidable for Electron apps and also why they suck so fucking much.
What about libraries that are required to interact with the system? Having those be DLLs makes sense. Otherwise programs would need to know system implementation details which could vary across versions.
Sure I'm cool with dynamically linking massive basic libraries like GLIBC, but realistically your app ain't working across genuinely different systems without a recompile.
Even if you use Boost for system independent sockets, you ain't getting a basic hello world socket program working on Linux and Windows without a recompile. If recompiling is a step anyway, dynamically linking doesn't increase portability.
And in situations where you are targeting several different Linux Distros of varying age, say an ancient red hat and a modern Ubuntu, dynamically linking can make it harder to keep your code portable.
If your build and install scripts rely on the end user being able to (package manager install specific lib version), but not every distro your targeting can install that lib version, you're kinda fucked. If you'd set up a build environment that builds the specific lib version from source and statically links it in the first place, it'd be easier to swap between different targets. You'd have longer clean builds and your build dir would be larger, but I don't mind those issues.
I'm not totally against dynamically linking. For things like security focused libraries, where maintaining the lat at version is of way more importance than developer convenience, dynamically linking makes a ton of sense. But dynamically linking to scrooge McDuck a couple megs of storage is just stupid.
[deleted]
Because those handful of files can be ludicrously important and a full copy of edge is like a nickel of hard drive space. Why fuck around and make dependency hell to save a nickel of disk space?
The alternative im describing is one I fully approve of. Electron good and the circle jerk against it is bad.
The nice thing with shared libraries is rather user freedom. You can swap a shared library with another one with the same API. Of course that's the opposite of having a reproducible environment, but it can be very useful for end users.
End users ain't exactly swapping library types. If two libraries have exactly the same API implemented with exactly the same quirks, so that they can be hot swapped, why would you want to go swap them?
The same API doesn't mean the same implementation. I'm talking about power users of course, someone who might recompile a particular library with some changes and use it. Or maybe Linux distributions.
Sure you can implement the same API with different quirks, but then a program probably ain't gonna work right if you hot swap the library.
If we are talking about recompiling being a step in the process, why bother with dynamically linking, just recompile the base app. If the app itself is closed source, I highly doubt every domino is going to line up just right for a Linux super user to want to swap out one open source library for a very similar,but slightly different version of the same library .
How long until 10 is dead..
End of this year for base support, extended support lasts a few more years. And even after that, it always takes time to truly phase stuff out.
The further out of support something is, the less work should be put into maintaining apps for it.
Windows 7 has been EOL for 5 whole years now and it had an exceptionally long shelf-life because of the poor reception to 8. But people have had plenty of time to transition off. Windows 8 has been EOL for 2 years now, and there's not many good excuses not to move to at least 10.
11 is a different beast with all the TPM controversy, I have a feeling 10 is gonna hang around a lot longer than most of us would like.
I’m still on 10 and don’t wanna switch. More spyware. I’m sick of it.
A TPM is not "spyware" it's a secure enclave to make sure your encryption keys don't leak.
If you wanna complain about 11, the ads are where you should direct your energy. I can absolutely guarantee that the data collection systems are identical between the two OS's.
I didn’t say the tpm is spyware.
It has the advantage of enforcing the exact same chromium version on all platforms. If your thing works fine on every browser by default (as it should) you're probably fine for using webviews
I think something like a compiler option that either ensures complete comparability or ditches the 700mb of chromium would be very welcome
Tauri brings much more issues. it just doesn't have the development hours to be solid enough for most real world use. I've tried to use it at both major versions, and so much essential stuff was still not there