raz / commit cbe3353c

commit
cbe3353c522886fb76ad24ec2f7741e052873111
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
4b57350f
RESUME-darwin.md: how to pick the arm64 macOS port up again

patch · log

1 file changed, +59 -0

RESUME-darwin.md (history) added +59 -0

@@ -0,0 +1,59 @@
1+# Resuming the arm64 macOS port
2+
3+Stopped 2026-11-15, by the owner's word. The plan is PLAN.md section 5;
4+its "Where it stands" says the same as this, shorter. Delete this file
5+when the port is done.
6+
7+## Where things are
8+
9+- **`main`**, pushed: steps 1 to 7, each checked before its commit
10+ (`make docker-check` 0 failed, 9 skipped; `make mac-check` all
11+ passing; the fixpoint; x86-64's output unchanged byte for byte).
12+- **`wip-darwin-step9`**, a local branch, not pushed (f87c668): step 9
13+ as far as it got, never checked; it was stopped during its last
14+ `make docker-check`. It holds:
15+ - `src/bootstrap.sh`: `make raz` on the Mac through the container,
16+ while no release has a Mac tarball;
17+ - `BOOT` naming a tarball per host, `src/boot.sh` choosing by `uname`;
18+ - `make fixpoint` and `make bench` natively on the Mac;
19+ - `raz run` no longer leaving its file in `$TMPDIR`;
20+ - `make dist` for darwin-arm64;
21+ - changes to `src/cross.sh`, `src/fixpoint.sh`, `src/bench.sh`, the
22+ Makefile, `src/Exe.darwin.raz`, `src/Host.darwin.raz`, CLAUDE.md,
23+ PLAN.md and `doc/compiler.md`.
24+- **Not started:** step 8, `make check` natively on the Mac (`test/`'s
25+ expectations per target where the Mac differs), and step 10, the
26+ release, which waits for the owner's word.
27+
28+## What works on the Mac today (from `main`)
29+
30+- `src/cross.sh darwin-arm64`, run in the container, builds a cross
31+ compiler: Linux-hosted, making Mach-O for arm64 macOS.
32+- `make mac-check` compiles with it in the container and runs natively:
33+ test/mac, all of conform/run (SystemImport aside: SYSCALL is Linux's),
34+ the library's tests and test/libc (ExecveC aside: /proc is Linux's),
35+ and lldb stopping at a line (`make lldb`).
36+- `HOST=darwin src/cross.sh darwin-arm64` stages a native compiler that
37+ runs on the Mac: `--version`, compiling, `raz run`.
38+
39+## To resume
40+
41+1. Start Docker Desktop (Rosetta on for amd64); `make docker-image`.
42+2. `git checkout wip-darwin-step9`, and read `git diff main`.
43+3. `make docker-check`: it must end `0 failed, 9 skipped`.
44+4. `make mac-check`: all must pass.
45+5. Finish what step 9 lacks (PLAN.md 5's step 9), check `make
46+ fixpoint` and `make bench` natively on the Mac (at least 400,000
47+ lines a second), then merge into `main` and push.
48+6. Step 8: `make check` with the native `./raz`.
49+7. Step 10, on the owner's word: v0.26.0, two tarballs, `BOOT` per host.
50+
51+## Known limits on the Mac
52+
53+- A frame holds at most 16 MB: test/run/ThreadOverflowC doesn't compile.
54+- `Thread.Mutex` is `os_unfair_lock`: the thread that locks it unlocks it.
55+- `Bytes` is plain raz there, no NEON.
56+- Under Rosetta, the container skips 9 tests Rosetta breaks (its own
57+ descriptors 3 to 6, its mmap under `ulimit -v`, a stack fault's
58+ locals); each says why.
59+- The compiler is about 16,700 lines of code of the 18,000 budget.