Skip to content

macOS support (developer machine, distribution, pool node) #66

Closed

Description

@7schmiede

devstack runs on Windows and Linux (ADR-0011). This issue records what macOS would take, from a read of the code (2026-10-17). Not planned yet; an ADR comes first when it is.

The workspace should compile for *-apple-darwin (every Linux-only call is gated; Platform::Macos exists in the stack file model), but several parts compile and then misbehave.

Developer machine (CLI, daemon, hub, requesting remote lanes), about 1.5–2 weeks

  • Process ownership (crates/devstack-proc/src/unix.rs): everything reads /proc, so on macOS process lists are empty: stop() never escalates to SIGKILL, the shim does not notice the daemon dying (no PR_SET_PDEATHSIG), restart cleanup finds no orphans (ports stay taken), usage is all zero. macOS backend via libproc (proc_listpids by process group, proc_pidinfo for group/start time/CPU/RSS, Mach time units scaled with mach_timebase_info), parent death by polling getppid() in the shim. Tests in crates/devstack-proc/tests/ need a macOS path. M
  • Machine metrics (devstack-proc memory_total, memory_available, cpu_times return None): the lane memory check never refuses, sharing offers 0. sysctl hw.memsize, host_statistics64(HOST_VM_INFO64), host_statistics(HOST_CPU_LOAD_INFO). S
  • Build job usage without cgroups (builds.rs): reuse the libproc walk. S
  • Hub autostart: a LaunchAgent plist (launchctl bootstrap gui/$UID), not XDG autostart; doctor must not report the Linux integration as present. S–M
  • devstack:// link: macOS delivers URLs as Apple Events to an app bundle; a small applet (osacompile, CFBundleURLTypes, lsregister) or a signed stub app that runs devstack open-url. M
  • Folder picker (crates/devstack-hub/src/dialog.rs): osascript … choose folder (no AppKit from the hub's worker threads). S
  • Docker start (crates/devstack-compose/src/engine.rs): open -g -a Docker (optionally OrbStack, Colima), hints and doctor. S
  • Browser (hubcmd.rs): open <url>, open -a "Google Chrome" for --browser. S
  • devstack update (update.rs): pick the darwin asset per target. S
  • self uninstall: leave a Homebrew install to brew uninstall; remove LaunchAgent and the link app. S
  • File watching (watch.rs): FSEvents reports real paths; canonicalize the repository path (/tmp → /private/tmp, symlinked project folders). S
  • Port probe (supervisor.rs): with BSD socket semantics a bind on 127.0.0.1 can succeed while something holds *:port; verify, add a connect probe. S
  • Local Network privacy (macOS 15): a hub started by launchd may be blocked from reaching a pool on the LAN unless signed; test early.

Release and distribution, about 1–2 days

  • release.yml: aarch64-apple-darwin and x86_64-apple-darwin on a macos-14 runner (MACOSX_DEPLOYMENT_TARGET=11.0), two tarballs; the publish pattern must take aarch64-*.
  • CI: macos-14 in the check matrix.
  • install.sh: Darwin-arm64 / Darwin-x86_64 (prefer arm64 under Rosetta), shasum -a 256 fallback, portable grep.
  • Homebrew: own tap nuetzliches/homebrew-tap, a formula (not a cask) with on_arm/on_intel and service do … ["devstack", "hub"] (brew services), bumped by the release job.
  • README and landing page (OS tabs, asset map).
  • Optional, recommended: Developer ID signing and notarization in CI (firewall and Local Network grants survive updates; covers the link app).

macOS as a pool node, another 3–5 days

  • Honour DEVSTACK_LANE_BIN on every OS (today linux_binary() returns None before looking).
  • Supply a Linux binary for Docker's architecture (docker info → arm64 under Apple Silicon): a new release asset aarch64-unknown-linux-musl (also enables arm64 Linux nodes), downloaded and checked against SHA256SUMS by the agent.
  • Egress rules under Docker Desktop: iptables in the VM via the --net=host helper should apply; verify, including traffic to the Mac itself.
  • Lane container user (own_user() reads /proc): getuid/getgid.
  • Running the agent: a LaunchAgent (Docker Desktop is per user), keeping the Mac awake while it holds leases.

Activity

  1. offline-first commented on Oct 22, 2026

    @offline-first
    Contributor

    I find this project really interesting, and macOS support could make it a good fit for my workflow.
    My setup combines a Dart service in Docker, a Nuxt frontend, and Firebase emulators. I also work with coding agents in parallel Git worktrees, so the isolated lanes and MCP integration caught my attention.
    I’d love to try an early macOS version and see how it works with that setup. Support for local development would already be an interesting starting point.
    Thanks for documenting the remaining work so clearly. Just wanted to share a potential use case and encourage you to explore macOS support!

  2. 7schmiede commented on Oct 22, 2026

    @7schmiede
    MemberAuthor

    Thanks a lot for describing your setup. A Dart service in Docker, a Nuxt dev server and the Firebase emulators, worked on by agents in parallel worktrees, is exactly the kind of stack devstack is meant for, and it's useful to know someone would try it on macOS.

    We're going to start with a preview for local development only: CLI, daemon and dashboard on one Mac, no pool, no autostart, no devstack:// links yet. One honest caveat: none of the maintainers has a Mac. The preview will be covered by CI on macOS runners, but anything involving Docker Desktop and the desktop itself can only be checked by someone like you. So we'd ship it with a short checklist of things to try and would rely on your reports.

    A few questions that would help us plan:

    1. Apple Silicon or Intel, and which macOS version?
    2. Docker Desktop, OrbStack or Colima?
    3. How do you run the Firebase emulators today? From firebase.json with fixed ports, or with ports passed in? Lanes give each worktree its own ports, and emulator ports that live in a config file are a case we want to get right.
    4. Would you be up for testing a pre-release build when it's ready?

    We'll link the design record and the preview release here.

  3. 7schmiede commented on Oct 23, 2026

    @7schmiede
    MemberAuthor

    The macOS preview is out with devstack 0.20.0:

    brew install nuetzliches/tap/devstack
    # or: curl -fsSL https://github.com/nuetzliches/devstack/releases/latest/download/install.sh | sh

    Apple Silicon and Intel, macOS 11 or later, with Docker Desktop, OrbStack or Colima. It ended up a bit wider than announced: the hub also starts at login (a LaunchAgent), and the dashboard's folder picker and "Open in" (Finder, Terminal, your editor) work. Desktop notifications and the devstack:// link are not there yet, and neither is a Mac as a pool node. The design record is ADR-0054.

    Since none of us has a Mac, CI on macOS runners covers process handling, file watching and the daemon's integration test, but nothing with Docker or the desktop. docs/macos.md has a short checklist of what only a real Mac can show. Any of it you get to, working or not, helps a lot. Partial reports are welcome; a new issue per problem is easiest for us.

    If you try it with your stack: we'd still like to hear how the Firebase emulators take their ports (from firebase.json or passed in). That decides how a lane per worktree can give each its own.

  4. offline-first commented on Oct 23, 2026

    @offline-first
    Contributor

    Wow, that was fast! Thanks for getting the macOS preview out so quickly 🙌

    I tried devstack 0.20.0 on Apple Silicon with macOS 26.7.1 and Docker Desktop (Engine 29.2.1, Compose 5.0.2), starting with a single containerized HTTP service.

    The local workflow worked well:

    • check --compose and doctor passed, and a fresh arm64 Docker build started successfully.
    • HTTP health checks and endpoint requests passed; the paired dashboard showed the container as healthy with nonzero memory usage.
    • Container restart worked, and a second Git worktree ran in its own Compose project on a separate port alongside the main tree.
    • Promoting the lane to the main port and switching back worked. The main port kept answering through the lane even while the original container was stopped.
    • Stopping the lane and running down --infra cleaned up the test containers and released their ports after shutdown.

    One thing I noticed: with this Compose-only stack, devstack up returned success while the image was still building. I checked container health and HTTP separately before treating it as ready.

    I haven't tested login integration or remote pools yet, but this is a very encouraging first result on a real Mac. Thanks again!

  5. 7schmiede commented on Oct 28, 2026

    @7schmiede
    MemberAuthor

    Thanks again for the thorough test on 0.20.0. A short update, as of 0.27.1:

    • Menu bar icon (0.21.0): the tray client shows the hub's stacks and opens the dashboard.
    • Memory check against Docker Desktop's VM (0.26.0): a lane's containers are checked against what is free in the VM, not on the host, so a lane that does not fit is refused instead of hanging the engine.
    • Pool connections: the Invalid argument (os error 22) seen on macOS when the connection to a coordinator broke is retried now.
    • Faster starts (0.27.1): services build while the containers start, and independent services and Compose groups start side by side.
    • Your Compose-only finding: devstack up waited for devstack's services only, so a stack of Compose groups alone returned while its image was still building. It now waits until every container runs (healthy, where it has a health check), or fails naming the ones that did not get there (fix(cli): devstack up waits for the containers too (#66) #344). This is on main and ships with the next release.

    Still not on macOS: the devstack:// link, the dashboard opening in an installed browser app, and a Mac as a pool node. The preview's status is in ADR-0054.

    I'm closing this as the preview is out; anything you run into, please open a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions