peachsim 0.1.2623 → 0.1.2624

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 (137) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +693 -306
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-E6V72TM2.mjs → acorn-DH6VFUJ3.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-RLWITQ5C.mjs → chunk-265THLTP.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-PAEJF2JP.mjs → chunk-2YHIYKY2.mjs} +4 -4
  29. package/dist-lib/esm-chunks/{chunk-XOAOND7F.mjs → chunk-3XA5HYI5.mjs} +6 -6
  30. package/dist-lib/esm-chunks/{chunk-W3X7RP3H.mjs → chunk-A2WMBGJO.mjs} +3 -3
  31. package/dist-lib/esm-chunks/{chunk-UCW7ITXE.mjs → chunk-AV7G5PTE.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-EIOVKQ2C.mjs → chunk-CM2NU5MS.mjs} +5 -5
  33. package/dist-lib/esm-chunks/{chunk-RVM3WWST.mjs → chunk-EFQFJ7M6.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-RLWTJ6II.mjs → chunk-HKPKCJI5.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-4GNQG2GT.mjs → chunk-IMI2NE4A.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-Q7KCK4YO.mjs → chunk-JHMD4G4V.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-4BJIJ3GP.mjs → chunk-LCO2EXKF.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-CXNXKUNJ.mjs → chunk-LD7Z3NDO.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-RBXTTEI6.mjs → chunk-LMWSFXYN.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-IGB7TRLS.mjs → chunk-LOQBWIPM.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-B4APPUTT.mjs → chunk-LT533AHJ.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-KPG4FUTY.mjs → chunk-N4ZJZUCO.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-NOM66H2G.mjs → chunk-OLAYY7SG.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-GP3KL2GC.mjs → chunk-QNXV766K.mjs} +565 -290
  45. package/dist-lib/esm-chunks/{chunk-V2CHR3OI.mjs → chunk-QZ5HTMWV.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-B5OQSD4B.mjs → chunk-T7C6Z5UH.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-ISH6XB23.mjs → chunk-UJORQHAE.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-Q4ZATFEN.mjs → chunk-VH4BJS5V.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-6MNE57DC.mjs → chunk-XONCLAVA.mjs} +8 -7
  50. package/dist-lib/esm-chunks/{chunk-EI7CZDMR.mjs → chunk-YOD53JTM.mjs} +2 -2
  51. package/dist-lib/esm-chunks/{metro-layout-parser-OHVROLNJ.mjs → metro-layout-parser-MDVTDJ65.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-DRAUK6KR.mjs → swift-package-prebuilt-ZN7I4FYC.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-U2M7CMKA.mjs → swift-sdk-app-module-DUVE2OXH.mjs} +107 -20
  54. package/dist-lib/esm-chunks/{swift-sdk-image-ZHWSHCNI.mjs → swift-sdk-image-YSWQBCYV.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-EOJUCK7N.mjs → swift-sdk-image-producer-MZ235WSK.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +686 -299
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +691 -304
  61. package/dist-lib/host/fetch-proxy-handler.cjs +7 -7
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +30 -15
  75. package/dist-lib/native-app-identity-project.mjs +44 -29
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +85 -85
  87. package/dist-lib/public-origins-lib.json +64 -64
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +691 -304
  95. package/dist-lib/swift-compile.cjs +638 -280
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/package.json +1 -1
  123. package/src/bazel-project.ts +34 -18
  124. package/src/binaryen.lock.json +3 -3
  125. package/src/swift-compile.ts +8 -0
  126. package/src/swift-guest-compile.ts +170 -160
  127. package/src/swift-guest-dyld-table.ts +22 -9
  128. package/src/swift-guest-link.ts +116 -42
  129. package/src/swift-guest-linked-spans.ts +63 -14
  130. package/src/swift-guest-projection-storage.ts +7 -6
  131. package/src/swift-guest-source-inputs.ts +35 -21
  132. package/src/swift-objc-compile.ts +1 -0
  133. package/src/swift-sdk-app-module.ts +118 -15
  134. package/src/swift-sdk-image-wasm.ts +119 -17
  135. package/src/swift-sdk-image.ts +4 -1
  136. package/src/swift-wasm-prune.ts +71 -41
  137. package/src/wasm-narrow-boundary.ts +31 -6
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/assetCatalogContract.ts
4
4
  function isSwiftImageVariants(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/sleep.ts
4
4
  function sleep(ms) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../peach-globals/src/bundle-global-footer.ts
4
4
  function findBundleFooter(source, prefix) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  DARWIN_RECORDS_PREFIX,
4
4
  KEEP_WASM_NAMES,
@@ -25,21 +25,21 @@ import {
25
25
  swiftSdkGuestLookups,
26
26
  unslottedFunctions,
27
27
  wasmSections
28
- } from "./chunk-GP3KL2GC.mjs";
28
+ } from "./chunk-QNXV766K.mjs";
29
29
  import {
30
30
  withSwiftRootLock
31
- } from "./chunk-EI7CZDMR.mjs";
31
+ } from "./chunk-YOD53JTM.mjs";
32
32
  import {
33
33
  swiftDistributionAt,
34
34
  swiftModuleDigest,
35
35
  swiftModuleToolchain,
36
36
  swiftSdkPaths
37
- } from "./chunk-XOAOND7F.mjs";
37
+ } from "./chunk-3XA5HYI5.mjs";
38
38
  import {
39
39
  SWIFT_WASM_TRIPLE,
40
40
  sourceSwiftCheckout,
41
41
  swiftCacheDir
42
- } from "./chunk-4GNQG2GT.mjs";
42
+ } from "./chunk-IMI2NE4A.mjs";
43
43
 
