peachsim 0.1.2422 → 0.1.2425

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 (112) hide show
  1. package/cli/command-agent.ts +14 -15
  2. package/cli/commands/box.ts +33 -28
  3. package/cli/commands/canvas.ts +54 -0
  4. package/cli/commands/platform.ts +28 -27
  5. package/cli/commands/preview.ts +2 -1
  6. package/cli/outbound-endpoints.ts +141 -23
  7. package/dist-lib/agent-daemon-client.cjs +1 -1
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -1
  10. package/dist-lib/auth/shared-session.cjs +1 -1
  11. package/dist-lib/backend-origin.cjs +1 -1
  12. package/dist-lib/beta.cjs +1 -1
  13. package/dist-lib/beta.mjs +1 -1
  14. package/dist-lib/bridge-constants.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.mjs +1 -1
  17. package/dist-lib/bridge-contract.cjs +1 -1
  18. package/dist-lib/bridge-contract.mjs +1 -1
  19. package/dist-lib/bundle-channel.cjs +114 -28
  20. package/dist-lib/capture-contract.cjs +1 -1
  21. package/dist-lib/capture-contract.mjs +1 -1
  22. package/dist-lib/cloud-contract.cjs +22 -1
  23. package/dist-lib/cloud-contract.mjs +20 -1
  24. package/dist-lib/cloud-test-args.cjs +1 -1
  25. package/dist-lib/cloud-test-args.mjs +1 -1
  26. package/dist-lib/cloud.cjs +1 -1
  27. package/dist-lib/cloud.mjs +1 -1
  28. package/dist-lib/config.cjs +1 -1
  29. package/dist-lib/config.mjs +1 -1
  30. package/dist-lib/detox/index.cjs +27 -13
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/expo-swift-bundle.cjs +112 -26
  33. package/dist-lib/expo-swift-metadata.cjs +1 -1
  34. package/dist-lib/expo-swift-metadata.mjs +1 -1
  35. package/dist-lib/home-paths.cjs +1 -1
  36. package/dist-lib/host/bridge-host.cjs +114 -28
  37. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  38. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  39. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  40. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  41. package/dist-lib/host/websocket-proxy.cjs +1 -1
  42. package/dist-lib/index.cjs +88 -59
  43. package/dist-lib/jump-to-source-babel.cjs +1 -1
  44. package/dist-lib/jump-to-source-native.cjs +22 -7
  45. package/dist-lib/kotlin-host.cjs +1 -1
  46. package/dist-lib/menu.cjs +1 -1
  47. package/dist-lib/menu.mjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  49. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  50. package/dist-lib/metro-production-bundle.cjs +1 -1
  51. package/dist-lib/metro-production-bundle.mjs +1 -1
  52. package/dist-lib/metro.cjs +25 -10
  53. package/dist-lib/native-app-identity-project.cjs +2 -2
  54. package/dist-lib/native-app-identity-project.mjs +2 -2
  55. package/dist-lib/native-app-identity.cjs +1 -1
  56. package/dist-lib/native-app-identity.mjs +1 -1
  57. package/dist-lib/native-firebase-metadata.cjs +1 -1
  58. package/dist-lib/native-firebase-metadata.mjs +1 -1
  59. package/dist-lib/pdfium-raster.cjs +1 -1
  60. package/dist-lib/pdfium-raster.mjs +1 -1
  61. package/dist-lib/plist.cjs +1 -1
  62. package/dist-lib/plist.mjs +1 -1
  63. package/dist-lib/profiles.cjs +1 -1
  64. package/dist-lib/public-brand.cjs +1 -1
  65. package/dist-lib/public-origins-lib-esm.json +24 -24
  66. package/dist-lib/public-origins-lib.json +54 -53
  67. package/dist-lib/react-native-host-modules.cjs +1 -1
  68. package/dist-lib/react-native-host-modules.mjs +1 -1
  69. package/dist-lib/reap-browser.cjs +1 -1
  70. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  71. package/dist-lib/sdk.cjs +1 -1
  72. package/dist-lib/sdk.mjs +1 -1
  73. package/dist-lib/skills.cjs +258 -150
  74. package/dist-lib/swift-compile.cjs +87 -16
  75. package/dist-lib/swift-compile.mjs +87 -16
  76. package/dist-lib/swift-package.cjs +1 -1
  77. package/dist-lib/swift-package.mjs +1 -1
  78. package/dist-lib/swift-submit.cjs +1 -1
  79. package/dist-lib/swift-submit.mjs +1 -1
  80. package/dist-lib/swift-toolchain.cjs +1 -1
  81. package/dist-lib/swift.cjs +1 -1
  82. package/dist-lib/vite-swift.cjs +88 -17
  83. package/dist-lib/vite.cjs +25 -10
  84. package/dist-lib/worklet-executable.cjs +1 -1
  85. package/dist-lib/worklet-executable.mjs +1 -1
  86. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +83 -2
  87. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  88. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -0
  89. package/dist-types/packages/peach-globals/src/canvasAgentContract.d.ts +8 -0
  90. package/dist-types/packages/peach-globals/src/index.d.ts +4 -2
  91. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  92. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +12 -0
  93. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +5 -1
  94. package/kotlin/README.md +4 -3
  95. package/kotlin/sdk.tar.gz +0 -0
  96. package/kotlin/toolchain.json +2 -2
  97. package/package.json +1 -1
  98. package/runtime-companion.json +1 -1
  99. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes +2 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h +2 -0
  101. package/sdk/ios/wasm/include/errno.h +10 -0
  102. package/src/agent-daemon-client.ts +1 -1
  103. package/src/agent-prompt.ts +1 -8
  104. package/src/canvas-agent-note-delivery.ts +2 -5
  105. package/src/canvas-groups.ts +11 -3
  106. package/src/cloud-contract.ts +31 -1
  107. package/src/swift-compile.ts +1 -1
  108. package/src/swift-guest-compile.ts +2 -0
  109. package/src/swift-guest-image-ledger.ts +37 -2
  110. package/src/swift-guest-source-inputs.ts +45 -6
  111. package/src/visit-parsed-program.ts +21 -6
  112. package/src/vite-plugin.ts +4 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -7147,6 +7147,7 @@ function llvmType(value) {
7147
7147
  }
