News for hackers. Stuff that matters.
Re:NeutralinoJS: Lightweight Electron alternative using nati... by antoineMoPa on Wednesday February 26, 2020 @09:35AM (#22423217)
So if I understand right, what makes this lighter than electron is the fact that only webkit2 is used instead of embedding the whole chromium app.
Re:NeutralinoJS: Lightweight Electron alternative using nati... by pcr910303 on Wednesday February 26, 2020 @09:54AM (#22423412)
Looks like it's using system controls on macOS, Windows and dynamically linking to webkit on Linux for rendering the served HTML/CSS/JS (from node).

I see mentions of WKWebView(the system webkit) in the code[0], and while I don't know any Windows programming, they are #including <mshtml.h>[1] - looks like a system included web view (presumably the one that edge was based on). The linux build requires libwebkit2gtk-4.0-dev to be installed[2] - they're dynamically linked to webkit2gtk.

[0] https://github.com/neutralinojs/neutralinojs/blob/b10e065c97...

[1] https://github.com/neutralinojs/neutralinojs/blob/07fdc3c1c7...

[2] https://github.com/neutralinojs/neutralinojs/blob/master/REA...

Re:NeutralinoJS: Lightweight Electron alternative using nati... by antoineMoPa on Wednesday February 26, 2020 @10:00AM (#22423477)
I think you are right except when you say that the HTML/CSS/JS is served from node. The website says it is not served from node which makes it lighter than alternatives.

Developing an app requires node, but it will not be needed at runtime if I get this right.

Re:NeutralinoJS: Lightweight Electron alternative using nati... by jonmaim on Wednesday February 26, 2020 @09:50AM (#22423367)
Indeed I think they don't ship the whole browser package.

What they might actually do is to locally launch a HTTP server which renders the app if you call it on any browser (localhost:8080 in the examples). The chrome of the app is actually a thin layer that use the default OS web browser. That is why the memory footprint is much less higher that alternatives like electron.

Re:NeutralinoJS: Lightweight Electron alternative using nati... by jacobush on Wednesday February 26, 2020 @09:37AM (#22423236)
I don't understand, it seems like it runs in any browser? Are they using webkit2 as a replacement for node and the system browser for the GUI?
Re:NeutralinoJS: Lightweight Electron alternative using nati... by antoineMoPa on Wednesday February 26, 2020 @09:46AM (#22423321)
It seems to me that the Javascript runs in the client.

The Javascript side calls the system via the local network, passing through this router: https://github.com/neutralinojs/neutralinojs/blob/master/cor...

I hope that there is some form of authentication to make sure no random web apps are accessing the API.

Re:NeutralinoJS: Lightweight Electron alternative using nati... by hellofunk on Wednesday February 26, 2020 @09:39AM (#22423249)
I agree that they really need to explain this better on their site somewhere.
Re:NeutralinoJS: Lightweight Electron alternative using nati... by ASalazarMX on Wednesday February 26, 2020 @11:17AM (#22424319)
I guess it needs only 400 Mb of RAM instead of 500 then.