Repository navigation
Masa v1.1.0 — Masa Danroot
Masa v1.1.0 — Masa Danroot
Build a Mach-O binary on Linux, then run it on Linux — in-process.
Masa is a cross-compilation wrapper and Darwin environment shim: it builds
macOS Mach-O binaries on a non-macOS host without Xcode, and now it can
execute a self-contained one directly, with no VM and no kernel module.
Highlights
masa run/masa danroot— a clean-room, in-process reimplementation
of thedyldsteps a self-contained executable needs: segment mapping,
relocation, alibSystemshim, and theLC_MAINentry call.- Both relocation formats. The loader applies
LC_DYLD_CHAINED_FIXUPS
(clang-19 and newer) and the classicLC_DYLD_INFO_ONLYrebase/bind
opcodes (olderld64.lld, such as the clang-18 on Ubuntu 24.04). A binary
built by either toolchain runs unchanged. - POSIX hosts. Linux and Android/Termux. The loader is architecture
matched: build for the host's architecture.
Everything from earlier milestones is included: the cc/swiftc wrappers,
masa xcode build, masa brew, masa pack (.dmg/.ipa), masa doctor,
masa exec/masa shell, the masa-term GUI terminal, and the toolchain
shims (ld, ar, ranlib, strip, nm, otool, codesign).
Quick start
make
masa sdk init-stub /opt/masa/sdk
MASA_SDK_PATH=/opt/masa/sdk masa cc hello.c -o hello
masa danroot ./helloLicense
GNU General Public License v3.0 or later.