7148
7148
  }
7149
7149
  var OBJC_INIT_RECORD = ".objc_init";
7150
+ var OBJC_LOAD_FUNCTION = ".objcv2_load_function";
7150
7151
  function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLookups, preserveCanonical) {
7151
7152
  if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
7152
7153
  throw new Error("expected wasm object");
@@ -7256,7 +7257,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7256
7257
  if (sectionName === "linking") {
7257
7258
  const version2 = number3();
7258
7259
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
7259
- const parts = [encodedString(sectionName), encodeNumber(version2)];
7260
+ const subsections = [];
7261
+ let objcLoader;
7260
7262
  while (offset < section.length) {
7261
7263
  const kind = section[offset++];
7262
7264
  const length = number3();
@@ -7319,6 +7321,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7319
7321
  }
7320
7322
  } else if (symbolKind === 3) number3();
7321
7323
  else throw new Error("unsupported wasm symbol kind");
7324
+ if (name2 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
7325
+ objcLoader = i;
7326
+ }
7322
7327
  const alias = names.get(name2);
7323
7328
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name2);
7324
7329
  if ((name2 === "dlsym" && usesDlsym || name2 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -7368,7 +7373,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7368
7373
  content = Buffer.concat([...entries, ...extraEntries]);
7369
7374
  }
7370
7375
  offset = stop;
7371
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
7376
+ subsections.push({ kind, content });
7377
+ }
7378
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
7379
+ for (const subsection of subsections) {
7380
+ let content = subsection.content;
7381
+ if (subsection.kind === 6 && objcLoader !== void 0) {
7382
+ const [count, entriesStart] = readNumber(content, 0);
7383
+ const entries = [content.subarray(0, entriesStart)];
7384
+ let entryStart = entriesStart;
7385
+ for (let i = 0; i < count; i++) {
7386
+ const [, symbolStart] = readNumber(content, entryStart);
7387
+ const [symbol, entryEnd] = readNumber(content, symbolStart);
7388
+ if (symbol === objcLoader) entries.push(encodeNumber(1));
7389
+ entries.push(
7390
+ content.subarray(
7391
+ symbol === objcLoader ? symbolStart : entryStart,
7392
+ entryEnd
7393
+ )
7394
+ );
7395
+ entryStart = entryEnd;
7396
+ }
7397
+ if (entryStart !== content.length)
7398
+ throw new Error("invalid init functions subsection");
7399
+ content = Buffer.concat(entries);
7400
+ }
7401
+ parts.push(
7402
+ Buffer.from([subsection.kind]),
7403
+ encodeNumber(content.length),
7404
+ content
7405
+ );
7372
7406
  }
