I’ve been watching the steady development progress on Haiku for some years now. I’m a professional developer with 25 yrs experience and I’d like very much to help the Haiku team alas my free time is inexistent. Some day though…
In the meantime I was wondering if we’ll ever get my favorite IDE ported to Haiku - VisualStudio Code. Is Electron already working on Haiku?
Electron is also not available for Haiku because it needs Chromium,which is not available for Haiku and doesn’t accept upstream patches for any operation systems other than Windows,Linux and macOS.
And the last time I tried,Wine couldn’t run recent Chromium versions,but that was some years ago so it may have changed.
Thanks nipos, that was useful to know. I know next to nothing about Electron but isn’t it based on Node.js? If Node is available for Haiku, does it still need Chromium?
A bunch of apps are based on Electron besides VS Code (Slack is another popular one). Having Electron available would benefit Haiku I think. I agree that this is not high on the priority list but I hope at some point in the future we’ll get there.
Ah, got it, thanks. On a second thought, I think I don’t want Electron on Haiku anyway, what I (and a bunch of other people I assume) like especially about Haiku is how light it is. Chromium is a beast (probably bigger than the whole Haiku) and running one (or multiple) Electron apps/instances would explode the memory/resource requirements.
But I think the higher priority is porting a newer Webkit (2?) To Haiku (at least if this blog post is still relevant).
Is there any significant effort underway in that direction? I’m pondering if I should jump in and help with that…
It might be possible to build another runtime on Haiku which has the Electron API but uses WebKit and other Haiku APIs. I don’t think anyone else has done this on other operating systems since Electron is supported on the three major systems. But people have built alternatives which use different technologies but are kind of the same idea, like Ultralight in C++ or Tauri in Rust.
Or for a lot less work everyone can just use the editors currently available on Haiku.
Even on macOS I decided to switch to Emacs from VSCode and I am pretty happy, though I still use VSCode on Windows.
I am not hung up on VS Code. I do like the editor indeed (I tried picking up Emacs like three times in my life and it never sticked) and I like the source indexer and how “lightweight” it feels compared to Visual Studio. Debugger is also pretty good and I like that I can use VS Code for my main languages I use (C++, Python and Scala). The plugin/extensions ecosystem is nice too.
All that being said I can work with another IDE that is somewhat similar and it’s not “opinionated” and gets out of the way.
It might be possible to build another runtime on Haiku which has the Electron API but uses WebKit and other Haiku APIs.
I thought about the same but I’m not sure how much work that would be. We should keep this idea on the TODO list…
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