8000 gondolin/guest at ctrl-c · geminixiang/gondolin · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

guest

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Gondolin Guest Sandbox

This directory contains the guest-side components for the Gondolin sandbox: the Zig sandboxd supervisor and the Alpine initramfs image builder.

What it does

  • Builds sandboxd, a tiny supervisor that listens on a virtio-serial port for exec requests, spawns processes inside the guest, and streams stdout/stderr/stdin over the wire.
  • Assembles a minimal Alpine initramfs with sandboxd, an init script, and optional packages for networking and certificates.

Layout

  • src/sandboxd/ — Zig sources for sandboxd and exec RPC handling.
  • src/sandboxfs/ — Zig sources for the FUSE filesystem daemon.
  • src/shared/ — Shared CBOR/protocol/RPC helpers.
  • image/ — initramfs build scripts and the minimal /init.
  • build.zig — Zig build definition for sandboxd.
  • Makefile — helpers to build and create images.

Requirements

macOS Linux (Debian/Ubuntu)
brew install zig lz4 e2fsprogs sudo apt install zig lz4 cpio curl e2fsprogs

The make build target invokes the shared gondolin build pipeline through the host CLI. Make sure host Node dependencies are installed (e.g., pnpm install at the repo root or pnpm -C host install).

Common tasks

Mandatory build command (builds kernel, initramfs, and rootfs without booting):

make build

Build sandboxd only:

make build-bins

Build guest assets using a custom build config:

make build GONDOLIN_BUILD_CONFIG=../build-config.json

make build invokes the shared gondolin build pipeline and will produce all assets in image/out/.

Boot the guest in a VM (builds assets if needed):

npx @earendil-works/gondolin bash

The host manages the full QEMU lifecycle automatically.

0