<- cd ~/andacbasaran.com
$cat ~/notes/zero-vm-native-macos-dev-stacks-rust-swiftui.md 4 min read
2026-12-05 · Developer Note

Zero-VM Native macOS Dev Stacks with Rust, SwiftUI, and APFS

Why running PHP, MySQL, PostgreSQL, and Redis natively via Homebrew cuts idle RAM from 2–4 GB down to 0 MB with <1s cold starts.

On macOS, Docker Desktop spins up a persistent Linux VM that routinely holds 2–6 GB of RAM even while idle. For daily PHP, MySQL, PostgreSQL, Redis, and Mailpit stacks, a full Linux virtualization layer adds memory pressure, battery drain, and bind-mount I/O overhead.

1. Per-Project SSD Isolation Without Repo Pollution

LiteBox orchestrates Homebrew binaries inside isolated directories under ~/.litebox/projects/<project>. Each project gets its own data directory, sockets, logs, and port assignments directly on native APFS — leaving zero litebox.toml or backup files inside your Git repository.

2. Wildcard *.test DNS & Rustls HTTPS

Instead of editing /etc/hosts per project or configuring Traefik by hand, a built-in UDP DNS responder (/etc/resolver/test) pairs with a rustls SNI-aware TLS reverse proxy on port 443. Subdomains like https://myapp.test, https://mail.myapp.test, and https://pma.myapp.test work automatically.

3. Rust Core + Native SwiftUI Menu Bar

Keeping the core CLI in Rust (single-pass /bin/ps telemetry, kqueue log streaming, instant TcpListener port checks) and the desktop UI in native SwiftUI keeps the entire app bundle around ~3 MB and ~20 MB RAM — while exposing a local stdio MCP server (litebox mcp) for AI coding agents.