Nitro: Minimalistic Initialization System Debuts

Leo Neukirchen, the developer behind the Nitro project, has recently published the first public release of the project, which aims to create a minimalist system for initialization with process monitoring capabilities. Nitro is one of the companion packages in the Void Linux distribution and is written in the si programming language. The code is released under the 0BSD license.

Nitro can function as an Init process (pid 1) or as an unenvied process that oversees the continuous execution of applications in the user’s space and restarts tasks in case of failures. The project is compatible with Linux and FreeBSD and can be used with Musl in environments based on standard SIBLITETRAY. It finds applications in various settings, including RAM-Disk images (Initramfs), containers (Docker/Podman/LXC/Kubernetes), workstations, and server systems. Nitroctl, a command-line tool, is provided for managing services and interacting with the Init process.

Instead of complex initial scripts, Nitro employs a model that separates each function into individual scripts. For every service in the /ETC/Nitro hierarchy, subdirectories are created to house Setup scripts (commands executed before service launch), Run scripts (scenarios for service launch), and Finish scripts (commands executed after service completion). To manage logging, symbolic links are used to redirect logs to other services.

One of the key advantages of Nitro, according to its creator, is its unique features compared to other initialization systems:

  • All configuration data is stored in RAM, eliminating the need for disk I/O during operation.
  • The system is event-driven and does not rely on polling for task completion.
  • Memory isolation is not utilized, and all buffers are allocated at launch.
  • File descriptors are used minimally during operation.
  • The system consists of self-contained executable files and utilities for system management.
  • Configuration is handled through simple scripts located in service directories, eliminating the need for configuration compilation stages.
  • Nitro offers service restart functionality in case of failures for individual services.
  • Users can create complex log processing chains spanning multiple services.
  • Nitro supports launching on FreeBSD through /etc/ttys.
  • The system can be compiled into a statically linked executable file using Musl Libc.
/Reports, release notes, official announcements.