https://github.com/threefoldtech/zinit
A init replacement that feels like runit written in rust+tokio
https://github.com/threefoldtech/zinit
Last synced: about 1 month ago
JSON representation
A init replacement that feels like runit written in rust+tokio
- Host: GitHub
- URL: https://github.com/threefoldtech/zinit
- Owner: threefoldtech
- License: apache-2.0
- Created: 2019-04-23T11:06:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-09T15:39:26.000Z (about 1 month ago)
- Last Synced: 2025-04-09T17:09:52.449Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 339 KB
- Stars: 11
- Watchers: 5
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zinit [](https://github.com/threefoldtech/zinit/actions/workflows/rust.yml)
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](docs) directory:
- [Command Line Interface](docs/readme.md)
- [Implementation Details](docs/implementation.md)
- [API Protocol](docs/protocol.md)## Quick Start
### Installation
```bash
# 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:
```bash
# 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
```bash
# Standard build
make# For development/debug
make dev
```## License
See [LICENSE](LICENSE) file for details.