7373
7407
  section = Buffer.concat(parts);
7374
7408
  }
@@ -10206,6 +10240,25 @@ function clangIrLinkOptions(ir) {
10206
10240
  return result;
10207
10241
  }
10208
10242
  var CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
10243
+ var PARALLEL_REPLAY = `
10244
+ const { spawn } = require('node:child_process')
10245
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
10246
+ let next = 0
10247
+ const run = () => {
10248
+ if (next >= commands.length) return Promise.resolve()
10249
+ const [file, ...args] = commands[next++]
10250
+ return new Promise((resolve, reject) => {
10251
+ const child = spawn(file, args, { stdio: 'inherit' })
10252
+ child.on('error', reject)
10253
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
10254
+ }).then(run)
10255
+ }
10256
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
10257
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
10258
+ console.error(error.message)
10259
+ process.exit(1)
10260
+ })
10261
+ `;
10209
10262
  function sourceGuestClangLinkOptions(options) {
10210
10263
  const wanted = new Set(options.objects.map((file) => import_node_path15.default.resolve(file)));
10211
10264
  const commands = /* @__PURE__ */ new Map();
@@ -10239,7 +10292,7 @@ function sourceGuestClangLinkOptions(options) {
10239
10292
  commands.set(file, { tool, args: value });
10240
10293
  }
10241
10294
  }
10242
- const result = /* @__PURE__ */ new Map();
10295
+ const replays = [];
10243
10296
  for (const [index, file] of [...wanted].entries()) {
10244
10297
  const command = commands.get(file);
10245
10298
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -10265,16 +10318,33 @@ function sourceGuestClangLinkOptions(options) {
10265
10318
  throw new Error(`missing clang ${flag} for ${file}`);
10266
10319
  args[index2 + 1] = flag === "-o" ? output : `${output}.d`;
10267
10320
  }
10268
- (0, import_node_child_process11.execFileSync)(
10269
- command.args[0],
10270
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
10271
- { stdio: "inherit" }
10272
- );
10321
+ replays.push({
10322
+ file,
10323
+ compiler: command.args[0],
10324
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
10325
+ output
10326
+ });
10327
+ }
10328
+ const plan = import_node_path15.default.join(options.directory, "clang-link-replays.json");
10329
+ (0, import_node_fs15.writeFileSync)(
10330
+ plan,
10331
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
10332
+ );
10333
+ (0, import_node_child_process11.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
10334
+ stdio: "inherit",
10335
+ env: {
10336
+ ...process.env,
10337
+ PEACH_CLANG_REPLAYS: plan,
10338
+ PEACH_CLANG_JOBS: String(options.jobs)
10339
+ }
10340
+ });
10341
+ const result = /* @__PURE__ */ new Map();
10342
+ for (const { file, output } of replays) {
10273
10343
  const flags = clangIrLinkOptions((0, import_node_fs15.readFileSync)(output, "utf8"));
10274
- for (let index2 = 0; index2 < flags.length; index2++) {
10275
- const flag = flags[index2];
10344
+ for (let index = 0; index < flags.length; index++) {
10345
+ const flag = flags[index];
10276
10346
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
10277
- const name2 = flags[++index2];
10347
+ const name2 = flags[++index];
10278
10348
  if (!name2 || name2.startsWith("-"))
10279
10349
  throw new Error(`missing clang link name after ${flag}`);
10280
10350
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -11339,7 +11409,8 @@ async function compileGuestLink(options) {
11339
11409
  directory,
11340
11410
  toolchainBin: options.toolchainBin,
11341
11411
  swiftCompiler: options.swiftCompiler,
11342
- objects: selectedSource.map((artifact) => artifact.path)
11412
+ objects: selectedSource.map((artifact) => artifact.path),
11413
+ jobs: options.jobs
11343
11414
  });
11344
11415
  const links = sourceGuestRuntimeLinks({
11345
11416
  toolchainBin: options.toolchainBin,
@@ -13985,7 +14056,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
13985
14056
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
13986
14057
  var MULTI_MANIFEST_VERSION = 72;
13987
14058
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
13988
- var compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
14059
+ var compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
13989
14060
  function swiftArtifactHash(input, release, moduleRoot) {
13990
14061
  const hash = (0, import_node_crypto15.createHash)("sha256");
13991
14062
  hash.update(`swift-compile
@@ -14836,7 +14907,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
14836
14907
  "NSSwappedDouble",
14837
14908
  "NSSwappedFloat",
14838
14909
  "NSUbiquitousKeyValueStore",
14839
- "NSValueTransformerName",
14840
14910
  "NSXPCCoder",
14841
14911
  "NSXPCConnection",
14842
14912
  "NSXPCInterface",
@@ -18841,7 +18911,8 @@ function compileSwiftProjectOnce(input, options) {
18841
18911
  generatedOwners: preparation.generatedOwners,
18842
18912
  output,
18843
18913
  optimized,
18844
- optimize: input.optimize === true
18914
+ optimize: input.optimize === true,
18915
+ jobs: swiftBuildJobs()
18845
18916
  });
18846
18917
  else
18847
18918
  await lowerWasm(output, optimized, { optimize: input.optimize === true });
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -7101,6 +7101,7 @@ function llvmType(value) {
7101
7101
  }
7102
7102
  }
7103
7103
  var OBJC_INIT_RECORD = ".objc_init";
7104
+ var OBJC_LOAD_FUNCTION = ".objcv2_load_function";
7104
7105
  function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLookups, preserveCanonical) {
7105
7106
  if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
7106
7107
  throw new Error("expected wasm object");
@@ -7210,7 +7211,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7210
7211
  if (sectionName === "linking") {
7211
7212
  const version2 = number3();
7212
7213
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
7213
- const parts = [encodedString(sectionName), encodeNumber(version2)];
7214
+ const subsections = [];
7215
+ let objcLoader;
7214
7216
  while (offset < section.length) {
7215
7217
  const kind = section[offset++];
7216
7218
  const length = number3();
@@ -7273,6 +7275,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7273
7275
  }
7274
7276
  } else if (symbolKind === 3) number3();
7275
7277
  else throw new Error("unsupported wasm symbol kind");
7278
+ if (name2 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
7279
+ objcLoader = i;
7280
+ }
7276
7281
  const alias = names.get(name2);
7277
7282
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name2);
7278
7283
  if ((name2 === "dlsym" && usesDlsym || name2 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -7322,7 +7327,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
7322
7327
  content = Buffer.concat([...entries, ...extraEntries]);
7323
7328
  }
7324
7329
  offset = stop;
7325
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
7330
+ subsections.push({ kind, content });
7331
+ }
7332
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
7333
+ for (const subsection of subsections) {
7334
+ let content = subsection.content;
7335
+ if (subsection.kind === 6 && objcLoader !== void 0) {
7336
+ const [count, entriesStart] = readNumber(content, 0);
7337
+ const entries = [content.subarray(0, entriesStart)];
7338
+ let entryStart = entriesStart;
7339
+ for (let i = 0; i < count; i++) {
7340
+ const [, symbolStart] = readNumber(content, entryStart);
7341
+ const [symbol, entryEnd] = readNumber(content, symbolStart);
7342
+ if (symbol === objcLoader) entries.push(encodeNumber(1));
7343
+ entries.push(
7344
+ content.subarray(
7345
+ symbol === objcLoader ? symbolStart : entryStart,
7346
+ entryEnd
7347
+ )
7348
+ );
7349
+ entryStart = entryEnd;
7350
+ }
7351
+ if (entryStart !== content.length)
7352
+ throw new Error("invalid init functions subsection");
7353
+ content = Buffer.concat(entries);
7354
+ }
7355
+ parts.push(
7356
+ Buffer.from([subsection.kind]),
7357
+ encodeNumber(content.length),
7358
+ content
7359
+ );
7326
7360
  }
7327
7361
  section = Buffer.concat(parts);
7328
7362
  }
@@ -10161,6 +10195,25 @@ function clangIrLinkOptions(ir) {
10161
10195
  return result;
10162
10196
  }
10163
10197
  var CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
10198
+ var PARALLEL_REPLAY = `
10199
+ const { spawn } = require('node:child_process')
10200
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
10201
+ let next = 0
10202
+ const run = () => {
10203
+ if (next >= commands.length) return Promise.resolve()
10204
+ const [file, ...args] = commands[next++]
10205
+ return new Promise((resolve, reject) => {
10206
+ const child = spawn(file, args, { stdio: 'inherit' })
10207
+ child.on('error', reject)
10208
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
10209
+ }).then(run)
10210
+ }
10211
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
10212
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
10213
+ console.error(error.message)
10214
+ process.exit(1)
10215
+ })
10216
+ `;
10164
10217
  function sourceGuestClangLinkOptions(options) {
10165
10218
  const wanted = new Set(options.objects.map((file) => path17.resolve(file)));
10166
10219
  const commands = /* @__PURE__ */ new Map();
@@ -10194,7 +10247,7 @@ function sourceGuestClangLinkOptions(options) {
10194
10247
  commands.set(file, { tool, args: value });
10195
10248
  }
10196
10249
  }
10197
- const result = /* @__PURE__ */ new Map();
10250
+ const replays = [];
10198
10251
  for (const [index, file] of [...wanted].entries()) {
10199
10252
  const command = commands.get(file);
10200
10253
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -10220,16 +10273,33 @@ function sourceGuestClangLinkOptions(options) {
10220
10273
  throw new Error(`missing clang ${flag} for ${file}`);
10221
10274
  args[index2 + 1] = flag === "-o" ? output : `${output}.d`;
10222
10275
  }
10223
- execFileSync8(
10224
- command.args[0],
10225
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
10226
- { stdio: "inherit" }
10227
- );
10276
+ replays.push({
10277
+ file,
10278
+ compiler: command.args[0],
10279
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
10280
+ output
10281
+ });
10282
+ }
10283
+ const plan = path17.join(options.directory, "clang-link-replays.json");
10284
+ writeFileSync4(
10285
+ plan,
10286
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
10287
+ );
10288
+ execFileSync8(process.execPath, ["-e", PARALLEL_REPLAY], {
10289
+ stdio: "inherit",
10290
+ env: {
10291
+ ...process.env,
10292
+ PEACH_CLANG_REPLAYS: plan,
10293
+ PEACH_CLANG_JOBS: String(options.jobs)
10294
+ }
10295
+ });
10296
+ const result = /* @__PURE__ */ new Map();
10297
+ for (const { file, output } of replays) {
10228
10298
  const flags = clangIrLinkOptions(readFileSync11(output, "utf8"));
10229
- for (let index2 = 0; index2 < flags.length; index2++) {
10230
- const flag = flags[index2];
10299
+ for (let index = 0; index < flags.length; index++) {
10300
+ const flag = flags[index];
10231
10301
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
10232
- const name2 = flags[++index2];
10302
+ const name2 = flags[++index];
10233
10303
  if (!name2 || name2.startsWith("-"))
10234
10304
  throw new Error(`missing clang link name after ${flag}`);
10235
10305
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -11302,7 +11372,8 @@ async function compileGuestLink(options) {
11302
11372
  directory,
11303
11373
  toolchainBin: options.toolchainBin,
11304
11374
  swiftCompiler: options.swiftCompiler,
11305
- objects: selectedSource.map((artifact) => artifact.path)
11375
+ objects: selectedSource.map((artifact) => artifact.path),
11376
+ jobs: options.jobs
11306
11377
  });
11307
11378
  const links = sourceGuestRuntimeLinks({
11308
11379
  toolchainBin: options.toolchainBin,
@@ -13984,7 +14055,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
13984
14055
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
13985
14056
  var MULTI_MANIFEST_VERSION = 72;
13986
14057
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
13987
- var compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(import.meta.dirname);
14058
+ var compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(import.meta.dirname);
13988
14059
  function swiftArtifactHash(input, release, moduleRoot) {
13989
14060
  const hash = createHash15("sha256");
13990
14061
  hash.update(`swift-compile
@@ -14835,7 +14906,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
14835
14906
  "NSSwappedDouble",
14836
14907
  "NSSwappedFloat",
14837
14908
  "NSUbiquitousKeyValueStore",
14838
- "NSValueTransformerName",
14839
14909
  "NSXPCCoder",
14840
14910
  "NSXPCConnection",
14841
14911
  "NSXPCInterface",
@@ -18840,7 +18910,8 @@ function compileSwiftProjectOnce(input, options) {
18840
18910
  generatedOwners: preparation.generatedOwners,
18841
18911
  output,
18842
18912
  optimized,
18843
- optimize: input.optimize === true
18913
+ optimize: input.optimize === true,
18914
+ jobs: swiftBuildJobs()
18844
18915
  });
18845
18916
  else
18846
18917
  await lowerWasm(output, optimized, { optimize: input.optimize === true });
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -12215,6 +12215,7 @@ function llvmType(value) {
12215
12215
  }
12216
12216
  }
12217
12217
  var OBJC_INIT_RECORD = ".objc_init";
12218
+ var OBJC_LOAD_FUNCTION = ".objcv2_load_function";
12218
12219
  function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLookups, preserveCanonical) {
12219
12220
  if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
12220
12221
  throw new Error("expected wasm object");
@@ -12324,7 +12325,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12324
12325
  if (sectionName === "linking") {
12325
12326
  const version2 = number3();
12326
12327
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
12327
- const parts = [encodedString(sectionName), encodeNumber(version2)];
12328
+ const subsections = [];
12329
+ let objcLoader;
12328
12330
  while (offset < section.length) {
12329
12331
  const kind = section[offset++];
12330
12332
  const length = number3();
@@ -12387,6 +12389,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12387
12389
  }
12388
12390
  } else if (symbolKind === 3) number3();
12389
12391
  else throw new Error("unsupported wasm symbol kind");
12392
+ if (name3 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
12393
+ objcLoader = i;
12394
+ }
12390
12395
  const alias = names.get(name3);
12391
12396
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name3);
12392
12397
  if ((name3 === "dlsym" && usesDlsym || name3 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -12436,7 +12441,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12436
12441
  content = Buffer.concat([...entries, ...extraEntries]);
12437
12442
  }
12438
12443
  offset = stop;
12439
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
12444
+ subsections.push({ kind, content });
12445
+ }
12446
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
12447
+ for (const subsection of subsections) {
12448
+ let content = subsection.content;
12449
+ if (subsection.kind === 6 && objcLoader !== void 0) {
12450
+ const [count, entriesStart] = readNumber(content, 0);
12451
+ const entries = [content.subarray(0, entriesStart)];
12452
+ let entryStart = entriesStart;
12453
+ for (let i = 0; i < count; i++) {
12454
+ const [, symbolStart] = readNumber(content, entryStart);
12455
+ const [symbol2, entryEnd] = readNumber(content, symbolStart);
12456
+ if (symbol2 === objcLoader) entries.push(encodeNumber(1));
12457
+ entries.push(
12458
+ content.subarray(
12459
+ symbol2 === objcLoader ? symbolStart : entryStart,
12460
+ entryEnd
12461
+ )
12462
+ );
12463
+ entryStart = entryEnd;
12464
+ }
12465
+ if (entryStart !== content.length)
12466
+ throw new Error("invalid init functions subsection");
12467
+ content = Buffer.concat(entries);
12468
+ }
12469
+ parts.push(
12470
+ Buffer.from([subsection.kind]),
12471
+ encodeNumber(content.length),
12472
+ content
12473
+ );
12440
12474
  }
12441
12475
  section = Buffer.concat(parts);
12442
12476
  }
