peachsim 0.1.2590 → 0.1.2591

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 (130) 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 +323 -93
  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-65FNEARV.mjs → acorn-EMX4WZ72.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-NZY4GOG5.mjs → chunk-4QHHRGO4.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-SRFKOU76.mjs → chunk-7627LKJK.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-BZS5SIYK.mjs → chunk-AKKHSVJ4.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-WPDY5IAD.mjs → chunk-EGKH2L6J.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-JG4AANWA.mjs → chunk-ILWFGZWW.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-SLPXTLBK.mjs → chunk-J676B57D.mjs} +5 -5
  33. package/dist-lib/esm-chunks/{chunk-ADKUIQXX.mjs → chunk-JHXDM3YU.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-RGC2JNCL.mjs → chunk-MC6NMYWY.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-HZTK7TP5.mjs → chunk-NX23AMX4.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-2GUB5OLB.mjs → chunk-Q4NA6PUR.mjs} +3 -3
  37. package/dist-lib/esm-chunks/{chunk-EFKDUMB5.mjs → chunk-QBMFX3J2.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-462CWTWI.mjs → chunk-RKQZGWX2.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-5GNGHM5B.mjs → chunk-SOAYP72T.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-YPPH6F77.mjs → chunk-TFG4LZ5T.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-OZJ66CXY.mjs → chunk-UIVXVMS5.mjs} +2 -2
  42. package/dist-lib/esm-chunks/{chunk-X2EKFONU.mjs → chunk-UYJXLDCG.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-N2II5SRJ.mjs → chunk-VD27WNCT.mjs} +4 -4
  44. package/dist-lib/esm-chunks/{chunk-V5TTEXYO.mjs → chunk-VF5WVB3D.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-WYDRQRJL.mjs → chunk-VRVXRZI4.mjs} +5 -5
  46. package/dist-lib/esm-chunks/{chunk-4VCRUQ36.mjs → chunk-VYZ5DC3M.mjs} +194 -48
  47. package/dist-lib/esm-chunks/{chunk-GBD26EBV.mjs → chunk-YR6DNV76.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-XE3VHAU2.mjs → chunk-ZL5N6ENT.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{metro-layout-parser-CRI3GMCM.mjs → metro-layout-parser-ANKZARNW.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{swift-package-prebuilt-5XDZ2HZZ.mjs → swift-package-prebuilt-4N5CXBOZ.mjs} +10 -10
  51. package/dist-lib/esm-chunks/{swift-sdk-app-module-6H3G6AXD.mjs → swift-sdk-app-module-5IUSRXYA.mjs} +151 -67
  52. package/dist-lib/esm-chunks/{swift-sdk-image-WAC7GG2R.mjs → swift-sdk-image-7T2LMQS5.mjs} +14 -14
  53. package/dist-lib/esm-chunks/{swift-sdk-image-producer-B3L27QTG.mjs → swift-sdk-image-producer-7QJ3BF6E.mjs} +4 -4
  54. package/dist-lib/expo-swift-bundle.cjs +322 -92
  55. package/dist-lib/expo-swift-metadata.cjs +1 -1
  56. package/dist-lib/expo-swift-metadata.mjs +7 -7
  57. package/dist-lib/home-paths.cjs +1 -1
  58. package/dist-lib/host/bridge-host.cjs +323 -93
  59. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  60. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  61. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  62. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  63. package/dist-lib/host/websocket-proxy.cjs +1 -1
  64. package/dist-lib/index.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +3 -3
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +4 -4
  72. package/dist-lib/native-app-identity-project.cjs +2 -2
  73. package/dist-lib/native-app-identity-project.mjs +16 -16
  74. package/dist-lib/native-app-identity.cjs +1 -1
  75. package/dist-lib/native-app-identity.mjs +6 -6
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +3 -3
  78. package/dist-lib/pdfium-raster.cjs +1 -1
  79. package/dist-lib/pdfium-raster.mjs +2 -2
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +3 -3
  82. package/dist-lib/profiles.cjs +1 -1
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +81 -81
  85. package/dist-lib/public-origins-lib.json +69 -69
  86. package/dist-lib/react-native-host-modules.cjs +1 -1
  87. package/dist-lib/react-native-host-modules.mjs +2 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +1 -1
  91. package/dist-lib/sdk.mjs +8 -8
  92. package/dist-lib/skills.cjs +323 -93
  93. package/dist-lib/swift-compile.cjs +320 -90
  94. package/dist-lib/swift-compile.mjs +10 -10
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +3 -3
  97. package/dist-lib/swift-submit.cjs +1 -1
  98. package/dist-lib/swift-submit.mjs +6 -6
  99. package/dist-lib/swift-svg-raster.cjs +1 -1
  100. package/dist-lib/swift-svg-raster.mjs +2 -2
  101. package/dist-lib/swift-toolchain.cjs +1 -1
  102. package/dist-lib/swift.cjs +1 -1
  103. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  105. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  106. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  107. package/dist-lib/vendor/acorn.cjs +1 -1
  108. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  109. package/dist-lib/vendor/ignore.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/plist.cjs +1 -1
  112. package/dist-lib/vendor/smol-toml.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/kotlin/sdk.tar.gz +0 -0
  126. package/package.json +1 -1
  127. package/src/swift-guest-compile.ts +41 -8
  128. package/src/swift-guest-link.ts +3 -0
  129. package/src/swift-guest-source-inputs.ts +158 -30
  130. package/src/swift-sdk-app-module.ts +146 -59
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2590 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2591 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SWIFT_AUTOLINK_LINKER,
4
4
  SWIFT_CACHE_HOLD_MARKER,
@@ -18,7 +18,7 @@ import {
18
18
  windowAdmission,
19
19
  withSwiftRootLock,
20
20
  writeSwiftAutolinkLinker
21
- } from "./chunk-JG4AANWA.mjs";
21
+ } from "./chunk-ILWFGZWW.mjs";
22
22
  import {
23
23
  SWIFT_BINARY_TREES_DIR,
24
24
  SWIFT_NATIVE_INPUT_ROOT,
@@ -33,7 +33,7 @@ import {
33
33
  isSwiftResourcePath,
34
34
  isSwiftSourceLinkGraph,
35
35
  swiftProjectFilesProblems
36
- } from "./chunk-5GNGHM5B.mjs";
36
+ } from "./chunk-SOAYP72T.mjs";
37
37
  import {
38
38
  OBJC_RESOURCE_ACCESSOR_BODY,
39
39
  OBJC_RESOURCE_ACCESSOR_HEADER,
@@ -57,16 +57,16 @@ import {
57
57
  swiftPackagePartition,
58
58
  swiftTargetModuleName,
59
59
  withoutGlogModuleMap
60
- } from "./chunk-GBD26EBV.mjs";
60
+ } from "./chunk-YR6DNV76.mjs";
61
61
  import {
62
62
  rnxPublicBrand
63
- } from "./chunk-ADKUIQXX.mjs";
63
+ } from "./chunk-JHXDM3YU.mjs";
64
64
  import {
65
65
  isRecord
66
- } from "./chunk-WPDY5IAD.mjs";
66
+ } from "./chunk-EGKH2L6J.mjs";
67
67
  import {
68
68
  __publicField
69
- } from "./chunk-NZY4GOG5.mjs";
69
+ } from "./chunk-4QHHRGO4.mjs";
70
70
 
