Skip to content

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 08 Jun 01:57
· 94 commits to main since this release
c65593e

v0.5.2 is a small feature + security-fix release headlined by forkd's first external contribution.

πŸŽ‰ First external PR β€” @theflashwin

#230 plumbs hugepage-backed memfd snapshots end-to-end β€” Rust MemoryBackend::MemfdShared { use_hugepages: bool }, REST + CLI + Python SDK + TypeScript SDK all carry the flag, a forkd doctor hugepage-pool check, an ENOMEM β†’ normal-page fallback with warning, and a fresh A/B bench harness (bench/live-fork-pause-window/bench-hugepages.py) that interleaves baseline/hugepages iterations for fair numbers.

Unusually complete for a first PR. Welcome aboard, @theflashwin.

What it does

Sandboxes spawned with --live-fork can now back their guest RAM with 2 MiB hugepages (MFD_HUGETLB | MFD_HUGE_2MB) instead of 4 KiB pages, reducing TLB pressure on spawn-many and live-BRANCH bulk-copy. Opt in per spawn:

# CLI
forkd fork --tag my-snapshot --live-fork --hugepages -n 10

# REST
POST /v1/sandboxes  { "snapshot_tag": "my-snapshot", "live_fork": true, "hugepages": true, "n": 10 }

# Python SDK
sandbox = Sandbox.spawn(tag="my-snapshot", live_fork=True, hugepages=True)

# TypeScript SDK
const sb = await client.sandboxes.create({ snapshotTag: "my-snapshot", liveFork: true, hugepages: true });

Pre-flight check: forkd doctor now reports HugePages_Total / HugePages_Free. Reserve pages with echo 512 | sudo tee /proc/sys/vm/nr_hugepages before use.

N=4 spawn numbers from @theflashwin's hardware are in the PR README. N=100 numbers are deferred to #234 β€” fresh dev-host setup needed.

πŸ”’ axum-server 0.7 β†’ 0.8 β€” closes #192

Drops the unmaintained rustls-pemfile dependency flagged by RUSTSEC-2025-0134. The daemon's TLS path now goes through rustls-pki-types directly. Internal-only change; HTTPS bind / cert loading are byte-compatible.

cargo audit on forkd v0.5.2 is now clean (0 advisories). (#232)

πŸ“š Non-AI recipes

recipes/README.md now leads with a "by problem you're solving" table that surfaces CI test parallelization, database fixture forking, and browser farming alongside the AI-agent use case, instead of pitching forkd as AI-only.

New recipe recipes/ci-parallel-pytest ships a complete Python pytest fan-out demo (5 test files, ~30 tests across numpy / pandas / sklearn / regex / stdlib) backed by a forkd snapshot so each worker starts with import numpy etc. already paid for in the parent. Dev-box numbers: ~20 ms per worker batch-spawned vs ~2–3 s per cold container. (#231)

Install / upgrade

# Linux x86_64 binary (forkd + forkd-controller + forkd-uffd-handler)
curl -L https://github.com/deeplethe/forkd/releases/download/v0.5.2/forkd-v0.5.2-x86_64-linux.tar.gz | tar xz

# Python SDK
pip install -U forkd==0.5.2

# TypeScript / Node SDK
npm install @deeplethe/forkd@0.5.2

No breaking changes β€” --hugepages requires --live-fork; everything else is additive. Existing spawn / branch flows work unchanged.

Thanks

  • @theflashwin β€” first external contribution; hugepage memfd path
  • Everyone who filed RUSTSEC-2025-0134 follow-ups (#192)

Full Changelog: v0.5.1...v0.5.2

What's Changed

  • bench(v0.5.1): real-package pip-install chain spawn numbers by @WaylandYang in #228
  • chore(sdk): bump Python + TS SDK versions to 0.5.1 β€” unblock PyPI publish by @WaylandYang in #229
  • recipes: surface non-AI use cases + ship ci-parallel-pytest by @WaylandYang in #231
  • chore(deps): bump axum-server 0.7 β†’ 0.8 β€” closes #192 by @WaylandYang in #232
  • feat(live-fork, memfd): Back Mem Snapshot with Hugepages by @theflashwin in #230
  • release: v0.5.2 β€” hugepage memfd + axum-server 0.8 + non-AI recipes by @WaylandYang in #233
  • fix(docker): include experiments/ in builder so workspace manifest parses by @WaylandYang in #235

New Contributors

Full Changelog: v0.5.1...v0.5.2