Skip to content

Add macOS support specification and implementation roadmap#2

Merged
aljoscha merged 4 commits into
mainfrom
claude/macos-support-liUa1
Mar 8, 2026
Merged

Add macOS support specification and implementation roadmap#2
aljoscha merged 4 commits into
mainfrom
claude/macos-support-liUa1

Conversation

@aljoscha
Copy link
Copy Markdown
Owner

@aljoscha aljoscha commented Mar 8, 2026

Summary

This PR introduces comprehensive design documentation and implementation roadmap for macOS support in ember. Rather than porting Linux-specific tools (Firecracker, ZFS, iptables), the design leverages native macOS frameworks and tools to provide an identical CLI experience.

Key Changes

  • MACOS-SPEC.md: Complete technical specification for macOS support covering:

    • Component mapping from Linux subsystems to macOS equivalents (Firecracker → Apple Virtualization Framework, ZFS → APFS clones, TAP/iptables → vmnet)
    • Architecture of ember-vz, a Swift helper binary that shells out to AVF (matching ember's philosophy of using platform tools)
    • Storage design using APFS copy-on-write clones for instant VM creation and snapshots
    • Networking via vmnet shared mode (built-in NAT/DHCP, no root required)
    • Storage efficiency diagnostics to verify CoW is working despite APFS's opaque space reporting
    • Code architecture with backend traits for platform-specific implementations
  • MACOS-TODO.md: Phased implementation roadmap with 7 phases:

    • Phase 0: Extract backend traits (Linux-only, no behavior change)
    • Phases 1-6: Implement macOS-specific backends (AVF, APFS, vmnet) and integration
    • Phase 7: CI integration and Homebrew distribution
  • Updated CLAUDE.md: Clarified project scope (Linux + macOS), added macOS-specific guidance, updated architecture overview to reference both SPEC.md and MACOS-SPEC.md

  • Updated PROMPT.md: Redirected to MACOS-TODO.md as the current task list

Notable Design Decisions

  • No root required on macOS: Unlike Linux (TAP, iptables, ZFS all need root), the macOS backend runs entirely unprivileged
  • Native tools only: Uses Apple Virtualization.framework, vmnet, APFS, and Homebrew packages rather than porting Linux tools
  • Shell-out architecture: ember-vz (Swift CLI) handles AVF complexity, matching ember's existing pattern of shelling out to zfs, iptables, etc.
  • APFS clone efficiency verification: Includes ember debug storage-efficiency command and timing-based sanity checks since APFS doesn't expose per-file CoW savings like ZFS does
  • Compile-time platform selection: Backend traits use #[cfg(target_os)] for clean separation without runtime overhead

https://claude.ai/code/session_01KZHZYm4XHXuZYeFq8jWnrK

claude added 4 commits March 8, 2026 06:54
Design for running ember on macOS using Apple Virtualization Framework
(instead of Firecracker), APFS clones (instead of ZFS), and vmnet shared
mode (instead of TAP+iptables). Includes backend trait architecture for
compile-time platform selection and a phased implementation plan.

https://claude.ai/code/session_01KZHZYm4XHXuZYeFq8jWnrK
Add a spec section and TODO items for verifying that APFS copy-on-write
actually saves space (since du/Finder report clones at full size). Includes:
- `ember debug storage-efficiency` command (logical vs actual disk usage)
- APFS volume validation during `ember init`
- `cp -c` failure detection with clear error messages
- Timing-based sanity check on clone operations

https://claude.ai/code/session_01KZHZYm4XHXuZYeFq8jWnrK
Point at MACOS-SPEC.md and MACOS-TODO.md as the current focus. Update
architecture section with backend trait structure and platform annotations.

https://claude.ai/code/session_01KZHZYm4XHXuZYeFq8jWnrK
@aljoscha aljoscha merged commit 2d11892 into main Mar 8, 2026
1 check passed
@aljoscha aljoscha deleted the claude/macos-support-liUa1 branch March 8, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants