News for hackers. Stuff that matters.
Re:Show HN: Electrico – Electron Without Node and Chrome (Ru... by killcoder on Tuesday September 17, 2024 @08:04AM (#41566775)
You were correct. Electron lets you expose specific NodeJS APIs via the preload script or everything via the ‘nodeIntegration’ setting:

https://www.electronjs.org/docs/latest/api/structures/web-pr...

Separately the IPC lets you do zero copy in some circumstances via Transferable objects such as ArrayBuffers. Structured cloning is efficient but not zero copy, and json serialisation shouldn’t be used (since structured cloning is easily available).

Re:Show HN: Electrico – Electron Without Node and Chrome (Ru... by __jonas on Tuesday September 17, 2024 @08:44AM (#41567068)
Thanks for adding this context! Guess I was mislead by the Electron documentation talking about multiple processes and IPC, appreciate the clarification!