Skip to content

Commit e7b32ca

Browse files
committed
docs: explain simulator bridge language choice
1 parent 7ec3327 commit e7b32ca

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

apple/snapshot-bridge/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ surface.
2222

2323
The private API is intentionally pinned to the idb v1.5.2-compatible shape.
2424
See `LICENSE.idb` for attribution.
25+
26+
## Why Objective-C
27+
28+
The selected #2192 mechanism was idb v1.5.2's Objective-C
29+
`SimulatorFrameworkBridge`; the Python used during the spike was only a client
30+
for exercising that guest reader. This bridge keeps the proven native boundary
31+
and removes the Python/idb client dependency.
32+
33+
Objective-C is the narrowest implementation for this private runtime adapter:
34+
it resolves unavailable classes and functions with `dlopen`, `dlsym`, and the
35+
Objective-C runtime, invokes dynamically discovered selectors, and contains
36+
`NSException` failures. A Swift implementation would still require an
37+
Objective-C shim for those operations, adding another native boundary. Keeping
38+
the guest in Objective-C also allows direct lazy compilation with `clang`
39+
without an Xcode project or Swift module for private headers.

0 commit comments

Comments
 (0)