44
44
  // src/swift-sdk-image.ts
45
45
  import { execFile } from "node:child_process";
@@ -219,7 +219,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
219
219
  const existing = cached(directory, key);
220
220
  if (existing) return existing;
221
221
  if (!options?.producer && !swiftDistributionAt(moduleRoot) && path.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
222
- const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-EOJUCK7N.mjs");
222
+ const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-MZ235WSK.mjs");
223
223
  await produceSwiftSdkImage({
224
224
  moduleRoot,
225
225
  key,
@@ -465,6 +465,7 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, scopedLookups
465
465
  ].map((name) => `--export=${name}`),
466
466
  `@${path.join(work, "exports.rsp")}`,
467
467
  "--gc-sections",
468
+ "--strip-debug",
468
469
  // strings stay with their objects, so an app loads only the ones its pieces reference
469
470
  "-O0"
470
471
  ];
@@ -525,7 +526,7 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, scopedLookups
525
526
  writeFileSync(path.join(work, INTERFACE_FILE), JSON.stringify(sdkInterface));
526
527
  writeFileSync(
527
528
  path.join(work, IMAGE_DIGEST),
528
- createHash("sha256").update(image).digest("hex")
529
+ typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : createHash("sha256").update(image).digest("hex")
529
530
  );
530
531
  if (swiftSdkImageKey(
531
532
  moduleRoot,
@@ -1,9 +1,9 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  killOrphanedProcessGroup,
4
4
  readProcessTable,
5
5
  terminateProcessGroup
6
- } from "./chunk-4GNQG2GT.mjs";
6
+ } from "./chunk-IMI2NE4A.mjs";
7
7
 
8
8
  // src/swift-root-lock.ts
9
9
  import {
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./chunk-CXNXKUNJ.mjs";
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./chunk-LD7Z3NDO.mjs";
3
3
 
4
4
  // src/metro-layout-parser.ts
5
5
  var whitespace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/y;
@@ -8,7 +8,7 @@ var lineBreak = /[\r\n\u2028\u2029]/;
8
8
  var metroLayoutParser;
9
9
  async function loadMetroLayoutParser() {
10
10
  if (metroLayoutParser) return metroLayoutParser;
11
- const { Parser } = await import("./acorn-E6V72TM2.mjs");
11
+ const { Parser } = await import("./acorn-DH6VFUJ3.mjs");
12
12
  metroLayoutParser = Parser.extend(
13
13
  (Base) => {
14
14
  const parseFunctionBody = Reflect.get(Base.prototype, "parseFunctionBody");
@@ -1,27 +1,27 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  compileTargets,
4
4
  fetchNativeEntry,
5
5
  nativeEntryKey,
6
6
  swiftAvailableModules
7
- } from "./chunk-GP3KL2GC.mjs";
8
- import "./chunk-EI7CZDMR.mjs";
7
+ } from "./chunk-QNXV766K.mjs";
8
+ import "./chunk-YOD53JTM.mjs";
9
9
  import {
10
10
  swiftDistributionAt,
11
11
  swiftImportNames
12
- } from "./chunk-XOAOND7F.mjs";
13
- import "./chunk-4GNQG2GT.mjs";
12
+ } from "./chunk-3XA5HYI5.mjs";
13
+ import "./chunk-IMI2NE4A.mjs";
14
14
  import {
15
15
  SWIFT_REMOTE_PACKAGES_DIR
16
- } from "./chunk-NOM66H2G.mjs";
16
+ } from "./chunk-OLAYY7SG.mjs";
17
17
  import {
18
18
  manifestCalls
19
- } from "./chunk-KPG4FUTY.mjs";
20
- import "./chunk-V2CHR3OI.mjs";
21
- import "./chunk-RLWITQ5C.mjs";
22
- import "./chunk-B4APPUTT.mjs";
23
- import "./chunk-UCW7ITXE.mjs";
24
- import "./chunk-CXNXKUNJ.mjs";
19
+ } from "./chunk-N4ZJZUCO.mjs";
20
+ import "./chunk-QZ5HTMWV.mjs";
21
+ import "./chunk-265THLTP.mjs";
22
+ import "./chunk-LT533AHJ.mjs";
23
+ import "./chunk-AV7G5PTE.mjs";
24
+ import "./chunk-LD7Z3NDO.mjs";
25
25
 
