This devcontainer configuration provides a complete development environment for all OpenWorkers repositories.
- Multi-repo workspace - All OpenWorkers repos cloned automatically
- Persistent caching - Cargo registry, build artifacts, and rusty_v8 cached across rebuilds
- Pre-installed tools - Rust, Bun, Docker, GitHub CLI
- Fast startup - ~5 min first time, ~1 min after (thanks to caching)
- Go to https://github.com/openworkers
- Click "Code" → "Codespaces" → "New codespace"
- Select the repository you want to work on
- The devcontainer will auto-setup all repos
- Install "GitHub Codespaces" extension
- Open Command Palette (Cmd+Shift+P)
- Run "Codespaces: Create New Codespace"
- Select any OpenWorkers repo
gh codespace create --repo openworkers/openworkers-runnerThe following directories are stored in Docker volumes and persist across Codespace rebuilds:
- Cargo registry (
~/.cargo/registry) - ~500MB, saves 2-3 min - Build artifacts (
/workspaces/target) - ~2GB, saves 10+ min - rusty_v8 (
/workspaces/rusty_v8) - ~3GB with submodules, saves 20+ min
The setup-workspace.sh script automatically:
- Installs Bun
- Configures Rust toolchain
- Installs V8 build dependencies (ninja, clang, etc.)
- Clones rusty_v8 fork (if not cached)
- Clones workerd reference (if not cached)
- Clones all OpenWorkers repos
- Configures git safe directories
/workspaces/
├── openworkers-runner/
├── openworkers-runtime-v8/
├── openworkers-api/
├── openworkers-cli/
├── openworkers-core/
├── openworkers-dash/
├── openworkers-scheduler/
├── openworkers-schema/
├── rusty_v8/ # Cached, with submodules
└── workerd/ # Reference implementation
# Build runner
cd /workspaces/openworkers-runner
cargo build --features v8
# Generate snapshot
cargo run --features v8 --bin snapshot
# Run tests
cargo test --features v8
# Start services
docker-compose up -d- 2-core, 4GB RAM - OK for editing, slow builds
- 4-core, 8GB RAM - Good for development ✅ (recommended)
- 8-core, 16GB RAM - Fast builds, can compile rusty_v8
To minimize costs:
- Stop Codespace when not using - Free while stopped
- Delete unused Codespaces - Keeps your 60h/month quota
- Use persistent volumes - Faster restart = less runtime
# Clean cargo cache
cargo clean
rm -rf ~/.cargo/registry/cache
# Clean Docker
docker system prune -aDelete the Codespace and create a new one. Volumes will be recreated.
The setup script clones to a persistent volume. First time takes ~10-15 min on GitHub's fast network, then it's cached forever.