Skip to content

A init replacement that feels like runit written in rust+tokio

License

Notifications You must be signed in to change notification settings

threefoldtech/zinit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zinit Rust

A lightweight PID 1 replacement inspired by runit, written in Rust using Tokio for async I/O.

Overview

Zinit is a service manager designed to be simple, lightweight, and reliable for both system services and container environments. It acts as an init system (PID 1) but focuses only on essential service management functionality.

Key Features

  • Service Management: Ensures configured services are up and running at all times
  • Dependency Handling: Supports service dependencies for proper startup ordering
  • Simple Control Interface: Provides an intuitive CLI to add, start, stop, and monitor services
  • Container Support: Can run in container mode with appropriate signal handling
  • Configurable Logging: Multiple logging options including ringbuffer and stdout

Documentation

Comprehensive documentation is available in the docs directory:

Quick Start

Installation

# Build from source
make

# Install the binary
sudo cp target/x86_64-unknown-linux-musl/release/zinit /usr/local/bin/

Testing with Docker

To quickly try zinit in a container environment:

# Build the test docker image
make docker

# Run the container
docker run -dt --device=/dev/kmsg:/dev/kmsg:rw zinit

The test image automatically starts Redis and OpenSSH services.

Building from Source

Requirements

  • Rust (cargo) - version 1.46.0 or later
  • musl and musl-tools packages
  • GNU Make

Build Instructions

# Standard build
make

# For development/debug
make dev

License

See LICENSE file for details.

About

A init replacement that feels like runit written in rust+tokio

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages