Hacker News new | ask | show | jobs
by hexrcs 3195 days ago
A bit off-topic but I wonder if it is possible that Electron team distribute something like the VS C++ Runtimes on Windows? And release patches for different versions/updates?

Haven't used a Windows machine for a while but I remember there were bunches of different VS Runtime version installed on my PC before. Some app installers came with a runtime installer, but if the required runtime version was installed it would just use that one. I think this might somewhat reduce the installed app size for Electron apps as at least some stuff got reused.

1 comments

There has been discussion of this idea. https://github.com/electron/electron/issues/673
You can approximate this somewhat today by distributing only an .asar or .zip archive of an application package and encouraging:

    npm install -g electron
    electron ./myapp
Or as npx gets more widely deployed:

    npx electron ./myapp
That's not a particularly "robust" way to install applications and you can't use native libraries outside of the base Electron distribution, and you'd mostly only be useful to devs with NodeJS already installed, but it's an option of a sort.

(It still won't share as much runtime memory as you might want, but it would reduce install footprints at least.)

There's also experiments like electrino [1] to force more use of platform webviews since all of our platforms have a webview built in anyway, trading some additional testing for bundling Chromium everywhere.

I'm surprised that I haven't yet seen a fork of electron-windows-store [2] that makes use of the UWP webview, as that seems an obvious enhancement to me. The Electron remoting between webviews and Electron code is already setup well enough you should be able to run the Node app as a UWP background app and use UWP remoting.

[1] https://github.com/pojala/electrino [2] https://www.npmjs.com/package/electron-windows-store