A lightweight runtime for Electron sounds like a good idea,but I think it’s complicated.
Electron is really awful,I try to avoid it on every OS and haven’t used any Electron app for over a year I think,but unfortunately this stuff is really popular because it makes it really easy to create one application for every platform (with the cost of OS-integration,native look and feel,good performance,low memory footprint,… but nobody seems to care).
As there’s a huge demand for it,it would be favorable if anyone can make a lightweight runtime,preferably based on HaikuWebKit and dynamically linked to the apps,before anyone steps in and actually ports the whole Chromium bloat and brings huge statically-linked Chromium+Webapp binaries to Haiku.
Electron provides very many custom APIs however,which HaikuWebKit and other webbrowser engines don’t offer and all of those need to be rewritten from scratch to work with HaikuWebKit if you want to make it a drop-in replacement that works without changing anything in the Electron apps.
And I think a drop-in replacement is the only thing that makes sense,because Electron app developers take cross-platform compatibility for granted and won’t care about a custom runtime of a niche OS that they’ve never heard of before.
I already looked at Ultralight before and it won’t work.
You can see big parts of it on Github,but unfortunately their renderer UltralightCore is proprietary as they state in the Readme of the Ultralight repo: https://github.com/ultralight-ux/ultralight#comparison-with-chromium
That means we won’t be able to compile the whole thing for Haiku,except if anyone buys a paid license for 2000 dollars,but then we won’t be allowed to use it for more than one app.
I hoped that Ultralight could be the base for a more modern Webbrowser on Haiku before the QtWebEngine port happened,so I had a deep look into it already,but can’t remember all links that state that it won’t work.
Tauri looks much better as it’s completely open-source and therefore could be compiled on Haiku,but I didn’t know it before and haven’t tried it.
It works with the native web engine on each platform,so it should be possible to integrate it with HaiikuWebKit,but I don’t know how much work that will be.
Also it doesn’t look like a drop-in replacement for Electron but rather an alternative for app developers,which must completely optimize their app for Tauri instead of Electon then (possibly rewriting all custom APIs,but I haven’t looked into the details).
That being said,that’s all a mix of personal opinions and my experience when using Electron ugh and looking into Ultralight.
I have not that much experience with C++ programming and web browsers that I could help in any way with creating the native Electron app runtime