peachsim 0.1.2108 → 0.1.2111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/cli/commands/inspect.ts +8 -0
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +46 -24
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +41 -19
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +46 -24
  32. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +3 -3
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +3 -3
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +46 -24
  69. package/dist-lib/swift-compile.cjs +26 -8
  70. package/dist-lib/swift-compile.mjs +26 -8
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +29 -9
  78. package/dist-lib/vite.cjs +3 -3
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  82. package/package.json +1 -1
  83. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UICollectionView.h +1 -1
  84. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewCell.h +2 -2
  85. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UILayoutGuide.h +1 -1
  86. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINavigationItem.h +1 -1
  87. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINib.h +1 -1
  88. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStoryboard.h +1 -1
  89. package/src/nitro-adapter.lock.json +245 -245
  90. package/src/nitro-superset.lock.json +4 -4
  91. package/src/podspec-sources.ts +13 -11
  92. package/src/swift-compile.ts +6 -0
  93. package/src/swift-distribution.lock.json +11 -11
  94. package/src/swift-guest-compile.ts +2 -0
  95. package/src/swift-guest-link.ts +2 -0
  96. package/src/swift-objc-compile.ts +3 -0
  97. package/src/swift-wasm-prune.ts +16 -3
  98. package/src/turbo-runtime.lock.json +22 -22
