M0-11
One-simulation spike A: zoen-sim FFI plugin on macOS
Evidence
From logs/evidence/M0-11/. Click a thumbnail for the full image.
Images (1)
Logs and data (4)
macos-player-sim.txt · 5 kB · open
Mono path[0] = '/Users/king/Desktop/Workspace/SRO/zoen/apps/client-unity/Builds/macOS/Zoen.app/Contents/Resources/Data/Managed'
Mono config path = '/Users/king/Desktop/Workspace/SRO/zoen/apps/client-unity/Builds/macOS/Zoen.app/Contents/MonoBleedingEdge/etc'
Input System module state changed to: Initialized.
[Physics::Module] Initialized fallback backend.
[Physics::Module] Id: 0xdecafbad
Initialize engine version: 6000.3.25f1 (e1dba0a9aba4)
[Subsystems] Discovering subsystems at path /Users/king/Desktop/Workspace/SRO/zoen/apps/client-unity/Builds/macOS/Zoen.app/Contents/Resources/Data/UnitySubsystems
GfxDevice: creating device client; kGfxThreadingModeThreaded
preferred device: Apple M3 (high power)
Metal devices available: 1
0: Apple M3 (high power)
Using device Apple M3 (high power)
Initializing Metal device caps: Apple M3
Mac GPU Family: 2
Apple GPU Family: 9
MSL Version: 3.0
Has Float MSAA: 1
Has Float Filtering: 1
ReadWrite Texture Tier: 2
Begin MonoManager ReloadAssembly
- Loaded All Assemblies, in 0.215 seconds
- Finished resetting the current domain, in 0.004 seconds
[Physics::Module] Selected backend.
[Physics::Module] Name: PhysX
[Physics::Module] Id: 0xf2b8ea05
[Physics::Module] SDK Version: 4.1.2
[Physics::Module] Integration Version: 1.0.0
[Physics::Module] Threading Mode: Multi-Threaded
UnloadTime: 1.318292 ms
ZOEN_BOOT {"product":"Zoen","version":"0.1.0","unity":"6000.3.25f1","platform":"OSXPlayer","graphicsApi":"Metal","graphicsVersion":"Metal","gpu":"Apple M3","device":"Mac15,12","os":"Mac OS X 26.5.2","systemMemoryMb":24576,"screenWidth":1280,"screenHeight":720,"tier":"High","tiers":["Low","Mid","High","Ultra"],"tierRequest":"","tierRefused":"","tierSource":"PlatformDefault","capKey":"windows","cycle":["Low","Mid","High","Ultra"],"ultraGate":"none","benchmark":"run","deviceMemoryGb":0.0,"logicalCores":0,"displayHz":60.00239944458008,"fpsTarget":60,"targetFrameRate":60,"vSyncCount":1}
ZOEN_PROBE {"schema":1,"platform":"OSXPlayer","unity":"6000.3.25f1","device":{"model":"Mac15,12","type":"Desktop","mobile":false,"os":"Mac OS X 26.5.2","osFamily":"MacOSX","cpu":"Apple M3","cores":8,"cpuMhz":2400,"memoryMb":24576,"soc":""},"gpu":{"name":"Apple M3","vendor":"Apple","vendorId":0,"deviceId":0,"api":"Metal","version":"Metal","memoryMb":18186,"shaderLevel":50,"multiThreaded":true,"maxTextureSize":16384,"maxCubemapSize":16384,"renderTargets":8,"compute":true,"instancing":true,"asyncCompute":false,"asyncReadback":true,"rayTracing":false,"msaaMax":4,"msaaTextures":1,"reversedZ":true,"hiddenSurfaceRemoval":true,"pipeline":"UniversalRenderPipelineAsset","srpBatcher":false},"textures":{"astc":true,"astcHdr":true,"etc2":true,"etc":true,"dxt":true,"bc45":true,"bc6h":true,"bc7":true},"renderTargets":{"hdr":true,"argbHalf":true,"argbFloat":true,"rgb111110":true,"argb2101010":true,"rHalf":true,"rgHalf":true,"r8":true,"depth":true,"shadowmap":true},"display":{"width":1280,"height":720,"screenWidth":2940,"screenHeight":1846,"dpi":257,"hz":60.002,"maxHz":60.002,"hdrOutput":false},"thermal":{"source":"none","status":-1,"headroom":null},"web":null,"class":{"formFactor":"native-desktop","gpuFamily":"apple","gpuName":"Apple M3","apiFamily":"metal","apiVersion":"","textureFamily":"astc","textureFamilies":["astc","bc","etc2"],"memoryGb":24,"memorySource":"system-rounded"}}
ZOEN_GM panel=on buttons=15
ZOEN_SIM {"platform":"OSXPlayer","abi":1,"loaded":true,"scenario":"walk_eight_directions","finalHash":"bb46012ea5aaaebf","expectedHash":"bb46012ea5aaaebf","match":true,"scenarios":4,"ticks":60,"allMatch":true,"bench":[{"actors":1,"inputsPerTick":1,"medianNsPerTick":108,"samples":11,"ticksPerSample":200},{"actors":5000,"inputsPerTick":5000,"medianNsPerTick":333200,"samples":11,"ticksPerSample":4}]}
ZOEN_SKY phase=day clock=13:24 weather=clear (auto) speed=x1 tier=High particles=0 none fog=0.0098
ZOEN_PICK {"tier":"High","source":"benchmark","steps":["High:16.71"],"fpsTarget":60,"targetFrameRate":60,"vSyncCount":1,"percentile":95.0,"tolerance":0.10000000149011612}
ZOEN_CAPTURE /Users/king/Desktop/Workspace/SRO/zoen/logs/evidence/M0-11/sim.png
ZOEN_FPS tier=High api=Metal target=60 fps=60.0 avgMs=16.67 p50Ms=16.67 p95Ms=16.77 p99Ms=17.70 maxMs=33.25 frames=240 logErrors=0 logWarnings=0
Thread 0x16d943000 may have been prematurely finalized
[Physics::Module] Cleanup current backend.
[Physics::Module] Id: 0xf2b8ea05
…zoen-sim-macos-player.txt · 401 B · open
ZOEN_SIM {"platform":"OSXPlayer","abi":1,"loaded":true,"scenario":"walk_eight_directions","finalHash":"bb46012ea5aaaebf","expectedHash":"bb46012ea5aaaebf","match":true,"scenarios":4,"ticks":60,"allMatch":true,"bench":[{"actors":1,"inputsPerTick":1,"medianNsPerTick":108,"samples":11,"ticksPerSample":200},{"actors":5000,"inputsPerTick":5000,"medianNsPerTick":333200,"samples":11,"ticksPerSample":4}]}
macos-smoke-sim.json · 3 kB · open
{
"finished": "2026-10-08T11:47:12.635Z",
"app": "apps/client-unity/Builds/macOS/Zoen.app",
"gmSend": null,
"gmOff": false,
"simExpect": true,
"pass": true,
"results": [
{
"tier": "default",
"expectTier": "High",
"exitCode": 0,
"signal": null,
"boot": {
"product": "Zoen",
"version": "0.1.0",
"unity": "6000.3.25f1",
"platform": "OSXPlayer",
"graphicsApi": "Metal",
"graphicsVersion": "Metal",
"gpu": "Apple M3",
"device": "Mac15,12",
"os": "Mac OS X 26.5.2",
"systemMemoryMb": 24576,
"screenWidth": 1280,
"screenHeight": 720,
"tier": "High",
"tiers": [
"Low",
"Mid",
"High",
"Ultra"
],
"tierRequest": "",
"tierRefused": "",
"tierSource": "PlatformDefault",
"capKey": "windows",
"cycle": [
"Low",
"Mid",
…plugin-macos.json · 1 kB · open
{
"what": "zoen-sim C ABI plugin for macOS (M0-11)",
"finished": "2026-10-08T11:09:17.748Z",
"rustc": "rustc 1.99.0 (b940084d7 2026-09-28)",
"profile": "plugin (release, lto, codegen-units 1, strip debuginfo)",
"targets": [
"aarch64-apple-darwin"
],
"archs": [
"arm64"
],
"universal": false,
"abi": 1,
"cSmoke": "ZOEN_SIM_C abi=1 hash=9212ab6e32ffa3ef pass",
"exports": [
"zoen_sim_abi_version",
"zoen_sim_create",
"zoen_sim_destroy",
"zoen_sim_push_inputs",
"zoen_sim_read_actors",
"zoen_sim_read_events",
"zoen_sim_spawn",
"zoen_sim_state",
"zoen_sim_step"
],
"dylib": {
"path": "target/aarch64-apple-darwin/plugin/libzoen_sim_ffi.dylib",
"bytes": 406288,
"sha256": "45e6d964d4f7dcda66754f604349118633b7b25297d3985c06a9e51f828272f6"
},
"staticlib": {
"path": "target/aarch64-apple-darwin/plugin/libzoen_sim_ffi.a",
"bytes": 18775904
},
"unityPlugin": {
"path": "apps/client-unity/Assets/Zoen/Plugins/macOS/zoen_sim_ffi.dylib",
"sha256": "45e6d964d4f7dcda66754f604349118633b7b25297d3985c06a9e51f828272f6"
},
"unityGolden": {
"path": "apps/client-unity/Assets/Zoen/Runtime/Sim/Resources/ZoenSimGolden.json",
…Tests
$ node tools/sim/build-plugin.mjs macos$ cargo test --workspace$ cargo clippy --workspace --all-targets -- -D warnings$ node tools/unity-run.mjs editmode$ node tools/unity-run.mjs editmode$ node tools/unity-run.mjs setup$ node tools/unity-run.mjs editmode$ node tools/unity-run.mjs build macos$ node tools/unity/macos-smoke.mjs --tiers default --sim --tag sim --out logs/evidence/M0-11$ pnpm --filter @zoen/wiki exec playwright test --only-changedNotes
2026-10-08 11:50 UTC · Part A done on macOS. ABI v1 (crates/zoen-sim-ffi/include/zoen_sim.h): create/destroy with fixed actor/input/event capacities, spawn, push_inputs (all or nothing), step N ticks (out hash), state/read_actors/read_events into caller buffers; i32 codes OK/-1 NULL/-2 CONFIG/-3 CAPACITY/-4 ARGUMENT/-5 PANIC/-6 POISONED. Panic policy: panic-free code (clippy deny indexing/panic) + catch_unwind per call; a panicking world is poisoned (only destroy accepted); Emscripten (panic=abort) relies on the panic-free code. Plugin layout: Assets/Zoen/Plugins/macOS/zoen_sim_ffi.dylib (arm64 only; x86_64 needs rustup target add, not done), import settings macOS editor + OSXUniversal only via Editor/SimPluginImport.cs (ProjectSetup + Build apply and save the .meta). Unity: Runtime/Sim/ZoenSimNative.cs (__Internal for WebGL/iOS behind ZOEN_SIM_STATIC, stubs until M0-11C/D), SimGolden.cs (flattened replay, 0 GC per tick), SimBootCheck.cs (ZOEN_SIM line). EditMode 76/76; macOS build + macos-smoke --sim pass: finalHash bb46012ea5aaaebf match, allMatch, step median 108 ns/tick (1 mover) and 333 us/tick (5000 movers incl. C# input fill). Evidence logs/evidence/M0-11/ (plugin-macos.json, macos-smoke-sim.json, zoen-sim-macos-player.txt, sim.png). Remains: M0-11B Android .so (NDK) + APK ZOEN_SIM; M0-11C Web static lib with the pinned Emscripten; M0-11D Windows/iOS recorded + ADR-029 result.

