loom is an open-source runtime primitive service for near-instant container state branching.
It provides first-class APIs for:
snapshotforkcloneresume- lineage, pin/unpin, and operation tracking
This project intentionally keeps one execution architecture end-to-end:
- command contract is strict argv JSON
- no implicit shell wrapping
- snapshot/fork/clone filesystem materialization uses one shared copy primitive
- operation state is persisted in SQLite
loom is runtime-primitive focused. It does not include multi-tenant auth/RBAC/user scoping.
POST /api/containersGET /api/containersGET /api/containers/:idDELETE /api/containers/:idPOST /api/containers/:id/killPOST /api/containers/:id/snapshotPOST /api/containers/:id/forkPOST /api/containers/:id/resumeGET /api/snapshotsGET /api/snapshots/:idDELETE /api/snapshots/:idGET /api/snapshots/:id/lineagePOST /api/snapshots/:id/pinPOST /api/snapshots/:id/unpinPOST /api/snapshots/:id/cloneGET /api/operations/:idGET /health
cargo runBy default:
- HTTP:
127.0.0.1:18090 - data dir:
./data - SQLite DB:
./data/loom.db
Override:
LOOM_HTTP_ADDR=127.0.0.1:18100 LOOM_DATA_DIR=/tmp/loom-data cargo runCreate a fixture rootfs and register a container:
mkdir -p /tmp/loom-fixture/rootfs
echo hello > /tmp/loom-fixture/rootfs/hello.txt
curl -s -X POST http://127.0.0.1:18090/api/containers \
-H 'content-type: application/json' \
-d '{
"name":"demo",
"rootfs_path":"/tmp/loom-fixture/rootfs",
"command":["/bin/sh","-lc","sleep 60"],
"start_immediately":true
}' | jqSnapshot and clone:
curl -s -X POST http://127.0.0.1:18090/api/containers/<container_id>/snapshot \
-H 'content-type: application/json' \
-d '{"consistency_mode":"crash-consistent"}' | jq
curl -s -X POST http://127.0.0.1:18090/api/snapshots/<snapshot_id>/clone \
-H 'content-type: application/json' \
-d '{"resume_policy":"immediate"}' | jqcargo fmt
cargo checktests/e2e_loom.shfozzy run tests/fozzy/loom.guard.fozzy.json --proc-backend host --json
fozzy run tests/fozzy/loom.e2e.fozzy.json --proc-backend host --jsonThe Fozzy scenarios are designed to catch refactor regressions and extraction drift.
Apache-2.0