Resuming the arm64 macOS port #
Stopped 2026-11-15, by the owner's word. The plan is PLAN.md section 5; its "Where it stands" says the same as this, shorter. Delete this file when the port is done.
Where things are #
main, pushed: steps 1 to 7, each checked before its commit (make docker-check0 failed, 9 skipped;make mac-checkall passing; the fixpoint; x86-64's output unchanged byte for byte).wip-darwin-step9, a branch, pushed to origin (f87c668): step 9 as far as it got, never checked; it was stopped during its lastmake docker-check. It holds:src/bootstrap.sh:make razon the Mac through the container, while no release has a Mac tarball;BOOTnaming a tarball per host,src/boot.shchoosing byuname;make fixpointandmake benchnatively on the Mac;raz runno longer leaving its file in$TMPDIR;make distfor darwin-arm64;- changes to
src/cross.sh,src/fixpoint.sh,src/bench.sh, the Makefile,src/Exe.darwin.raz,src/Host.darwin.raz, CLAUDE.md, PLAN.md anddoc/compiler.md.
- Not started: step 8,
make checknatively on the Mac (test/'s expectations per target where the Mac differs), and step 10, the release, which waits for the owner's word.
What works on the Mac today (from main) #
src/cross.sh darwin-arm64, run in the container, builds a cross compiler: Linux-hosted, making Mach-O for arm64 macOS.make mac-checkcompiles with it in the container and runs natively: test/mac, all of conform/run (SystemImport aside: SYSCALL is Linux's), the library's tests and test/libc (ExecveC aside: /proc is Linux's), and lldb stopping at a line (make lldb).HOST=darwin src/cross.sh darwin-arm64stages a native compiler that runs on the Mac:--version, compiling,raz run.
To resume #
- Start Docker Desktop (Rosetta on for amd64);
make docker-image. git checkout wip-darwin-step9, and readgit diff main.make docker-check: it must end0 failed, 9 skipped.make mac-check: all must pass.- Finish what step 9 lacks (PLAN.md 5's step 9), check
make fixpointandmake benchnatively on the Mac (at least 400,000 lines a second), then merge intomainand push. - Step 8:
make checkwith the native./raz. - Step 10, on the owner's word: v0.26.0, two tarballs,
BOOTper host.
Known limits on the Mac #
- A frame holds at most 16 MB: test/run/ThreadOverflowC doesn't compile.
Thread.Mutexisos_unfair_lock: the thread that locks it unlocks it.Bytesis plain raz there, no NEON.- Under Rosetta, the container skips 9 tests Rosetta breaks (its own
descriptors 3 to 6, its mmap under
ulimit -v, a stack fault's locals); each says why. - The compiler is about 16,700 lines of code of the 18,000 budget.