4 ms·
I know - given enough time and money, I'd make a CLI app using something like ncurses. Unfortunately though, the reality is that I just don't have the resources
by rolleiflex 8y ago
I know - given enough time and money, I'd make a CLI app using something like ncurses. Unfortunately though, the reality is that I just don't have the resources.
The backend is its own process, you could definitely find the binary in the application package and run it on its own — it's not bound to Electron in any other way. Electron is just the client, the frontend graph compiler, and the backend are two separate binaries that communicate with each other over gRPC. That means you could run any of these independently, as well. [0] The client is Electron, but nothing except the UI happens in JS, everything happens in the frontend and the backend, and they're both tiny, fast, native-compiled Go apps. My backend, for example, is 4.8mb, frontend I think is 6mb. The rest of the size of the app (70mb) is just Electron, its dependencies, and the whole enchilada that comes with it. I'm not happy about it either.
For better or worse, though, since the JS part of the app is nothing but its 'skin', it's as memory efficient as Electron apps get. No real processing happens in JS, it's all Go.
[0] That said, it's not something I support right now, because if you ran the backend separately and then started the app, you'd effectively be running two backends. There is not yet a way to tell the app package that it should connect to an existing backend running locally instead of starting one.
- fbender 8y agoHow about providing a WebExtension that exposes the bits that require a binary (e.g. P2P and possibly proof-of-work part if WASM does not work for you) or are provided by the platform, then you can waive the Electron requirement for those who do not want it, plus your web interface potentially works the same for read-only visitors and users (who have the web extension installed). You can also include the frontend bits in the WebExtension so no one relies on the website working anymore.