HeadlinesBriefing favicon HeadlinesBriefing.com

Kakehashi: macOS Translation Layer for Linux ARM64

Hacker News •
×

Kakehashi is a userspace macOS translation layer that loads Darwin Mach‑O binaries on Linux aarch64, maps a freestanding lib System, translates BSD syscalls, and runs real guests such as clang probes, 7‑Zip 7zz, curl, and threads. It works on bare‑metal, VMs, Colima, Docker, and UTM, and can be inspected dry‑loaded on any host, including macOS.

Installation is simple: cargo install Kakehashi, or cargo install --path crates/kh-cli --forcekh, then ensurekh, install 7‑Zip or curl, and run commands like kh run 7zz -- a demo.7z or kh run curl -- -s S -o .tmp/kh-out/body http://example.com/. The bottle layout uses ~/.local/share/kakehashi/bottle/ and supports host‑root bridges via /Volumes/linux/.

Performance tests show a ~×5 slowdown for multi‑file 7zz archives on Ubuntu aarch64, dominated by syscall boundaries rather than LZMA inefficiency. However, CI cost benefits are clear: Linux arm64 runners cost $0.005 per minute versus $0.062 for macOS 3–4‑core runners, making a ×5 slower job still cheaper overall.

The project remains a proof‑of‑concept, not a product claim, but provides full curl feature set, Apple Security.framework, git support, and Docker helpers for smoke testing. Maintainers can refresh the embedded dylib after ABI changes and run cargo test, clippy, and Docker smoke scripts for verification.