A server that spawns subprocesses on behalf of other processes
For complicated reasons, spawning subprocesses in Electron applications can block the event loop and impact application responsiveness.
The goal of this repository is to create a lightweight, high-performance server that Electron apps can use to spawn subprocesses on their behalf.
path
, an args
array, and an env
object.stdout
and stderr
back to the client as they become available. When the process terminates, it will send back the exit code.The goal is for the server to be a native executable, have a minimal memory footprint, and be completely event driven so it only consumes a single thread.
Currently, I have a toy example started in Rust that uses the tokio framework for asynchronous I/O. It currently listens on a TCP socket and just runs sh -c echo hello
for every connection, streaming stdout back to the client.