Skip to content

Masa v1.1.0 — Masa Danroot

Choose a tag to compare

@ClausValcaTD ClausValcaTD released this 16 Nov 21:15
· 14 commits to main since this release

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 the dyld steps a self-contained executable needs: segment mapping,
    relocation, a libSystem shim, and the LC_MAIN entry call.
  • Both relocation formats. The loader applies LC_DYLD_CHAINED_FIXUPS
    (clang-19 and newer) and the classic LC_DYLD_INFO_ONLY rebase/bind
    opcodes (older ld64.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 ./hello

License

GNU General Public License v3.0 or later.