26
26
  // src/swift-package-prebuilt.ts
27
27
  import { createHash } from "node:crypto";
@@ -1,11 +1,11 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SWIFT_SDK_APP_MEMORY_BASE,
4
4
  SWIFT_SDK_APP_TABLE_BASE,
5
5
  SWIFT_SDK_MEMORY_BASE,
6
6
  SWIFT_SDK_PIECE_FIELDS,
7
7
  readSwiftSdkManifest
8
- } from "./chunk-6MNE57DC.mjs";
8
+ } from "./chunk-XONCLAVA.mjs";
9
9
  import {
10
10
  ADDEND_RELOCATIONS,
11
11
  KEEP_WASM_NAMES,
@@ -33,34 +33,39 @@ import {
33
33
  wasmReader,
34
34
  wasmSections,
35
35
  writeWasmCustomSection
36
- } from "./chunk-GP3KL2GC.mjs";
37
- import "./chunk-EI7CZDMR.mjs";
38
- import "./chunk-EIOVKQ2C.mjs";
39
- import "./chunk-4BJIJ3GP.mjs";
40
- import "./chunk-RLWTJ6II.mjs";
41
- import "./chunk-XOAOND7F.mjs";
36
+ } from "./chunk-QNXV766K.mjs";
37
+ import "./chunk-YOD53JTM.mjs";
38
+ import "./chunk-CM2NU5MS.mjs";
39
+ import "./chunk-LCO2EXKF.mjs";
40
+ import "./chunk-HKPKCJI5.mjs";
41
+ import "./chunk-3XA5HYI5.mjs";
42
42
  import {
43
43
  SWIFT_WASM_TRIPLE
44
- } from "./chunk-4GNQG2GT.mjs";
45
- import "./chunk-NOM66H2G.mjs";
46
- import "./chunk-KPG4FUTY.mjs";
47
- import "./chunk-V2CHR3OI.mjs";
48
- import "./chunk-RLWITQ5C.mjs";
49
- import "./chunk-B4APPUTT.mjs";
50
- import "./chunk-UCW7ITXE.mjs";
51
- import "./chunk-CXNXKUNJ.mjs";
44
+ } from "./chunk-IMI2NE4A.mjs";
45
+ import "./chunk-OLAYY7SG.mjs";
46
+ import "./chunk-N4ZJZUCO.mjs";
47
+ import "./chunk-QZ5HTMWV.mjs";
48
+ import "./chunk-265THLTP.mjs";
49
+ import "./chunk-LT533AHJ.mjs";
50
+ import "./chunk-AV7G5PTE.mjs";
51
+ import "./chunk-LD7Z3NDO.mjs";
52
52
 
53
53
  // src/swift-sdk-app-module.ts
54
54
  import { execFile } from "node:child_process";
55
55
  import { createHash } from "node:crypto";
56
56
  import {
57
+ appendFileSync,
57
58
  chownSync,
59
+ closeSync,
58
60
  constants,
59
61
  copyFileSync,
60
62
  existsSync,
63
+ fstatSync,
61
64
  mkdirSync,
62
65
  mkdtempSync,
66
+ openSync,
63
67
  readFileSync,
68
+ readSync,
64
69
  realpathSync,
65
70
  rmSync,
66
71
  statSync,
@@ -148,9 +153,12 @@ async function buildSwiftAppModule(options) {
148
153
  linkage: link.linkage,
149
154
  usage
150
155
  });
151
- writeFileSync(options.output, finishSwiftAppModule(readFileSync(options.output)));
156
+ finishSwiftAppModuleFile(options.output);
152
157
  return binding;
153
158
  }
