Comment by lrvick
At Distrust, we wrote a dead simple init system in rust that is used by a few clients in production with security critical enclave use cases.
<500 lines and uses only the rust standard library to make auditing easy.
At Distrust, we wrote a dead simple init system in rust that is used by a few clients in production with security critical enclave use cases.
<500 lines and uses only the rust standard library to make auditing easy.
Yeah we only recently broke it out as a standalone repo/binary, as everyone historically vendored it, so docs will get love soon, but it will be part of the next stagex release built and signed by multiple parties deterministically as stagex/user-nit.
To run it all your need to know is put it in your filesystem as "/init" and then add this to your kernel command line for the binary you want nit to pivot to after bringing the system up:
nit.target=/path/to/binary
That's it. Minimum viable init for single application appliance/embedded linux use cases.
nit and your target binary are the only things you actually need to have in your CPIO root filesystem. Can be empty otherwise.
Likely neat (33% larger than nit), but the readme only explains how to build it, not its interface or functioning.