ReviewOS

also looking at this

craft-native/craft

feat(ios): AR moves to Zig — ratchet 18 -> 13

#126
Merged glennmichael123 wants to merge feat/ios-ar into main
5 files +1480 -10
packages/zig/test/ios_conformance_test.zigmodified+3-7
Changes to packages/zig/test/ios_conformance_test.zig
@@ -43,6 +43,7 @@ const zig_sources = [_][]const u8{
4343 @embedFile("src/bridge_mobile_watch.zig"),
4444 @embedFile("src/bridge_mobile_location.zig"),
4545 @embedFile("src/bridge_mobile_locrecording.zig"),
46 @embedFile("src/bridge_mobile_ar.zig"),
4647 @embedFile("src/bridge_mobile_motion.zig"),
4748 @embedFile("src/bridge_mobile_imagepicker.zig"),
4849 @embedFile("src/bridge_mobile_filepicker.zig"),
@@ -121,7 +122,7 @@ const dispatch_end = "func webView(";
121122/// and `deliverErrorCode` landed the day after that was written. Worth
122123/// re-reading the other deferrals for the same reason before assuming they
123124/// still hold.
124const max_not_yet_migrated: usize = 18;
125const max_not_yet_migrated: usize = 13;
125126
126127fn dispatcherRegion() []const u8 {
127128 const begin = std.mem.indexOf(u8, swift_spec, dispatch_begin) orelse return "";
@@ -270,11 +271,6 @@ const deliberate_deferrals = [_]Deferral{
270271 // 51 namespaces, no `mobile`, and neither `ios.zig` nor `ios_dispatch.zig`
271272 // reads it — so the boundary is recorded here instead, where the tooling
272273 // that counts unmigrated actions can see it.
273 .{ .action = "startAR", .reason = "SceneKit node-graph glue; miserable and low-value through objc_msgSend" },
274 .{ .action = "stopAR", .reason = "SceneKit node-graph glue; miserable and low-value through objc_msgSend" },
275 .{ .action = "getARPlanes", .reason = "SceneKit node-graph glue; miserable and low-value through objc_msgSend" },
276 .{ .action = "placeARObject", .reason = "SceneKit node-graph glue; miserable and low-value through objc_msgSend" },
277 .{ .action = "removeARObject", .reason = "SceneKit node-graph glue; miserable and low-value through objc_msgSend" },
278274
279275 // StoreKit 2. Narrower than "no ObjC surface": StoreKit *1* is ObjC and
280276 // `bridge_iap.zig` already drives it from Zig on macOS, so this is a choice
@@ -347,7 +343,7 @@ test "every recorded deferral is real, and still a deferral" {
347343 }
348344
349345 // Non-vacuity: the loop above is satisfied by an empty table.
350 try testing.expect(deliberate_deferrals.len >= 18);
346 try testing.expect(deliberate_deferrals.len >= 13);
351347
352348 // As of this commit the table happens to cover every unmigrated action,
353349 // but that is not asserted. Pinning the exact count would make migrating a