News for hackers. Stuff that matters.
Re:Every Windows 11 app should kill Electron, and Discord ju... by 72deluxe on Saturday November 07, 2026 @09:49AM (#50405025)
But then the C++ libraries you mentioned also had the ability to statically link into a binary, which means you could statically link the webcam access in, in your example. So I don't see the advantage you're arguing for?
Re:Every Windows 11 app should kill Electron, and Discord ju... by cogman10 on Saturday November 07, 2026 @10:00AM (#50405132)
It comes down to package distribution.

Chrome had already solved the hard problem of "how do we support webcams on linux, windows, and mac" and you as the dev just needed to use the Javascript webcam api. ( https://developer.mozilla.org/en-US/docs/Web/API/MediaDevice... )

In C++ land, you are ultimately going to either need to cook up your own webcam library or look for a 3rd party (which, in 2010, likely didn't exist) to provide it.

Today, there are a few easy to discover rust crates which provide cross platform webcam apis. But further, rust does cross platform better than C/C++ IMO. It's really easy to change how code is compiled based on the target. That was all well thought out because rust was supposed to be a language for browsers.

Re:Every Windows 11 app should kill Electron, and Discord ju... by pjmlp on Saturday November 07, 2026 @03:42PM (#50407855)
Qt is easily obtainable via vcpkg or conan.
Re:Every Windows 11 app should kill Electron, and Discord ju... by edoceo on Saturday November 07, 2026 @03:54PM (#50407954)
Was that true in 2012?
Re:Every Windows 11 app should kill Electron, and Discord ju... by Krutonium on Saturday November 07, 2026 @04:03PM (#50408036)
Very yes.
Re:Every Windows 11 app should kill Electron, and Discord ju... by pjmlp on Saturday November 07, 2026 @04:11PM (#50408107)
Depends, it was easily obtainable via OS package managers, and installers in 2016.

However that has been true since 2016, and here we are, 10 years later.

Re:Every Windows 11 app should kill Electron, and Discord ju... by justincormack on Saturday November 07, 2026 @05:12PM (#50408545)
For Linux, but not for Windows and Mac
Re:Every Windows 11 app should kill Electron, and Discord ju... by pjmlp on Sunday November 08, 2026 @03:36AM (#50411455)
I mentioned "and installers" for a reason, I know Qt since KDE exists.
Re:Every Windows 11 app should kill Electron, and Discord ju... by bluGill on Saturday November 07, 2026 @07:48PM (#50409498)
Neither existed in 2012, so of course not. On the other hand, QT has always been really easy to download from QT. I don't remember who owned QT in 2012. They've changed hands a couple times over the years, but in 2012 I was downloading QT from whoever on them. QT was large, so you needed a decent sized computer to build it, but in 2012 this was not a big deal.

People get too hung up on package managers. When you're building your own proprietary you don't really need a package manager, you just need a central place to download the tarballs from. Or you could do a monorepo and just build everything locally - in 2012, that means you start your build before you leave Friday afternoon, and when you come back Monday, everything's built.

Re:Every Windows 11 app should kill Electron, and Discord ju... by bluGill on Saturday November 07, 2026 @07:45PM (#50409484)
A cross platform webcam library isn't that hard to build at C++. I mean, it's tedious, and having to support multiple different operating systems makes it harder, so it certainly is going to cost a small pile of money, but this is not hard. The pile of money needed won't be all that large. Mind you, I prefer to use something that's off the shelf rather than writing my own, but it would not be hard to write my own.

The hard part of all webcam libraries is all the different webcams running all their different proprietary protocols.

Re:Every Windows 11 app should kill Electron, and Discord ju... by MindSpunk on Sunday November 08, 2026 @01:12AM (#50410856)
Write the code or build the code? That's always the problem with C++ libraries.

It's not that difficult to write cross platform C++ code. Consuming the dependency is always painful. What build system does it use? What compilers does it support? How do you get the code? There is 0 standardization for these things.

C++ code isn't always that portable either. Old code in a new compiler is very likely to break on warnings, especially if the old code made the high quality decision to hard code -Werror in their build system.

From personal experience Rust as a package and ecosystem is far more portable than C++.

Re:Every Windows 11 app should kill Electron, and Discord ju... by jpc0 on Sunday November 08, 2026 @01:13AM (#50410861)
It is 2026 and regardless it has been quite a while that cmake fetch content had been usable.

The only reason why a cross platform well supported C++ package/module isn't available is because nobody has bothered to build it.

If it really is something that bugs you then be the one to do it, throw your clanker of choice at it and integrate it into a project you run in production.

"Chromium ahips with it" isn't a valid excuse these days, that is likely an hour or two away with a modern LLM, building and packaging electron is more work.

Re:Every Windows 11 app should kill Electron, and Discord ju... by jasomill on Saturday November 07, 2026 @01:01PM (#50406559)
Dynamic vs static linking is mostly a red herring for desktop GUI application development unless you want to integrate into something like Linux distro package managers, as dynamic libraries on Mac and Windows can be self-contained within the application bundle/directory with no disadvantage beyond marginally longer startup time, and you can do similar things with Flatpak and friends on Linux.

The real difference is that Rust provides a package repository with a unified build system that's as simple to use as NPM or NuGet.

vcpkg which is similar exists today, but it didn't in 2015 when Discord started, still isn't anywhere near as comprehensive as package repositories for languages where package management is part of the standard toolchain, and the underlying build systems are far messier under the hood.

It can also be helpful in development to use libraries built from source as part of the application's build process, at least as an easily-accessible option, which wasn't common practice in most C/C++ ecosystems historically where different libraries used different build systems and if you wanted to integrate them into something like a Visual Studio solution for easy reference to source code during development and debugging you were often on your own.

Re:Every Windows 11 app should kill Electron, and Discord ju... by vrighter on Saturday November 07, 2026 @10:18PM (#50410140)
you can do that easily on linux too
Re:Every Windows 11 app should kill Electron, and Discord ju... by hobo123 on Sunday November 08, 2026 @06:28AM (#50412338)
IIRC Qt is LQPL, so if you linked it statically you'd have to license your code as LGPL too. Shipping Qt as a separate dll didn't trigger that issue.