159
+ function swiftAppModuleThunkSection(lowered) {
160
+ return [NATIVE_SDK_THUNK_SECTION, sdkImportThunks(lowered)];
161
+ }
154
162
  function finishSwiftAppModule(lowered) {
155
163
  return writeWasmCustomSection(
156
164
  lowered,
@@ -158,6 +166,73 @@ function finishSwiftAppModule(lowered) {
158
166
  sdkImportThunks(lowered)
159
167
  );
160
168
  }
169
+ function finishSwiftAppModuleFile(file) {
170
+ const fd = openSync(file, "r");
171
+ let prefixEnd = 8;
172
+ let hasExistingThunk = false;
173
+ let prefix;
174
+ try {
175
+ const total = fstatSync(fd).size;
176
+ const probe = Buffer.allocUnsafe(16);
177
+ let offset = 8;
178
+ while (offset < total) {
179
+ const read = readSync(fd, probe, 0, Math.min(16, total - offset), offset);
180
+ if (read < 2) break;
181
+ const id = probe[0];
182
+ let size = 0;
183
+ let shift = 0;
184
+ let at = 1;
185
+ for (; ; ) {
186
+ const byte = probe[at++];
187
+ size += (byte & 127) * 2 ** shift;
188
+ if (!(byte & 128)) break;
189
+ shift += 7;
190
+ }
191
+ const start = offset + at;
192
+ const next = start + size;
193
+ if (id === 1 || id === 2) prefixEnd = next;
194
+ else if (id === 0) {
195
+ const nameBuf = Buffer.allocUnsafe(Math.min(128, size));
196
+ const nRead = readSync(fd, nameBuf, 0, nameBuf.length, start);
197
+ let nLen = 0;
198
+ let nShift = 0;
199
+ let nAt = 0;
200
+ for (; ; ) {
201
+ if (nAt >= nRead) break;
202
+ const byte = nameBuf[nAt++];
203
+ nLen += (byte & 127) * 2 ** nShift;
204
+ if (!(byte & 128)) break;
205
+ nShift += 7;
206
+ }
207
+ if (nAt + nLen <= nRead && nameBuf.toString("utf8", nAt, nAt + nLen) === NATIVE_SDK_THUNK_SECTION) {
208
+ hasExistingThunk = true;
209
+ break;
210
+ }
211
+ }
212
+ offset = next;
213
+ }
214
+ if (!hasExistingThunk) {
215
+ prefix = Buffer.allocUnsafe(prefixEnd);
216
+ let filled = 0;
217
+ while (filled < prefixEnd) {
218
+ const n = readSync(fd, prefix, filled, prefixEnd - filled, filled);
219
+ if (n <= 0) break;
220
+ filled += n;
221
+ }
222
+ prefix = prefix.subarray(0, filled);
223
+ }
224
+ } finally {
225
+ closeSync(fd);
226
+ }
227
+ if (hasExistingThunk || !prefix) {
228
+ writeFileSync(file, finishSwiftAppModule(readFileSync(file)));
229
+ return;
230
+ }
231
+ const thunks = sdkImportThunks(prefix);
232
+ const nameBytes = Buffer.from(encodedName(NATIVE_SDK_THUNK_SECTION));
233
+ const header = Buffer.from([0, ...uleb(nameBytes.length + thunks.length)]);
234
+ appendFileSync(file, Buffer.concat([header, nameBytes, thunks]));
235
+ }
161
236
  function swiftAppModuleInputs(tokens, buildRoot, sdkLibraries) {
162
237
  const owned = (token) => path.resolve(token).startsWith(`${buildRoot}/`) && (!token.includes("/.peach-pruned-objs/") || token.endsWith("/swiftrt-patched.o"));
163
238
  const inputs = [];
@@ -372,6 +447,7 @@ async function linkSwiftAppModule(options) {
372
447
  "--unresolved-symbols=ignore-all",
373
448
  "--import-undefined",
374
449
  "--emit-relocs",
450
+ "--strip-debug",
375
451
  "--gc-sections",
376
452
  "--keep-section=target_features",
377
453
  "--error-limit=0",
@@ -394,7 +470,16 @@ async function linkSwiftAppModule(options) {
394
470
  const skipPasses = options.layoutMap ? ["duplicate-function-elimination"] : void 0;
395
471
  const sdkTableEnd = sdk.sdkInterface.layout.tableEnd;
396
472
  const { loweringCache } = options;
397
- const loweringKey = loweringCache && createHash("sha256").update(
473
+ const loweringKey = loweringCache && (typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(
474
+ JSON.stringify([
475
+ loweringCache.compilerDigest,
476
+ optimize,
477
+ skipPasses,
478
+ sdkTableEnd,
479
+ lazy,
480
+ KEEP_WASM_NAMES
481
+ ])
482
+ ).update(bytes).digest("hex") : createHash("sha256").update(
398
483
  JSON.stringify([
399
484
  loweringCache.compilerDigest,
400
485
  optimize,
@@ -403,7 +488,7 @@ async function linkSwiftAppModule(options) {
403
488
  lazy,
404
489
  KEEP_WASM_NAMES
405
490
  ])
406
- ).update(bytes).digest("hex");
491
+ ).update(bytes).digest("hex"));
407
492
  return {
408
493
  linkage,
409
494
  async lower() {
@@ -1066,7 +1151,8 @@ function createSwiftSdkBinding(linkage, sdk, usage, projection) {
1066
1151
  bindSwiftAppModule(linkage, sdk),
1067
1152
  selectSwiftSdkData(sdk, usage, linkage, projection)
1068
1153
  ]);
1069
- return { bytes, sha256: createHash("sha256").update(bytes).digest("hex") };
1154
+ const sha256 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : createHash("sha256").update(bytes).digest("hex");
1155
+ return { bytes, sha256 };
1070
1156
  }
1071
1157
  function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
1072
1158
  const map = readWasmLinkMap(mapFile, false);
@@ -1622,6 +1708,7 @@ export {
1622
1708
  readSwiftSdkUsage,
1623
1709
  selectSwiftSdkData,
1624
1710
  swiftAppModuleInputs,
1711
+ swiftAppModuleThunkSection,
1625
1712
  swiftSdkProjectionSpans,
1626
1713
  writeSwiftSdkAppLink
1627
1714
  };
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SWIFT_SDK_APP_MEMORY_BASE,
4
4
  SWIFT_SDK_APP_TABLE_BASE,
@@ -15,21 +15,21 @@ import {
15
15
  swiftSdkImageFile,
16
16
  swiftSdkImageKey,
17
17
  swiftSdkImageProducts
18
- } from "./chunk-6MNE57DC.mjs";
19
- import "./chunk-GP3KL2GC.mjs";
20
- import "./chunk-EI7CZDMR.mjs";
21
- import "./chunk-EIOVKQ2C.mjs";
22
- import "./chunk-4BJIJ3GP.mjs";
23
- import "./chunk-RLWTJ6II.mjs";
24
- import "./chunk-XOAOND7F.mjs";
25
- import "./chunk-4GNQG2GT.mjs";
26
- import "./chunk-NOM66H2G.mjs";
27
- import "./chunk-KPG4FUTY.mjs";
28
- import "./chunk-V2CHR3OI.mjs";
29
- import "./chunk-RLWITQ5C.mjs";
30
- import "./chunk-B4APPUTT.mjs";
31
- import "./chunk-UCW7ITXE.mjs";
32
- import "./chunk-CXNXKUNJ.mjs";
18
+ } from "./chunk-XONCLAVA.mjs";
19
+ import "./chunk-QNXV766K.mjs";
20
+ import "./chunk-YOD53JTM.mjs";
21
+ import "./chunk-CM2NU5MS.mjs";
22
+ import "./chunk-LCO2EXKF.mjs";
23
+ import "./chunk-HKPKCJI5.mjs";
24
+ import "./chunk-3XA5HYI5.mjs";
25
+ import "./chunk-IMI2NE4A.mjs";
26
+ import "./chunk-OLAYY7SG.mjs";
27
+ import "./chunk-N4ZJZUCO.mjs";
28
+ import "./chunk-QZ5HTMWV.mjs";
29
+ import "./chunk-265THLTP.mjs";
30
+ import "./chunk-LT533AHJ.mjs";
31
+ import "./chunk-AV7G5PTE.mjs";
32
+ import "./chunk-LD7Z3NDO.mjs";
33
33
  export {
34
34
  SWIFT_SDK_APP_MEMORY_BASE,
35
35
  SWIFT_SDK_APP_TABLE_BASE,
@@ -1,15 +1,15 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  withSwiftRootLock
4
- } from "./chunk-EI7CZDMR.mjs";
4
+ } from "./chunk-YOD53JTM.mjs";
5
5
  import {
6
6
  swiftCacheDir,
7
7
  windowAdmission
8
- } from "./chunk-4GNQG2GT.mjs";
8
+ } from "./chunk-IMI2NE4A.mjs";
9
9
  import {
10
10
  isRecord
11
- } from "./chunk-UCW7ITXE.mjs";
12
- import "./chunk-CXNXKUNJ.mjs";
11
+ } from "./chunk-AV7G5PTE.mjs";
12
+ import "./chunk-LD7Z3NDO.mjs";
13
13
 
14
14
  // src/swift-sdk-image-producer.ts
15
15
  import { execFile, execFileSync } from "node:child_process";