// WHAT IS ZYPI?
Zypi is a simple container runtime written in Elixir for Firecracker microVMs. It provides a lightweight, fast way to run containers inside isolated virtual machines with sub-second boot times. It's basically borken except for the happiest path.
Key Features:
- Sub-second VM boot times (<125ms)
- Copy-on-Write (CoW) snapshots
- SSH shell access to containers
- Docker image support
- RESTful API for VM management
- Built on BEAM/OTP for reliability ( in the hopes one day maybe zypi can be reliable )
// FIRECRACKER microVMs
Firecracker is a virtual machine monitor (VMM) developed by AWS. It uses Linux KVM to create lightweight microVMs.
| Spec | Value |
|---|---|
| Boot Time | <125 ms |
| Memory Footprint | <5 MiB per VM |
| Devices | virtio-net, virtio-block, virtio-vsock |
| Language | Rust |
| Used By | AWS Lambda, AWS Fargate |
Why Firecracker?
Traditional VMs are too slow. Containers lack isolation. Firecracker gives you VM-level security with container-like speed. Each workload gets its own kernel without the overhead of full virtualization.
// ELIXIR + BEAM + OTP
Zypi leverages the battle-tested Erlang ecosystem:
BEAM Virtual Machine
- Lightweight processes (millions per VM)
- Preemptive scheduling across cores
- Per-process garbage collection
- Hot code swapping
- Fault isolation between processes
OTP Framework
- Supervisor trees for fault tolerance
- GenServer for stateful processes
- Built-in distribution primitives
- Let it crash philosophy
"Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang."
- Robert Virding's First Rule
// QUICK START
# Clone the repository
git clone https://github.com/allen-munsch/zypi.git
cd zypi
# Load kernel modules
sudo modprobe target_core_user
sudo modprobe tcm_loop
# Build and run with Docker Compose
docker compose build
docker compose up
# Source the CLI helper
source tools/zypi-cli.sh
# Build, push, and start
./build_push_start.sh
// CLI COMMANDS
| Command | Description |
|---|---|
zypi push <image:tag> | Push Docker image to Zypi |
zypi images | List available images |
zypi create <id> <image> | Create container |
zypi start <id> | Start container (launches VM) |
zypi stop <id> | Stop container |
zypi destroy <id> | Destroy container |
zypi run <id> <image> | Create and start |
zypi list | List containers |
zypi status <id> | Container status |
zypi inspect <id> | Container details |
zypi shell <id> | SSH into container |
// ARCHITECTURE
+------------------+
| zypi CLI | <-- Shell commands
+--------+---------+
|
v
+------------------+
| Elixir/OTP | <-- BEAM processes manage lifecycle
| Supervisors |
+--------+---------+
|
v
+------------------+
| Firecracker | <-- VMM creates microVMs
| VMM (Rust) |
+--------+---------+
|
v
+------------------+
| microVM | <-- Isolated VM with container
| (Linux guest) |
| +------------+ |
| | Container | |
| +------------+ |
+------------------+
Project Structure:
- /config - Configuration files
- /docs - Documentation + demo GIF
- /hello-zippy - Example app (Python)
- /hello-zypgo - Example app (Go)
- /hello-zypi - Example app
- /lib/zypi - Core Elixir library
- /tools - CLI and utilities