Skip to content

Masa v1.6.1

Choose a tag to compare

@ClausValcaTD ClausValcaTD released this 17 Nov 19:18
· 3 commits to main since this release

Masa v1.6.1 — build, package and run macOS Mach-O binaries on Linux,
Windows and Android, with no Mac, no Xcode and no Apple SDK.

This release rolls up everything since the last published release (v1.2.0):
the Danroot loader matured from "runs a self-contained Mach-O executable" into
a layered Darwin environment that loads dynamic libraries, virtualises the
filesystem, provides CoreFoundation and Objective-C runtimes, bridges Apple
Silicon images on x86_64 hosts, and now opens a real window for a Darwin GUI
program. It also carries the documentation, screenshot and build fixes that
make the distribution archives build cleanly.

Highlights

Danroot Layer 5 — AppKit & CoreGraphics over SDL2 (v1.6.0)

A clean-room AppKit and CoreGraphics built on SDL2. A program that
calls NSApplication/NSWindow through the Objective-C runtime and draws with
CGContextFillRect gets an SDL2 window with those rectangles painted on
screen. The run loop redraws each frame and replays every fill the program made
before entering it, so an app that draws once and then calls [NSApp run]
still shows its content. Built only into build/masa-gui (make gui,
-DMASA_DANROOT_SDL2); the core tool and its tests stay 100% SDL2-free and
report a clear rebuild with make gui hint for the first GUI symbol they
cannot satisfy.

Danroot Layer 4 — cross-architecture bridge (v1.5.0)

Run an arm64-apple-darwin Mach-O image on an x86_64 host: masa run hands
the image to qemu-aarch64 driving a Linux ARM64 build of Masa, with
stack-varargs trampolines that keep a bridged program's formatted output
correct. Both pieces are discovered automatically.

Danroot Layer 3 — CoreFoundation & Objective-C runtimes (v1.4.0)

Clean-room CoreFoundation (CFString, CFArray, allocators) and
Objective-C/Foundation (objc_getClass, sel_registerName, variadic
objc_msgSend, NSLog, autorelease pools). Also fixes arm64 linking by
exporting and shimming __stack_chk_fail / __stack_chk_guard.

Danroot Layer 2 — virtual root and POSIX shims (v1.3.0)

A proot-style virtual root (--root / MASA_DANROOT_ROOT) that maps
/Users, /Applications, /Library, /System and friends under a host
directory, plus Darwin struct stat/struct dirent ABI translation and
mach_absolute_time / mach_timebase_info shims.

Layer 1 — dynamic libraries and the loader core

masa run / masa danroot execute a Mach-O MH_EXECUTE and recursively load
its MH_DYLIB dependencies (load commands, the exports trie as lld encodes it,
@rpath/@executable_path/@loader_path, rebases then binds), all in-process.

Building, packaging and tooling

  • masa cc, masa swiftc, masa sdk init-stub — real Mach-O executables and
    dylibs from clang + LLVM's ld64.lld against a clean-room stub SDK.
  • masa xcode build — build a checked-in .xcodeproj and bundle the .app.
  • masa brew lint / masa brew build — lint a Homebrew formula and build it
    into a Cellar.
  • masa pack --dmg / --ipa — write a UDIF disk image or a
    Payload/<App>.app ZIP from scratch in C11.
  • masa doctor — report whether this host can cross-build Mach-O.
  • masa-term — a standalone SDL2 + libvterm terminal running masa shell on a
    real PTY (screenshot in the README).

Fixes in v1.6.1

  • scripts/dist.sh omitted src/danroot_appkit.c, so the native and Windows
    archives failed to link (dr_gui_* undefined). The distribution archives now
    build.
  • The Android NDK compile test and the Windows cross-compile CI job had the
    same omission; both source lists now include the Danroot runtime units.
  • The GUI test suite no longer reports the 1032-byte session allocation inside
    libdbus-1 (reached through SDL2's D-Bus backend, reproducible with a bare
    SDL2 program) as a leak — scripts/lsan.supp matches only libdbus-1 frames,
    so Masa's own allocations are still checked.

Verified

  • make test — 113 tests, 0 failed, 1 skipped (gcc, ASan).
  • SDL_VIDEODRIVER=dummy make test-gui — 41 tests, 0 failed.
  • make dist — Linux and Windows archives with sha256sum -c SHA256SUMS
    passing; zero compiler warnings.

Assets

  • masa-1.6.1-linux-x86_64.tar.gz / .zip — the masa CLI for Linux x86_64.
  • masa-1.6.1-windows-x86_64.tar.gz / .zip — the masa CLI for Windows x86_64.
  • SHA256SUMS — SHA-256 checksums for every archive above.

Android archives are produced by make dist when ANDROID_CC points at an NDK
clang (the NDK was not present in the release build environment).

These release notes were generated by an AI agent (OpenHands) on behalf of the Masa maintainers.