macOS arm64Objective-K — Krypton's human UI language layer for native apps. Choc is the macOS backend built into the Mach-O toolchain, letting pure Krypton programs drive AppKit & Foundation directly so a real native GUI app can ship with no Obj-C, no Swift source. It is what stem and brain are built on.
How it worksView stdlibChoc binds Foundation and AppKit from the Mach-O backend, then lowers the small message-send family Objective-K needs. Krypton's register calling convention already matches the arm64 ABI, so a Krypton function can be used directly as a native UI callback — that is how callbacks, data sources and delegates work.
Dispatch wrappers for 0–6 args, plus NSRect (d0–d3), CGFloat, NSSize, NSPoint+ptr, 256-colour RGBA, and NSTimer variants — each one is a tiny lowering in the backend.
A Krypton func onClick(self, cmd, sender) is registered by Choc and called by the native UI with no shim. Multi-method delegates (table data sources, text-storage) work the same way.
Build native UI classes at runtime whose methods are Krypton funcs — custom views with drawRect:, delegates, targets.
stdlib/choc_macos.k + stdlib/okui.k wrap it: windows, buttons, text views, tables, menus, colours, fonts, timers — human Objective-K calls over platform handles.
Krypton strings can pass selectors, class names, and UI text through Choc without app code doing manual marshalling.
Programs with no foreign calls stay byte-identical (N=0 invariant), so adding the FFI never disturbs the bootstrapping compiler.