71
71
  // src/swift-compile.ts
72
72
  import {
@@ -12730,6 +12730,7 @@ function linkGuestImages(options) {
12730
12730
  { stdio: "pipe" }
12731
12731
  );
12732
12732
  finalTrace = linkFinal(projectionObject, callerMap ? void 0 : layoutMap);
12733
+ if (sharedSdk) break;
12733
12734
  const wasm = fs9.readFileSync(finalOutput);
12734
12735
  const actual = guestProjectionRegionCounts(
12735
12736
  images.length,
@@ -13477,27 +13478,131 @@ function clangIrLinkOptions(ir) {
13477
13478
  var CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
13478
13479
  var PARALLEL_REPLAY = `
13479
13480
  const { spawn } = require('node:child_process')
13480
- const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
13481
+ const fs = require('node:fs')
13482
+ const commands = JSON.parse(fs.readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
13483
+ const results = new Array(commands.length)
13481
13484
  let next = 0
13482
13485
  const run = () => {
13483
13486
  if (next >= commands.length) return Promise.resolve()
13484
- const [file, ...args] = commands[next++]
13487
+ const index = next++
13488
+ const [file, ...args] = commands[index]
13485
13489
  return new Promise((resolve, reject) => {
13486
- const child = spawn(file, args, { stdio: 'inherit' })
13490
+ const child = spawn(file, args, { stdio: ['ignore', 'pipe', 'inherit'] })
13491
+ const metadata = []
13492
+ let pending = ''
13493
+ child.stdout.setEncoding('utf8')
13494
+ child.stdout.on('data', (chunk) => {
13495
+ const text = pending + chunk
13496
+ let start = 0
13497
+ for (let nl = text.indexOf('\\n'); nl !== -1; nl = text.indexOf('\\n', start)) {
13498
+ if (text.charCodeAt(start) === 33) metadata.push(text.slice(start, nl))
13499
+ start = nl + 1
13500
+ }
13501
+ pending = text.slice(start)
13502
+ })
13487
13503
  child.on('error', reject)
13488
- child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
13504
+ child.on('close', (code) => {
13505
+ if (pending.charCodeAt(0) === 33) metadata.push(pending)
13506
+ if (code === 0) {
13507
+ results[index] = metadata.join('\\n')
13508
+ resolve()
13509
+ } else reject(new Error('clang link replay failed: ' + file))
13510
+ })
13489
13511
  }).then(run)
13490
13512
  }
13491
13513
  const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
13492
- Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
13493
- console.error(error.message)
13494
- process.exit(1)
13495
- })
13514
+ Promise.all(Array.from({ length: jobs }, run))
13515
+ .then(() => {
13516
+ fs.writeFileSync(process.env.PEACH_CLANG_RESULTS, JSON.stringify(results))
13517
+ })
13518
+ .catch((error) => {
13519
+ console.error(error.message)
13520
+ process.exit(1)
13521
+ })
13496
13522
  `;
13497
13523
  function clangProducerStamp(file) {
13498
13524
  const stat = statSync(file, { bigint: true });
13499
13525
  return [stat.dev, stat.ino, stat.size, stat.mtimeNs, stat.ctimeNs].join(":");
13500
13526
  }
13527
+ function clangBinaryStamp(file) {
13528
+ const stat = statSync(file, { bigint: true });
13529
+ return [file, stat.size, stat.mtimeNs].join(":");
13530
+ }
13531
+ function clangWrapperStamp(file) {
13532
+ return createHash12("sha256").update(readFileSync11(file)).digest("hex");
13533
+ }
13534
+ function clangArgsNeedCwd(args) {
13535
+ const pathFlags = /* @__PURE__ */ new Set([
13536
+ "-I",
13537
+ "-isystem",
13538
+ "-iquote",
13539
+ "-F",
13540
+ "-iframework",
13541
+ "-isysroot",
13542
+ "-o",
13543
+ "-MF"
13544
+ ]);
13545
+ const includeFlags = /* @__PURE__ */ new Set(["-include", "-imacros"]);
13546
+ const valueFlags = /* @__PURE__ */ new Set([
13547
+ "-x",
13548
+ "-target",
13549
+ "-MT",
13550
+ "-MQ",
13551
+ "-D",
13552
+ "-U",
13553
+ "-mllvm",
13554
+ "-Xclang",
13555
+ "-arch",
13556
+ "-std"
13557
+ ]);
13558
+ const prefixFlags = [
13559
+ "-I",
13560
+ "-F",
13561
+ "-isystem",
13562
+ "-iquote",
13563
+ "--sysroot=",
13564
+ "-fmodule-map-file=",
13565
+ "-fmodules-cache-path="
13566
+ ];
13567
+ const isRelativePath = (value) => value.length > 0 && !value.startsWith("/") && !value.startsWith("=/") && value !== "-";
13568
+ for (let i = 1; i < args.length; i++) {
13569
+ const arg = args[i];
13570
+ if (pathFlags.has(arg)) {
13571
+ if (isRelativePath(args[++i] ?? "")) return true;
13572
+ continue;
13573
+ }
13574
+ if (includeFlags.has(arg)) {
13575
+ const value = args[++i] ?? "";
13576
+ if (isRelativePath(value) && (value.includes("/") || existsSync4(value))) return true;
13577
+ continue;
13578
+ }
13579
+ if (valueFlags.has(arg)) {
13580
+ i++;
13581
+ continue;
13582
+ }
13583
+ if (arg.startsWith("@")) {
13584
+ if (isRelativePath(arg.slice(1))) return true;
13585
+ continue;
13586
+ }
13587
+ if (arg.startsWith("-")) {
13588
+ if (arg.startsWith("-include") && arg.length > 8) {
13589
+ const value = arg.slice(8);
13590
+ if (isRelativePath(value) && (value.includes("/") || existsSync4(value)))
13591
+ return true;
13592
+ continue;
13593
+ }
13594
+ for (const prefix of prefixFlags) {
13595
+ if (arg.startsWith(prefix) && arg.length > prefix.length) {
13596
+ if (isRelativePath(arg.slice(prefix.length))) return true;
13597
+ break;
13598
+ }
13599
+ }
13600
+ continue;
13601
+ }
13602
+ if (isRelativePath(arg)) return true;
13603
+ }
13604
+ return false;
13605
+ }
13501
13606
  function validateClangLinkOptions(flags) {
13502
13607
  for (let index = 0; index < flags.length; index++) {
13503
13608
  const flag = flags[index];
@@ -13577,7 +13682,7 @@ function sourceGuestClangLinkOptions(options) {
13577
13682
  let clang;
13578
13683
  let clangStamp;
13579
13684
  let wrapperStamp;
13580
- for (const [index, file] of [...wanted].entries()) {
13685
+ for (const file of wanted) {
13581
13686
  const command = commands.get(file);
13582
13687
  if (!command) throw new Error(`missing source object producer ${file}`);
13583
13688
  if (command.tool === "shell") {
@@ -13591,12 +13696,12 @@ function sourceGuestClangLinkOptions(options) {
13591
13696
  throw new Error(`unsupported source object producer ${file}`);
13592
13697
  const key = createHash12("sha256").update(
13593
13698
  JSON.stringify([
13594
- "clang-link-options/v1",
13595
- process.cwd(),
13699
+ "clang-link-options/v2",
13700
+ clangArgsNeedCwd(command.args) ? process.cwd() : null,
13596
13701
  driverEnvironment,
13597
13702
  command.args,
13598
- clangStamp ?? (clangStamp = clangProducerStamp(clang)),
13599
- compiler === clang ? null : wrapperStamp ?? (wrapperStamp = clangProducerStamp(compiler)),
13703
+ clangStamp ?? (clangStamp = clangBinaryStamp(clang)),
13704
+ compiler === clang ? null : wrapperStamp ?? (wrapperStamp = clangWrapperStamp(compiler)),
13600
13705
  clangProducerStamp(file)
13601
13706
  ])
13602
13707
  ).digest("hex");
@@ -13611,31 +13716,44 @@ function sourceGuestClangLinkOptions(options) {
13611
13716
  continue;
13612
13717
  }
13613
13718
  result.set(file, []);
13614
- const args = command.args.slice(1).filter((arg) => arg !== "-c");
13615
13719
  const targetBuild = path21.relative(options.buildDirectory, file).split(path21.sep).findLast((part) => part !== ".build" && part.endsWith(".build"));
13616
- const outputDirectory = path21.join(
13617
- options.directory,
13618
- targetBuild ?? path21.basename(path21.dirname(file))
13619
- );
13620
- mkdirSync4(outputDirectory, { recursive: true });
13621
- const output = path21.join(outputDirectory, `clang-link-${index}.ll`);
13622
- for (const flag of ["-o", "-MF"]) {
13623
- const index2 = args.lastIndexOf(flag);
13624
- if (index2 < 0 || index2 + 1 >= args.length)
13625
- throw new Error(`missing clang ${flag} for ${file}`);
13626
- args[index2 + 1] = flag === "-o" ? output : `${output}.d`;
13720
+ const args = [];
13721
+ let sawOutput = false;
13722
+ let explicitModuleName = false;
13723
+ for (let i = 1; i < command.args.length; i++) {
13724
+ const arg = command.args[i];
13725
+ if (arg === "-c" || arg === "-MD" || arg === "-MMD" || arg === "-MP") continue;
13726
+ if (arg === "-MF" || arg === "-MT" || arg === "-MQ") {
13727
+ if (i + 1 >= command.args.length)
13728
+ throw new Error(`missing clang ${arg} for ${file}`);
13729
+ i++;
13730
+ continue;
13731
+ }
13732
+ if (arg === "-o") {
13733
+ if (i + 1 >= command.args.length) throw new Error(`missing clang -o for ${file}`);
13734
+ i++;
13735
+ args.push("-o", "-");
13736
+ sawOutput = true;
13737
+ continue;
13738
+ }
13739
+ if (arg.startsWith("-fmodule-name=")) explicitModuleName = true;
13740
+ args.push(arg);
13741
+ }
13742
+ if (!sawOutput) throw new Error(`missing clang -o for ${file}`);
13743
+ if (compiler !== clang && targetBuild && !explicitModuleName) {
13744
+ args.unshift(`-fmodule-name=${targetBuild.slice(0, -".build".length)}`);
13627
13745
  }
13628
13746
  replays.push({
13629
13747
  file,
13630
13748
  compiler: command.args[0],
13631
13749
  args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
13632
- output,
13633
13750
  cacheFile,
13634
13751
  key
13635
13752
  });
13636
13753
  }
13637
13754
  if (replays.length === 0) return result;
13638
13755
  const plan = path21.join(options.directory, "clang-link-replays.json");
13756
+ const resultsPath = path21.join(options.directory, "clang-link-results.json");
13639
13757
  writeFileSync5(
13640
13758
  plan,
13641
13759
  JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
@@ -13648,12 +13766,16 @@ function sourceGuestClangLinkOptions(options) {
13648
13766
  ...process.env,
13649
13767
  [PEACH_FORKED_SCRIPT_ENV]: "1",
13650
13768
  PEACH_CLANG_REPLAYS: plan,
13769
+ PEACH_CLANG_RESULTS: resultsPath,
13651
13770
  PEACH_CLANG_JOBS: String(options.jobs)
13652
13771
  }
13653
13772
  });
13773
+ const replayMetadata = JSON.parse(readFileSync11(resultsPath, "utf8"));
13774
+ if (!Array.isArray(replayMetadata) || replayMetadata.length !== replays.length || !replayMetadata.every((item) => typeof item === "string"))
13775
+ throw new Error("invalid clang link replay results");
13654
13776
  mkdirSync4(cacheDirectory, { recursive: true });
13655
- for (const { file, output, cacheFile, key } of replays) {
13656
- const flags = clangIrLinkOptions(readFileSync11(output, "utf8"));
13777
+ for (const [index, { file, cacheFile, key }] of replays.entries()) {
13778
+ const flags = clangIrLinkOptions(replayMetadata[index]);
13657
13779
  validateClangLinkOptions(flags);
13658
13780
  const temporary = `${cacheFile}.${process.pid}`;
13659
13781
  writeFileSync5(temporary, JSON.stringify({ key, flags }));
@@ -14213,7 +14335,7 @@ async function compileGuestLink(options) {
14213
14335
  };
14214
14336
  const sdk = options.sdkImage;
14215
14337
  const sdkCallers = sdk?.sdkInterface.guestCallers;
14216
- const sdkObjects = sdk ? (await import("./swift-sdk-image-WAC7GG2R.mjs")).readSwiftSdkManifestIndex(sdk).guestObjects : void 0;
14338
+ const sdkObjects = sdk ? (await import("./swift-sdk-image-7T2LMQS5.mjs")).readSwiftSdkManifestIndex(sdk).guestObjects : void 0;
14217
14339
  if (sdk && (!sdkCallers || !sdkObjects))
14218
14340
  throw new Error("the SDK image has no guest link manifest");
14219
14341
  const result = linkPrunedGuestImages({
@@ -14311,13 +14433,19 @@ async function compileGuestLink(options) {
14311
14433
  const selectedSource = source.artifacts.filter(
14312
14434
  (artifact) => selected.has(path24.resolve(rewritten.get(artifact.path) ?? artifact.path))
14313
14435
  );
14436
+ const admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
14437
+ const linuxMemory = process.env.TM_EXEC_ADMITTED === "1" && process.env.LINUX_BUILD_SCOPE ? Number(process.env.TM_EXEC_LINUX_MEMORY_MAX) : NaN;
14438
+ const clangReplayJobs = Number.isInteger(admittedCores) && admittedCores > 0 ? Math.min(
14439
+ admittedCores,
14440
+ Number.isSafeInteger(linuxMemory) && linuxMemory > 0 ? Math.max(options.jobs, Math.floor(linuxMemory / (512 * 1024 ** 2))) : Math.max(options.jobs, admittedCores)
14441
+ ) : options.jobs;
14314
14442
  const clangOptions2 = sourceGuestClangLinkOptions({
14315
14443
  buildDirectory: options.buildDirectory,
14316
14444
  directory,
14317
14445
  toolchainBin: options.toolchainBin,
14318
14446
  swiftCompiler: options.swiftCompiler,
14319
14447
  objects: selectedSource.map((artifact) => artifact.path),
14320
- jobs: options.jobs
14448
+ jobs: clangReplayJobs
14321
14449
  });
14322
14450
  const links = sourceGuestRuntimeLinks({
14323
14451
  toolchainBin: options.toolchainBin,
@@ -14499,8 +14627,9 @@ async function compileGuestLink(options) {
14499
14627
  createSwiftSdkBinding,
14500
14628
  finishSwiftAppModule,
14501
14629
  linkSwiftAppModule,
14502
- readSwiftSdkUsage
14503
- } = await import("./swift-sdk-app-module-6H3G6AXD.mjs");
14630
+ readSwiftSdkUsage,
14631
+ swiftSdkProjectionSpans
14632
+ } = await import("./swift-sdk-app-module-5IUSRXYA.mjs");
14504
14633
  const project = options.project;
14505
14634
  const work = project ? mkdtempSync2(path24.join(directory, "app-module-")) : path24.join(directory, "app-module");
14506
14635
  if (project) chownSync(work, project.uid, project.gid);
@@ -14521,7 +14650,28 @@ async function compileGuestLink(options) {
14521
14650
  }
14522
14651
  const usage = readSwiftSdkUsage(result.mapPath, options.output, sdkObjectKeys);
14523
14652
  const linkedModule = path24.join(work, "app.wasm");
14653
+ const sdkSpans = swiftSdkProjectionSpans(
14654
+ sdk,
14655
+ (object2, product) => sdkObjectImages.get(object2) ?? sdkProductImages.get(product)
14656
+ );
14524
14657
  let storage = reserved;
14658
+ if (sdkSpans.length > 0) {
14659
+ const sdkCounts = guestProjectionRegionCounts(storage.images.length, sdkSpans);
14660
+ storage = reserveGuestProjectionStorage(
14661
+ storage.images,
14662
+ storage.capacities.map((capacity, index) => ({
14663
+ ...capacity,
14664
+ regions: capacity.regions + sdkCounts[index] + 16
14665
+ }))
14666
+ );
14667
+ const projectionSource = path24.join(work, "projection.c");
14668
+ writeFileSync6(projectionSource, storage.source);
14669
+ execFileSync10(
14670
+ path24.join(options.toolchainBin, "clang"),
14671
+ [...clangOptions, "-c", projectionSource, "-o", projectionObject],
14672
+ { stdio: "pipe" }
14673
+ );
14674
+ }
14525
14675
  for (; ; ) {
14526
14676
  const link = await linkSwiftAppModule({
14527
14677
  objects: [...owners.keys()],
@@ -14559,11 +14709,7 @@ async function compileGuestLink(options) {
14559
14709
  bindingRows.set((address - values.address) / 8, value);
14560
14710
  } else data.push(address, size, value);
14561
14711
  }
14562
- const sdkSpans = [];
14563
- const binding = createSwiftSdkBinding({ ...link.linkage, data }, sdk, usage, {
14564
- imageFor: (object2, product) => sdkObjectImages.get(object2) ?? sdkProductImages.get(product),
14565
- spans: sdkSpans
14566
- });
14712
+ const binding = createSwiftSdkBinding({ ...link.linkage, data }, sdk, usage);
14567
14713
  const linked = readFileSync13(
14568
14714
  project ? projectOutputFile(work, linkedModule, project) : linkedModule
14569
14715
  );
@@ -17060,7 +17206,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
17060
17206
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
17061
17207
  var MULTI_MANIFEST_VERSION = 76;
17062
17208
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
17063
- var compilerSourceDigest = true ? "7b91fa4405159335b5484c82700e001e4c27abf15621b724ea8af4edea693f66" : swiftCompilerSourceDigest(import.meta.dirname);
17209
+ var compilerSourceDigest = true ? "d4cf22b53d08266bf9bd0238bffe899805f62daeb3d628664ee351830e496cda" : swiftCompilerSourceDigest(import.meta.dirname);
17064
17210
  function swiftArtifactHash(input, release, moduleRoot) {
17065
17211
  return swiftCompileInputHash(input, release).update(swiftModuleDigest(moduleRoot)).digest("hex");
17066
17212
  }
@@ -21661,7 +21807,7 @@ async function compileSwiftProjectOnce(sources, options) {
21661
21807
  const distribution = swiftDistributionAt(moduleRoot);
21662
21808
  const mirrorDistribution = options.linkOnly || options.project ? null : distribution;
21663
21809
  if (distribution) refreshSwiftCacheHold(moduleRoot);
21664
- const input = distribution && !options.intermediates ? (await import("./swift-package-prebuilt-5XDZ2HZZ.mjs")).useSwiftPackagePrebuilts(
21810
+ const input = distribution && !options.intermediates ? (await import("./swift-package-prebuilt-4N5CXBOZ.mjs")).useSwiftPackagePrebuilts(
21665
21811
  sources,
21666
21812
  moduleRoot,
21667
21813
  options.toolchainBin
@@ -21675,7 +21821,7 @@ async function compileSwiftProjectOnce(sources, options) {
21675
21821
  multi: compileTargets(input).length > 0
21676
21822
  };
21677
21823
  const sdkModule = options.sdkModule && !options.linkOnly;
21678
- const sdkImage = sdkModule ? await (await import("./swift-sdk-image-WAC7GG2R.mjs")).buildSwiftSdkImage(
21824
+ const sdkImage = sdkModule ? await (await import("./swift-sdk-image-7T2LMQS5.mjs")).buildSwiftSdkImage(
21679
21825
  moduleRoot,
21680
21826
  !!guestGraph,
21681
21827
  distribution ? [] : linkedFrameworkTargets(moduleRoot, input).imports,
@@ -22332,7 +22478,7 @@ ${cap}` : "";
22332
22478
  if (sdkImage && binding)
22333
22479
  sdkAsset = { key: sdkImage.key, sha256: sdkImage.sha256, binding };
22334
22480
  } else if (sdkImage) {
22335
- const { buildSwiftAppModule } = await import("./swift-sdk-app-module-6H3G6AXD.mjs");
22481
+ const { buildSwiftAppModule } = await import("./swift-sdk-app-module-5IUSRXYA.mjs");
22336
22482
  const binding = await buildSwiftAppModule({
22337
22483
  buildRoot: root,
22338
22484
  toolchainBin: options.toolchainBin,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2590 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2591 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2590 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2591 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2590 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./chunk-NZY4GOG5.mjs";
1
+ /*! peach v0.1.2591 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./chunk-4QHHRGO4.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-65FNEARV.mjs");
11
+ const { Parser } = await import("./acorn-EMX4WZ72.mjs");
12
12
  metroLayoutParser = Parser.extend(
13
13
  (Base) => {
14
14
  const parseFunctionBody = Reflect.get(Base.prototype, "parseFunctionBody");
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2590 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2591 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  compileTargets,
4
4
  fetchNativeEntry,
@@ -6,19 +6,19 @@ import {
6
6
  swiftAvailableModules,
7
7
  swiftDistributionAt,
8
8
  swiftImportNames
9
- } from "./chunk-4VCRUQ36.mjs";
10
- import "./chunk-JG4AANWA.mjs";
9
+ } from "./chunk-VYZ5DC3M.mjs";
10
+ import "./chunk-ILWFGZWW.mjs";
11
11
  import {
12
12
  SWIFT_REMOTE_PACKAGES_DIR
13
- } from "./chunk-5GNGHM5B.mjs";
13
+ } from "./chunk-SOAYP72T.mjs";
14
14
  import {
15
15
  manifestCalls
16
- } from "./chunk-GBD26EBV.mjs";
17
- import "./chunk-RGC2JNCL.mjs";
18
- import "./chunk-ADKUIQXX.mjs";
19
- import "./chunk-YPPH6F77.mjs";
20
- import "./chunk-WPDY5IAD.mjs";
21
- import "./chunk-NZY4GOG5.mjs";
16
+ } from "./chunk-YR6DNV76.mjs";
17
+ import "./chunk-MC6NMYWY.mjs";
18
+ import "./chunk-JHXDM3YU.mjs";
19
+ import "./chunk-TFG4LZ5T.mjs";
20
+ import "./chunk-EGKH2L6J.mjs";
21
+ import "./chunk-4QHHRGO4.mjs";
22
22
 
23
23
  // src/swift-package-prebuilt.ts
24
24
  import { createHash } from "node:crypto";