Other Electron for FreeBSD

herrbischoff

Active Member

Reaction score: 73
Messages: 177

GitHub user Guangyuan Yang has successfully built Electron on FreeBSD. As the Electron team has shown no interest in targeting FreeBSD or even including the changes in the official core, this promises to be an alternative way to use applications like Atom, Visual Studio Code and lots of others. It may open the way to create ports for those applications. He's already working on a port:

https://github.com/electron/electron/issues/3797#issuecomment-357095767

While I'm not particularly partial to JavaScript-based desktop applications, they do enable cross-platform availability that would otherwise be harder to achieve.
 

TheRaven

New Member


Messages: 14

That is true herrbischoff, once you've gotten over the non-availability of the baser systems. I think they were trying to recruit a maintainer for the FreeBSD (BSD) port(s) and pickings were slim (like 0 volunteers). It seemed as though they were slightly put off by an underwhelming response as they appear to be pretty tight on man-power right now as it is.
I was excited to see the possibility of electron arriving in the FreeBSD space myself as I would prefer VS Code to many other editing environments, but am in no position to offer assistance myself else I would have.

Sorry bout such a late response, but many thanks for the heads up; I'm fairly interested in the electron migration to FBSD. Take care.
 

sko

Well-Known Member

Reaction score: 226
Messages: 433

Electron is one of those typical "cross platform" frameworks originated on linux: a total dependency hell.
I've tried building it several times during the last ~12 months (to use the ultimatehackingkeyboard config agent) by using the patches from Guangyuan Yang, but usally it's some of the dependencies or their dependencies that fail catastrophically. The whole thing is littered with linuxisms, so even if it would finally build on FreeBSD, I wouldn't use it anywhere near production systems/software. It's just too fragile with all those dependencies of which many are very fast moving targets and break stuff left and rigt, which is one of the main reasons why builds usually fail if you don't have each and every dependency in *exactly* the correct version and patchlevel. Also the general overhead of such a framework/platform is just completely insane - dragging in several hundred MBs just to run some small applications? No thanks...

Don't take this the wrong way; I really appreciate the efforts to get Electron running on FreeBSD, but in general I think such bloated and fragile "cross platform frameworks" are a dead-end and should be extinguished better sooner than later...
 

kpedersen

Daemon

Reaction score: 521
Messages: 1,410

Electron uses node.js underneath, therefore it is pretty much as unportable as you can get!
Node based on Chromium is actually a nightmare to port. The Raptor Computing guys have just about managed to port Chromium to POWER(8?) processors as far as I know and that took quite some work.

If they disabled the JIT, it would be more portable but then a bit too slow for anything useful.
 

drhowarddrfine

Son of Beastie

Reaction score: 1,198
Messages: 3,176

Node based on Chromium is actually a nightmare to port.
Actually it's based on V8, the javascript engine, not the Chromium or Chrome browser. We use it for some projects; mainly for those who use credit card transactions and the CC company only offers that as their interface. It runs well on FreeBSD.
 

kpedersen

Daemon

Reaction score: 521
Messages: 1,410

Actually it's based on V8, the javascript engine, not the Chromium or Chrome browser. We use it for some projects; mainly for those who use credit card transactions and the CC company only offers that as their interface. It runs well on FreeBSD.
Sorry, yeah I meant the Javascript engine from Chromium.
 

shkhln

Aspiring Daemon

Reaction score: 200
Messages: 593

Electron is one of those typical "cross platform" frameworks originated on linux: a total dependency hell.
As I understand it, technically Electron is a patchset for Chromium replacing native v8 with Node.js' v8 version plus random junk thrown in. It has the same dependencies as Chromium + Node.js combined. Building that thing means merging Electron's patchset with FreeBSD Chromium's patchset and fixing compilation errors. That's actually quite easy, if time consuming. The problem is, of course, this job must be redone for each Chromium release.
 

sol289

New Member


Messages: 11

why do you need electron app in first place? it's basically just a web application server and a web browser that opens just this web application in a window without browser controls.

so i have an electron-like app for you, but written in perl on Mojolicious (using Vue in frontend) and with some basic interoperation between inner parts, like starter script, Mojo server, web browser and websocket connection that ties browser process to server and commands server to die when user closes the browser. if you can stand browser controls - it will just open this local web app in your favourite browser (in freebsd I think you will choose surf browser for that), if you want to ship this app, like, for MS Windows, it will cost you some extra installation package size - because you must add chromium browser to package that you can run without browser controls with special command line key (it's sad that firefox doesn't have such command line key, but i think you can hardcode in inner firefox css file to hide these controls - still, even chromium is a little bit fat to just show html and run some JS on it, and firefox is even fatter).

i'm already did two or three different apps on this "platform" for myself, and i'm pretty happy with the result. for now i still didn't publish the code anywhere, not because i'm greedy and want do money from it (it's all open source, how would i even do this? no), but it's WIP. and i don't like githubbing or similar voyeuristic approach to code storage. if somebody interested i will post it somewhere - but where?

p.s.: if surf browser could be compiled for MS windows it would be perfect part of this electron-like app of mine.
 
Top