@@ -15274,6 +15308,25 @@ function clangIrLinkOptions(ir) {
15274
15308
  return result;
15275
15309
  }
15276
15310
  var CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
15311
+ var PARALLEL_REPLAY = `
15312
+ const { spawn } = require('node:child_process')
15313
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
15314
+ let next = 0
15315
+ const run = () => {
15316
+ if (next >= commands.length) return Promise.resolve()
15317
+ const [file, ...args] = commands[next++]
15318
+ return new Promise((resolve, reject) => {
15319
+ const child = spawn(file, args, { stdio: 'inherit' })
15320
+ child.on('error', reject)
15321
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
15322
+ }).then(run)
15323
+ }
15324
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
15325
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
15326
+ console.error(error.message)
15327
+ process.exit(1)
15328
+ })
15329
+ `;
15277
15330
  function sourceGuestClangLinkOptions(options) {
15278
15331
  const wanted = new Set(options.objects.map((file) => import_node_path17.default.resolve(file)));
15279
15332
  const commands = /* @__PURE__ */ new Map();
@@ -15307,7 +15360,7 @@ function sourceGuestClangLinkOptions(options) {
15307
15360
  commands.set(file, { tool, args: value });
15308
15361
  }
15309
15362
  }
15310
- const result = /* @__PURE__ */ new Map();
15363
+ const replays = [];
15311
15364
  for (const [index, file] of [...wanted].entries()) {
15312
15365
  const command = commands.get(file);
15313
15366
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -15333,16 +15386,33 @@ function sourceGuestClangLinkOptions(options) {
15333
15386
  throw new Error(`missing clang ${flag} for ${file}`);
15334
15387
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
15335
15388
  }
15336
- (0, import_node_child_process12.execFileSync)(
15337
- command.args[0],
15338
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
15339
- { stdio: "inherit" }
15340
- );
15389
+ replays.push({
15390
+ file,
15391
+ compiler: command.args[0],
15392
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
15393
+ output: output2
15394
+ });
15395
+ }
15396
+ const plan = import_node_path17.default.join(options.directory, "clang-link-replays.json");
15397
+ (0, import_node_fs17.writeFileSync)(
15398
+ plan,
15399
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
15400
+ );
15401
+ (0, import_node_child_process12.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
15402
+ stdio: "inherit",
15403
+ env: {
15404
+ ...process.env,
15405
+ PEACH_CLANG_REPLAYS: plan,
15406
+ PEACH_CLANG_JOBS: String(options.jobs)
15407
+ }
15408
+ });
15409
+ const result = /* @__PURE__ */ new Map();
15410
+ for (const { file, output: output2 } of replays) {
15341
15411
  const flags = clangIrLinkOptions((0, import_node_fs17.readFileSync)(output2, "utf8"));
15342
- for (let index2 = 0; index2 < flags.length; index2++) {
15343
- const flag = flags[index2];
15412
+ for (let index = 0; index < flags.length; index++) {
15413
+ const flag = flags[index];
15344
15414
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
15345
- const name3 = flags[++index2];
15415
+ const name3 = flags[++index];
15346
15416
  if (!name3 || name3.startsWith("-"))
15347
15417
  throw new Error(`missing clang link name after ${flag}`);
15348
15418
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -16429,7 +16499,8 @@ async function compileGuestLink(options) {
16429
16499
  directory,
16430
16500
  toolchainBin: options.toolchainBin,
16431
16501
  swiftCompiler: options.swiftCompiler,
16432
- objects: selectedSource.map((artifact) => artifact.path)
16502
+ objects: selectedSource.map((artifact) => artifact.path),
16503
+ jobs: options.jobs
16433
16504
  });
16434
16505
  const links = sourceGuestRuntimeLinks({
16435
16506
  toolchainBin: options.toolchainBin,
@@ -18899,7 +18970,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
18899
18970
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
18900
18971
  var MULTI_MANIFEST_VERSION = 72;
18901
18972
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
18902
- var compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18973
+ var compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18903
18974
  function swiftArtifactHash(input, release, moduleRoot) {
18904
18975
  const hash = (0, import_node_crypto15.createHash)("sha256");
18905
18976
  hash.update(`swift-compile
@@ -19750,7 +19821,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
19750
19821
  "NSSwappedDouble",
19751
19822
  "NSSwappedFloat",
19752
19823
  "NSUbiquitousKeyValueStore",
19753
- "NSValueTransformerName",
19754
19824
  "NSXPCCoder",
19755
19825
  "NSXPCConnection",
19756
19826
  "NSXPCInterface",
@@ -23653,7 +23723,8 @@ function compileSwiftProjectOnce(input, options) {
23653
23723
  generatedOwners: preparation.generatedOwners,
23654
23724
  output: output2,
23655
23725
  optimized,
23656
- optimize: input.optimize === true
23726
+ optimize: input.optimize === true,
23727
+ jobs: swiftBuildJobs()
23657
23728
  });
23658
23729
  else
23659
23730
  await lowerWasm(output2, optimized, { optimize: input.optimize === true });
@@ -34625,7 +34696,7 @@ function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
34625
34696
  return hash.digest("hex");
34626
34697
  }
34627
34698
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
34628
- var STANDIN_SOURCE_DIGEST = true ? "1122424b1e57ea84e0c3c2fbd17ce18dee149a87374de8912d176aec8451bc86" : standinSourceDigest();
34699
+ var STANDIN_SOURCE_DIGEST = true ? "3a0e0016967d34924d12848e05752d3902596cc16a0f603a5fda32cb024d02f8" : standinSourceDigest();
34629
34700
 
34630
34701
  // src/swift-standins.ts
34631
34702
  var import_node_child_process32 = require("node:child_process");