arcbox
Copilot instructions4.3k starsChanged 4 months agoApache-2.0View on GitHub
ArcBox is a pure-Rust, high-performance container and VM runtime targeting macOS (primary) and Linux, aiming to surpass OrbStack's performance metrics. Three-tier structure: Key layers (bottom-up): Communication: Host <-> Guest via vsock and ArcBox protocol crates (arcbox-protocol, arcbox-grpc, arcbox-transport). Docker API compatibility is provided by arcbox-docker (Axum REST server + guest dockerd proxy). macOS specifics: Required for: examples, tests touching hypervisor. See arcbox.entitlements - mode_t types (e.g., libc::S_IFMT) are u16 (Linux: u32). Use u32::from() for cross-platform compatibility - No fallocate -…
- Installs packages
Trending
Quiet since September.thin dataabout the whole repository
Who's talking about arcboxlabs/arcbox
- A Hacker News story“ArcBox: From-Scratch Container Runtime for macOS in Rust (Docker, K8s, MicroVMs)”Hacker News · Jul 20, 2026 · 3 points
- @github-trending-rs.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 arcboxlabs / arcbox ⭐ 3,352 (+360) 🗒 Rust Run AI agents on real …”Bluesky · Sep 6, 2026
- @githubprojects.bsky.social“arcboxlabs/arcbox Agents need powerful system access. Giving them your actual machine is the uncomfortable …”Bluesky · Sep 6, 2026
- @github-trending-rs.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 arcboxlabs / arcbox ⭐ 2,448 (+506) 🗒 Rust Run AI agents on real and …”Bluesky · Sep 2, 2026
- 1Password/for-open-source“Application for ArcBox”GitHub · Apr 18, 2026
The biggest 5 of 6 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 6
Talked about on Bluesky, GitHub and Hacker News (6 times).
On Bluesky · 3
- Sep 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 arcboxlabs / arcbox ⭐ 3,352 (+360) 🗒 Rust Run AI agents on real and isolated machines — own… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Sep 6, 2026arcboxlabs/arcbox Agents need powerful system access. Giving them your actual machine is the uncomfortable part. ArcBox gives agents… — @githubprojects.bsky.social0 likes and reposts · 1 reply
- Sep 2, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 arcboxlabs / arcbox ⭐ 2,448 (+506) 🗒 Rust Run AI agents on real and isolated machines — own kernel,… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
On GitHub · 2
- Apr 18, 2026Application for ArcBox — 1Password/for-open-source0 reactions · 2 comments
- Mar 23, 2026feat: remove daemon plist log paths (companion to arcbox#99) — arcboxlabs/arcbox-desktop0 reactions
On Hacker News · 1
- Jul 20, 2026ArcBox: From-Scratch Container Runtime for macOS in Rust (Docker, K8s, MicroVMs)3 points
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- app/AGENTS.mdAGENTS.md
- common/AGENTS.mdAGENTS.md
- computer/AGENTS.mdAGENTS.md
- engine/AGENTS.mdAGENTS.md
- guest/AGENTS.mdAGENTS.md
- rpc/AGENTS.mdAGENTS.md
- runtime/AGENTS.mdAGENTS.md
- virt/AGENTS.mdAGENTS.md
- xtask/AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 77
All code comments MUST be in English
- Very specific: line 83
Use thiserror for crate-specific errors (FsError, NetError, etc.)
- Very specific: line 84
Use anyhow for application-level error propagation in CLI/API layers
- Very specific: line 94
Every unsafe block requires a safety comment explaining invariants
- Very specific: line 110
Cache alignment: use #[repr(C, align(64))] for hot structures
- Distinctive: line 111
Batch operations: avoid per-descriptor overhead in VirtIO queues
- Very specific: line 158
Test kernel images live under tests/resources/
- Very specific: line 172
When adding files to core directories or guest/, include dual-license headers
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ArcBox AI Agent Instructions
ArcBox is a pure-Rust, high-performance container and VM runtime targeting macOS (primary) and Linux, aiming to surpass OrbStack's performance metrics.
Architecture Overview
Three-tier structure:
- Core layer (
common/,virt/,rpc/,runtime/,app/): MIT/Apache-2.0 licensed foundation - Pro layer (
pro/): BSL-1.1 licensed enhanced features (smart caching, snapshots, advanced networking) - Guest components (
guest/arcbox-agent): Runs inside VMs, cross-compiled to Linux ARM64/x86_64
Key layers (bottom-up):
abctl (CLI)
↓ gRPC over Unix socket
arcbox-daemon
↓
arcbox-core (Runtime)
↓
arcbox-fs / arcbox-net / arcbox-container
↓
arcbox-virtio (VirtIO devices) -> arcbox-vmm (VM monitor)
↓
arcbox-hypervisor / arcbox-vz (platform virtualization)Communication: Host <-> Guest via vsock and ArcBox protocol crates (arcbox-protocol, arcbox-grpc, arcbox-transport). Docker API compatibility is provided by arcbox-docker (Axum REST server + guest dockerd proxy).
Critical Platform Differences
macOS specifics:
- Uses Apple's Virtualization.framework (not KVM)
- All VM-related binaries require code signing:
Required for: examples, tests touching hypervisor. See arcbox.entitlementscodesign --entitlements bundle/arcbox.entitlements --force -s - arcbox-daemon mode_ttypes (e.g.,libc::S_IFMT) areu16(Linux:u32). Useu32::from()for cross-platform compatibility- No
fallocate- useftruncateinstead - xattr APIs have different argument order than Linux
Development Workflows
Building:
cargo build -p <crate> # Dev build specific crate
cargo build --release # Full optimized buildTesting:
cargo test -p <crate>
cargo test -- --nocapture # Show test output
cargo test -- --ignored # Run privileged tests (require VM access)Guest agent cross-compilation:
# Required once:
brew install FiloSottile/musl-cross/musl-cross
rustup target add aarch64-unknown-linux-musl
# Build agent:
cargo build -p arcbox-agent --target aarch64-unknown-linux-musl --releaseProject Conventions
Comments and commits:
- All code comments MUST be in English
- NO
Co-Authored-Bylines in commits - Detailed inline comments expected for complex logic
Error handling:
- Use
thiserrorfor crate-specific errors (FsError,NetError, etc.) - Use
anyhowfor application-level error propagation in CLI/API layers
Async:
- Tokio runtime everywhere (
tokio::main,tokio::spawn) - Performance-critical paths use async I/O where appropriate
Unsafe usage:
- Justified only for FFI (Darwin Virtualization), zero-copy networking, lock-free structures
- Every
unsafeblock requires a safety comment explaining invariants
Performance Philosophy
Targets (vs OrbStack baselines):
| Metric | ArcBox Goal | OrbStack |
| Cold boot | <1.5s | ~2s |
| Hot boot | <500ms | <1s |
| Idle memory | <150MB | ~200MB |
| File I/O | >90% native | 75-95% |
Implementation patterns:
- Zero-copy datapath:
arcbox-netpacket-path code avoids unnecessary copies - Lock-free where it matters: SPSC queue in
virt/arcbox-net/src/datapath/ring.rs - Cache alignment: use
#[repr(C, align(64))]for hot structures - Batch operations: avoid per-descriptor overhead in VirtIO queues
- Negative caching:
arcbox-fscaches missing lookups (seevirt/arcbox-fs/src/cache.rs)
Key Files & Patterns
Runtime singleton (app/arcbox-core/src/runtime.rs):
- Central orchestrator wiring
MachineManager,VmLifecycleManager, container backend, networking, and port-forward state - Shared managers/state are held behind
Arcfor async task coordination
VirtIO device pattern (virt/arcbox-virtio/src/*.rs):
pop_avail()to get descriptor chains from guest- Process I/O (zero-copy where possible)
push_used()to return completed descriptors
Filesystem passthrough (virt/arcbox-fs/src/passthrough.rs):
- Maps guest paths -> host paths via inode/path tables
- Uses platform-specific syscall branches (
#[cfg(target_os = "...")]) - Uses negative caching to avoid repeated misses
Hypervisor abstraction (virt/arcbox-hypervisor/src/traits.rs):
- Core traits:
Hypervisor,VirtualMachine,Vcpu,GuestMemory - Platform implementations in
darwin/(Virtualization.framework) andlinux/(KVM)
Common Pitfalls
- Forgetting to codesign -> "Virtualization not available" errors on macOS
- Using
libc::S_IFMTdirectly -> Works on Linux, fails on macOS (cast tou32first) - Not batching virtqueue operations -> Excessive VM exits hurt performance
- Ignoring cache alignment -> False sharing between CPU cores
- Using
Arc<Mutex<T>>in hot paths -> Prefer lock-free orArc<RwLock<T>>
Debugging & Logging
Tracing levels:
RUST_LOG=debug cargo run ... # All modules
RUST_LOG=arcbox_hypervisor=trace # Module-specific
RUST_BACKTRACE=1 # Enable backtracesTest resources:
- Test kernel images live under
tests/resources/ - Release boot assets (kernel + EROFS rootfs) are built in
arcboxlabs/boot-assets
Documentation References
- Main CLAUDE.md: project overview, architecture, commands
- Crate-level READMEs in
app/,virt/,rpc/,runtime/ - Boot assets ownership and boundaries: docs/boot-assets.md
Licensing & Structure
- Core (
common/,virt/,rpc/,runtime/,app/) + Guest: MIT OR Apache-2.0 - Pro (
pro/): BSL-1.1 - production use requires license after 4 years - Enterprise (separate repos): Proprietary (desktop app, SSO, K8s integration)
- When adding files to core directories or
guest/, include dual-license headers
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

