Hacker News new | ask | show | jobs
by LockAndLol 2045 days ago
The latter would be better, imo.

Chromium won because it introduced a sane API before Mozilla's Gecko. That's why you see so many Electron apps. Seriously, we don't need to wrap a whole browser. Just the engine and a debugger would've been fine.

The engine could be distributed as a lib and other frameworks could just bind it. Apps could be distributed without an 150MB behemoth just to have a chat client.

Making the engine also mobile compatible would mean Android and iOS could maybe have the same base. I also look forward to what this means for Linux phones. Custom browsers could be written for those that don't have to use WebKit or try to launch Chromium or Firefox on a mobile device.

Not only for mobile devices, but also displaying things in VR can be made significantly easier if you don't have to write all the UI yourself. Give it an opengl rectangular surface (or vulkan?) and you can then use web technologies to make UIs in VR.

All in all, I'm very for an engine. It would definitely allow a competitor with a good name to enter the market. Developer should be able to reach for something else than WebKit because nobody in their right mind is going to reach for Gecko.

2 comments

> That's why you see so many Electron apps. Seriously, we don't need to wrap a whole browser

Actually, Electron wraps an entire browser, except for its UI part.

I'm not sure what you mean by 'an engine', but people who choose Electron typically don't want a rendering engine like Servo, they want to write a web app and have it installed locally. They need a rendering engine, a JS runtime, a DOM handler, an HTTP client library, WebSockets support etc - they want a whole browser.

Also, 150MB is not really that scary of a size in today's world. Also, a huge part of it is simply because of static linking - if they split it into dynamic libraries, the actual content of any individual Electron-based app would be reduced significantly. But people are mostly allergic to dynamic libraries, so we pay the cost in larger binaries. Also note that vim with all its dependencies is ~40 MB, without a GUI.

> Also note that vim with all its dependencies is ~40 MB, without a GUI

That's mostly just due to vim-runtime though, and the documentation in many different languages. The actual vim executable is around 3 MB.

Can the vim executable run without vim-runtime, or the other shared libaries it installz? I don't know the internal architecture of vim, I am genuinely asking.
> Also, 150MB is not really that scary of a size in today's world

That very much depends on where you live.

To be honest, a lot of people really do just want a layout engine.