@@ -58,6 +58,7 @@ export async function compileGuestLink(options: {
58
58
  readonly sysroot: string
59
59
  readonly sdk: { readonly wasmSdkId: string; readonly wasmSdkChecksum: string }
60
60
  readonly staticClangTargets: readonly string[]
61
+ readonly resourceReferences: readonly Buffer[]
61
62
  readonly generatedOwners: ReadonlyMap<string, string>
62
63
  readonly output: string
63
64
  readonly optimized: string
@@ -145,6 +146,7 @@ export async function compileGuestLink(options: {
145
146
  toolchainBin: options.toolchainBin,
146
147
  moduleRoot: options.moduleRoot,
147
148
  staticClangTargets: options.staticClangTargets,
149
+ resourceReferences: options.resourceReferences,
148
150
  linkDirectory: directory,
149
151
  mapPath: path.join(directory, 'guest.map'),
150
152
  ledgerDataImage: 0,
@@ -1219,6 +1219,7 @@ export interface PrunedGuestLinkOptions {
1219
1219
  readonly toolchainBin: string
1220
1220
  readonly moduleRoot: string
1221
1221
  readonly staticClangTargets: readonly string[]
1222
+ readonly resourceReferences?: readonly Buffer[]
1222
1223
  readonly linkDirectory: string
1223
1224
  readonly mapPath: string
1224
1225
  /** source product that owns the generated shared lookup tables. */
@@ -1414,6 +1415,7 @@ export function linkPrunedGuestImages(
1414
1415
  generatedLedgerObject: path.join(options.linkDirectory, 'ledger.o'),
1415
1416
  }
1416
1417
  },
1418
+ options.resourceReferences,
1417
1419
  )
1418
1420
  if (!result) throw new Error('guest link did not receive pruned inputs')
1419
1421
  return result
@@ -205,6 +205,9 @@ function compiledFrameworkImports(
205
205
  if (next) visit(next)
206
206
  }
207
207
  }
208
+ // a target with Swift builds its clang module from its public headers, so their framework imports are reached
209
+ if (target.allSources.some((file) => file.endsWith('.swift')))
210
+ for (const header of target.objc.headers) visit(header)
208
211
  for (const file of target.allSources.filter(isSwiftNativeTranslationUnit)) visit(file)
209
212
  }
210
213
  return imports
@@ -1083,6 +1083,7 @@ export function pruneSwiftWasmLink(
1083
1083
  rewritten: ReadonlyMap<string, string>,
1084
1084
  sdk: SwiftPrunedSdkInputs,
1085
1085
  ) => void,
1086
+ resourceReferences: readonly Buffer[] = [],
1086
1087
  ): void {
1087
1088
  const rspPath = path.join(directory, '.peach-link.rsp')
1088
1089
  if (!fs.existsSync(rspPath)) return
@@ -1337,7 +1338,7 @@ export function pruneSwiftWasmLink(
1337
1338
  for (const t of o.typePrefixesInObj) knownTypes.add(t)
1338
1339
  const globalLiveTypes = new Set<string>()
1339
1340
  const pendingConformances = new Map<string, { obj: ParsedObject; symIdx: number }[]>()
1340
- const eagerConformanceObjects = new Set<ParsedObject>()
1341
+ const eagerDynamicObjects = new Set<ParsedObject>()
1341
1342
  const conformingType = (name: string): string | undefined => {
1342
1343
  for (let n = name.length - 1; n > 2; n--) {
1343
1344
  const prefix = name.slice(0, n)
@@ -1355,7 +1356,7 @@ export function pruneSwiftWasmLink(
1355
1356
  if (waiting) {
1356
1357
  pendingConformances.delete(pref)
1357
1358
  for (const w of waiting) {
1358
- eagerConformanceObjects.add(w.obj)
1359
+ eagerDynamicObjects.add(w.obj)
1359
1360
  extractObject(w.obj)
1360
1361
  activateSymbolInObj(w.obj, w.symIdx)
1361
1362
  }
@@ -1604,6 +1605,18 @@ export function pruneSwiftWasmLink(
1604
1605
  }
1605
1606
  }
1606
1607
 
1608
+ // nib class tables reference their constructors by utf-8 name, without a relocation.
1609
+ for (const [name, providers] of lazyProviders) {
1610
+ if (!name.startsWith('._OBJC_CLASS_')) continue
1611
+ const className = name.slice('._OBJC_CLASS_'.length)
1612
+ if (!resourceReferences.some((bytes) => bytes.includes(className))) continue
1613
+ for (const provider of providers) {
1614
+ eagerDynamicObjects.add(provider)
1615
+ extractObject(provider)
1616
+ activateSymbolInObj(provider, provider.symNames.indexOf(name))
1617
+ }
1618
+ }
1619
+
1607
1620
  const eagerSdkCategoryFiles: string[] = []
1608
1621
  if (hasClangObjCEager) {
1609
1622
  for (const name of foundationCategoryObjects.map(
@@ -2082,7 +2095,7 @@ export function pruneSwiftWasmLink(
2082
2095
  }
2083
2096
  // these providers were reached through runtime type lookup, so no
2084
2097
  // undefined symbol would extract them from the following archive region.
2085
- for (const obj of eagerConformanceObjects) {
2098
+ for (const obj of eagerDynamicObjects) {
2086
2099
  if (!emittedPruned.has(obj.file) && prunedMap.has(obj.file)) {
2087
2100
  outTokens.push(prunedMap.get(obj.file)!)
2088
2101
  emittedPruned.add(obj.file)
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "compiler": "swift-6.4.0-RELEASE-custom-11345d60dca47496",
10
10
  "sdk": {
11
- "id": "swift-6.4.0-RELEASE_wasm-peach-2ef09643",
12
- "checksum": "8a692c7dca8da69d31ea86774a91ea1d01b84ed1e80369481eb14a882ebae718"
11
+ "id": "swift-6.4.0-RELEASE_wasm-peach-5b8b9174",
12
+ "checksum": "037809573a2d3183fb867b6f80a948f09ebe5ae1ab8b0d6d0ad6eb873a28ae22"
13
13
  },
14
14
  "framework": {
15
- "distribution": "bb5759d4e7c5aa28",
15
+ "distribution": "54c7505f75d44266",
16
16
  "wireAbi": "246b8412514b644113e6a26252c8ebd6de49ab4156ac5f5c98bb9e4c2ff2568b"
17
17
  },
18
18
  "archives": [
@@ -20,71 +20,71 @@
20
20
  "headers": {
21
21
  "reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
22
22
  },
23
- "sha256": "d0162e9ace7f45edecf4b3cd84f7b987852c04ad24b23fe69653bbbbf37d701b",
24
- "size": 25395
23
+ "sha256": "7c196f84eb3437ed6ae20d8a29bda11e5abe97380c4f653eca5adae2b6d5ee03",
24
+ "size": 25397
25
25
  },
26
26
  {
27
27
  "headers": {
28
28
  "reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
29
29
  },
30
- "sha256": "26bf241b2299e7be6b243cfd7e289e46775a524fa0eca148013625238b1e3fdc",
31
- "size": 26137
30
+ "sha256": "29fa4fe9e94a80c99f4ca59c38bffcdccc354c6e00f195d4738e8091c8fe1920",
31
+ "size": 26141
32
32
  },
33
33
  {
34
34
  "headers": {
35
35
  "reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
36
36
  },
37
- "sha256": "fb6fa0d39d16911df6c2a7e346cb7f71e88a3d73248cc1facbc3e7ec93333426",
38
- "size": 25395
37
+ "sha256": "ea727cdef203f6f498fb6c2169312359a84bd77fbd991a47a0227436161ce936",
38
+ "size": 25397
39
39
  },
40
40
  {
41
41
  "headers": {
42
42
  "reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
43
43
  },
44
- "sha256": "188ffe80bafc2adbc9e962d38d9caa81c8a99bc0986a8d279ff07fe53c38b547",
45
- "size": 25164
44
+ "sha256": "a0438b15d0020307dbed308323e6fbb550c082df6d242292912d401bda5d1d07",
45
+ "size": 25169
46
46
  },
47
47
  {
48
48
  "headers": {
49
49
  "reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
50
50
  },
51
- "sha256": "3a319ee34739edfdf731e314f29bc486b42d5988115dad2e802c3512927f08c6",
51
+ "sha256": "1c90d8b80a8eedb63a5a659437dd99b7ccda51c51c6072ee6e56f39be2fbcf81",
52
52
  "size": 25398
53
53
  },
54
54
  {
55
55
  "headers": {
56
56
  "reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
57
57
  },
58
- "sha256": "30439890cc89fe9853547d63e1773c9ce41cdfabfbff21121d63337a4c36575b",
59
- "size": 26138
58
+ "sha256": "2f85a07cf07b487096004c5eb67373cb4ff41cefc6c6304b64010ed02ad806bd",
59
+ "size": 26140
60
60
  },
61
61
  {
62
62
  "headers": {
63
63
  "reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
64
64
  },
65
- "sha256": "a09da78f4dcacf439dcf87c790681737940161aa920785b8d18709f0d542c4c8",
66
- "size": 26137
65
+ "sha256": "cacb00d53800b06c6df1ed85a2b76bed024d4f5cff6f7838d88d4fd56d805077",
66
+ "size": 26139
67
67
  },
68
68
  {
69
69
  "headers": {
70
70
  "reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
71
71
  },
72
- "sha256": "d72c56066e1468b0f1689c4e5d0f02c2d8b54e89cd8bf5b194fc75aaff58abac",
73
- "size": 25264
72
+ "sha256": "4f3f5c6bcd368ede95cbca998b935df153538ffb6d439a20286c677ba5895053",
73
+ "size": 25269
74
74
  },
75
75
  {
76
76
  "headers": {
77
77
  "reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
78
78
  },
79
- "sha256": "de81aef8940e05d6b5b96c537c488ede615f6ed99d8964f699e11e9d182f0192",
80
- "size": 26141
79
+ "sha256": "97c5463e8acb43fc02116b73c974eefff849f1aabe6edb85175f5da8a5411509",
80
+ "size": 26143
81
81
  },
82
82
  {
83
83
  "headers": {
84
84
  "reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
85
85
  },
86
- "sha256": "09e9e4d1479b981bf66de12c9dc51c82fa88b0611acbc6e08e3076876367a54a",
87
- "size": 25103
86
+ "sha256": "4ba1fa00c9e9f3fd2c59b4e36b074fcb0191d36a46ef251f894854511c6b67e7",
87
+ "size": 25105
88
88
  }
89
89
  ]
90
90
  }