peachsim 0.1.2423 → 0.1.2426

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 (95) hide show
  1. package/cli/outbound-endpoints.ts +138 -23
  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 +122 -29
  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 +121 -28
  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 +122 -29
  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 +24 -9
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +22 -7
  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 +24 -9
  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 +140 -40
  69. package/dist-lib/swift-compile.cjs +87 -15
  70. package/dist-lib/swift-compile.mjs +87 -15
  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 +97 -19
  78. package/dist-lib/vite.cjs +24 -9
  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/engine/node.d.ts +1 -0
  82. package/dist-types/packages/peach-engine/src/engine/svg-native.d.ts +60 -0
  83. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  84. package/kotlin/README.md +4 -3
  85. package/kotlin/sdk.tar.gz +0 -0
  86. package/kotlin/toolchain.json +2 -2
  87. package/package.json +1 -1
  88. package/src/native-static-libraries.ts +2 -1
  89. package/src/swift-compile.ts +1 -0
  90. package/src/swift-guest-compile.ts +2 -0
  91. package/src/swift-guest-image-ledger.ts +37 -2
  92. package/src/swift-guest-source-inputs.ts +45 -6
  93. package/src/swift-standin-builtin-behavior.ts +3 -0
  94. package/src/swift-standin-emit.ts +10 -1
  95. package/src/visit-parsed-program.ts +21 -6
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : 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
@@ -18839,7 +18910,8 @@ function compileSwiftProjectOnce(input, options) {
18839
18910
  generatedOwners: preparation.generatedOwners,
18840
18911
  output,
18841
18912
  optimized,
18842
- optimize: input.optimize === true
18913
+ optimize: input.optimize === true,
18914
+ jobs: swiftBuildJobs()
18843
18915
  });
18844
18916
  else
18845
18917
  await lowerWasm(output, optimized, { optimize: input.optimize === true });
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -6987,7 +6987,10 @@ function emitSwiftStandin(sourceGraphs, options) {
6987
6987
  /@(\w+)(?:\([^)]*\))?\s*/g,
6988
6988
  (attr, name3) => typeByPath.has(name3) ? "" : attr
6989
6989
  ) : spelledAttrs;
6990
- const attrs = options.unobjc?.has(path57) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
6990
+ const selector = context.inClass && !options.inert && member.kind.identifier === "swift.type.method" && !/\basync\b/.test(rest) ? /^c:objc\(cs\)\w+\(cm\)([A-Za-z_][A-Za-z_0-9:]*)$/.exec(
6991
+ member.identifier.precise
6992
+ )?.[1] : void 0;
6993
+ const attrs = options.unobjc?.has(path57) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : `${wrapped}${selector ? `@objc(${selector}) ` : ""}`;
6991
6994
  const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
6992
6995
  rest
6993
6996
  );
@@ -12215,6 +12218,7 @@ function llvmType(value) {
12215
12218
  }
12216
12219
  }
12217
12220
  var OBJC_INIT_RECORD = ".objc_init";
12221
+ var OBJC_LOAD_FUNCTION = ".objcv2_load_function";
12218
12222
  function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLookups, preserveCanonical) {
12219
12223
  if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
12220
12224
  throw new Error("expected wasm object");
@@ -12324,7 +12328,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12324
12328
  if (sectionName === "linking") {
12325
12329
  const version2 = number3();
12326
12330
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
12327
- const parts = [encodedString(sectionName), encodeNumber(version2)];
12331
+ const subsections = [];
12332
+ let objcLoader;
12328
12333
  while (offset < section.length) {
12329
12334
  const kind = section[offset++];
12330
12335
  const length = number3();
@@ -12387,6 +12392,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12387
12392
  }
12388
12393
  } else if (symbolKind === 3) number3();
12389
12394
  else throw new Error("unsupported wasm symbol kind");
12395
+ if (name3 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
12396
+ objcLoader = i;
12397
+ }
12390
12398
  const alias = names.get(name3);
12391
12399
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name3);
12392
12400
  if ((name3 === "dlsym" && usesDlsym || name3 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -12436,7 +12444,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
12436
12444
  content = Buffer.concat([...entries, ...extraEntries]);
12437
12445
  }
12438
12446
  offset = stop;
12439
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
12447
+ subsections.push({ kind, content });
12448
+ }
12449
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
12450
+ for (const subsection of subsections) {
12451
+ let content = subsection.content;
12452
+ if (subsection.kind === 6 && objcLoader !== void 0) {
12453
+ const [count, entriesStart] = readNumber(content, 0);
12454
+ const entries = [content.subarray(0, entriesStart)];
12455
+ let entryStart = entriesStart;
12456
+ for (let i = 0; i < count; i++) {
12457
+ const [, symbolStart] = readNumber(content, entryStart);
12458
+ const [symbol2, entryEnd] = readNumber(content, symbolStart);
12459
+ if (symbol2 === objcLoader) entries.push(encodeNumber(1));
12460
+ entries.push(
12461
+ content.subarray(
12462
+ symbol2 === objcLoader ? symbolStart : entryStart,
12463
+ entryEnd
12464
+ )
12465
+ );
12466
+ entryStart = entryEnd;
12467
+ }
12468
+ if (entryStart !== content.length)
12469
+ throw new Error("invalid init functions subsection");
12470
+ content = Buffer.concat(entries);
12471
+ }
12472
+ parts.push(
12473
+ Buffer.from([subsection.kind]),
12474
+ encodeNumber(content.length),
12475
+ content
12476
+ );
12440
12477
  }
12441
12478
  section = Buffer.concat(parts);
12442
12479
  }
@@ -15274,6 +15311,25 @@ function clangIrLinkOptions(ir) {
15274
15311
  return result;
15275
15312
  }
15276
15313
  var CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
15314
+ var PARALLEL_REPLAY = `
15315
+ const { spawn } = require('node:child_process')
15316
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
15317
+ let next = 0
15318
+ const run = () => {
15319
+ if (next >= commands.length) return Promise.resolve()
15320
+ const [file, ...args] = commands[next++]
15321
+ return new Promise((resolve, reject) => {
15322
+ const child = spawn(file, args, { stdio: 'inherit' })
15323
+ child.on('error', reject)
15324
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
15325
+ }).then(run)
15326
+ }
15327
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
15328
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
15329
+ console.error(error.message)
15330
+ process.exit(1)
15331
+ })
15332
+ `;
15277
15333
  function sourceGuestClangLinkOptions(options) {
15278
15334
  const wanted = new Set(options.objects.map((file) => import_node_path17.default.resolve(file)));
15279
15335
  const commands = /* @__PURE__ */ new Map();
@@ -15307,7 +15363,7 @@ function sourceGuestClangLinkOptions(options) {
15307
15363
  commands.set(file, { tool, args: value });
15308
15364
  }
15309
15365
  }
15310
- const result = /* @__PURE__ */ new Map();
15366
+ const replays = [];
15311
15367
  for (const [index, file] of [...wanted].entries()) {
15312
15368
  const command = commands.get(file);
15313
15369
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -15333,16 +15389,33 @@ function sourceGuestClangLinkOptions(options) {
15333
15389
  throw new Error(`missing clang ${flag} for ${file}`);
15334
15390
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
15335
15391
  }
15336
- (0, import_node_child_process12.execFileSync)(
15337
- command.args[0],
15338
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
15339
- { stdio: "inherit" }
15340
- );
15392
+ replays.push({
15393
+ file,
15394
+ compiler: command.args[0],
15395
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
15396
+ output: output2
15397
+ });
15398
+ }
15399
+ const plan = import_node_path17.default.join(options.directory, "clang-link-replays.json");
15400
+ (0, import_node_fs17.writeFileSync)(
15401
+ plan,
15402
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
15403
+ );
15404
+ (0, import_node_child_process12.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
15405
+ stdio: "inherit",
15406
+ env: {
15407
+ ...process.env,
15408
+ PEACH_CLANG_REPLAYS: plan,
15409
+ PEACH_CLANG_JOBS: String(options.jobs)
15410
+ }
15411
+ });
15412
+ const result = /* @__PURE__ */ new Map();
15413
+ for (const { file, output: output2 } of replays) {
15341
15414
  const flags = clangIrLinkOptions((0, import_node_fs17.readFileSync)(output2, "utf8"));
15342
- for (let index2 = 0; index2 < flags.length; index2++) {
15343
- const flag = flags[index2];
15415
+ for (let index = 0; index < flags.length; index++) {
15416
+ const flag = flags[index];
15344
15417
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
15345
- const name3 = flags[++index2];
15418
+ const name3 = flags[++index];
15346
15419
  if (!name3 || name3.startsWith("-"))
15347
15420
  throw new Error(`missing clang link name after ${flag}`);
15348
15421
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -16429,7 +16502,8 @@ async function compileGuestLink(options) {
16429
16502
  directory,
16430
16503
  toolchainBin: options.toolchainBin,
16431
16504
  swiftCompiler: options.swiftCompiler,
16432
- objects: selectedSource.map((artifact) => artifact.path)
16505
+ objects: selectedSource.map((artifact) => artifact.path),
16506
+ jobs: options.jobs
16433
16507
  });
16434
16508
  const links = sourceGuestRuntimeLinks({
16435
16509
  toolchainBin: options.toolchainBin,
@@ -18899,7 +18973,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
18899
18973
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
18900
18974
  var MULTI_MANIFEST_VERSION = 72;
18901
18975
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
18902
- var compilerSourceDigest = true ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18976
+ var compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
18903
18977
  function swiftArtifactHash(input, release, moduleRoot) {
18904
18978
  const hash = (0, import_node_crypto15.createHash)("sha256");
18905
18979
  hash.update(`swift-compile
@@ -23652,7 +23726,8 @@ function compileSwiftProjectOnce(input, options) {
23652
23726
  generatedOwners: preparation.generatedOwners,
23653
23727
  output: output2,
23654
23728
  optimized,
23655
- optimize: input.optimize === true
23729
+ optimize: input.optimize === true,
23730
+ jobs: swiftBuildJobs()
23656
23731
  });
23657
23732
  else
23658
23733
  await lowerWasm(output2, optimized, { optimize: input.optimize === true });
@@ -34624,7 +34699,7 @@ function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
34624
34699
  return hash.digest("hex");
34625
34700
  }
34626
34701
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
34627
- var STANDIN_SOURCE_DIGEST = true ? "2913d6a693b8a1c42193c1962c3468c2f8bc68c78a2f2f52961ca5efe03d1e67" : standinSourceDigest();
34702
+ var STANDIN_SOURCE_DIGEST = true ? "76ba6566c9c2d1f2324dcae610243363f830f57e3753da053da53d749835e23a" : standinSourceDigest();
34628
34703
 
34629
34704
  // src/swift-standins.ts
34630
34705
  var import_node_child_process32 = require("node:child_process");
@@ -35047,11 +35122,11 @@ function nativeStaticLibrary(file, recipe, moduleRoot) {
35047
35122
  return "runtime" in recipe ? rustStaticLibrary(archive, moduleRoot) : archive;
35048
35123
  }
35049
35124
  function isRustSymbol(name3, demangled) {
35050
- return (name3.startsWith("_R") || /^_ZN.*17h[0-9a-f]{16}E$/.test(name3)) && demangled !== name3 || name3 === "rust_eh_personality" || name3 === "__getrandom_v03_custom";
35125
+ return (name3.startsWith("_R") || /^_ZN.*17h[0-9a-f]{16}E$/.test(name3)) && demangled !== name3 || name3 === "rust_eh_personality" || name3 === "__getrandom_custom" || name3 === "__getrandom_v03_custom";
35051
35126
  }
35052
35127
  function rustStaticLibrary(file, moduleRoot) {
35053
35128
  const toolchain = swiftModuleToolchain(moduleRoot);
35054
- const key2 = (0, import_node_crypto27.createHash)("sha256").update("rust-c-abi-v2\0").update(toolchain.release).update("\0").update(import_node_fs48.default.readFileSync(file)).digest("hex");
35129
+ const key2 = (0, import_node_crypto27.createHash)("sha256").update("rust-c-abi-v3\0").update(toolchain.release).update("\0").update(import_node_fs48.default.readFileSync(file)).digest("hex");
35055
35130
  const directory = import_node_path50.default.join(cacheDir(), "native-archives", key2);
35056
35131
  const archive = import_node_path50.default.join(directory, "library.a");
35057
35132
  if (import_node_fs48.default.existsSync(archive)) return archive;
@@ -35552,6 +35627,9 @@ async function emitCxxStandin(input) {
35552
35627
 
35553
35628
  // src/swift-standin-builtin-behavior.ts
35554
35629
  var BUILTIN_STANDIN_BEHAVIOR = {
35630
+ FirebaseAnalytics: {
35631
+ "Analytics.logEvent(_:parameters:)": { body: "" }
35632
+ },
35555
35633
  GoogleCast: {
35556
35634
  kGCKCastDeviceCategory: { body: 'return "com.google.cast.CastDevice"' },
35557
35635
  kGCKDefaultMediaReceiverApplicationID: { body: 'return "CC1AD845"' },
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -4382,7 +4382,7 @@ var STANDIN_SOURCE_DIGEST;
4382
4382
  var init_swift_standin_digest = __esm({
4383
4383
  "src/swift-standin-digest.ts"() {
4384
4384
  "use strict";
4385
- STANDIN_SOURCE_DIGEST = true ? "2913d6a693b8a1c42193c1962c3468c2f8bc68c78a2f2f52961ca5efe03d1e67" : standinSourceDigest();
4385
+ STANDIN_SOURCE_DIGEST = true ? "76ba6566c9c2d1f2324dcae610243363f830f57e3753da053da53d749835e23a" : standinSourceDigest();
4386
4386
  }
4387
4387
  });
4388
4388
 
@@ -5759,7 +5759,7 @@ var init_swift_compile = __esm({
5759
5759
  FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
5760
5760
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
5761
5761
  ).join("");
5762
- compilerSourceDigest = true ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5762
+ compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5763
5763
  C_WORDS = new Set(
5764
5764
  "auto bool break case char const continue default do double else enum extern false float for goto if inline int long register restrict return short signed sizeof static struct switch true typedef union unsigned void volatile while YES NO NULL nil Nil id self super instancetype".split(
5765
5765
  " "
@@ -7385,19 +7385,34 @@ init_public_brand();
7385
7385
  var import_oxc_parser = require("oxc-parser");
7386
7386
  init_is_record();
7387
7387
  function visitParsedProgram(program, visitor) {
7388
+ const enterByType = /* @__PURE__ */ new Map();
7389
+ const exitByType = /* @__PURE__ */ new Map();
7390
+ for (const key of Object.keys(visitor)) {
7391
+ const handler = Reflect.get(visitor, key);
7392
+ if (typeof handler !== "function") continue;
7393
+ const invoke = (node) => {
7394
+ handler(node);
7395
+ };
7396
+ if (key.endsWith(":exit")) exitByType.set(key.slice(0, -5), invoke);
7397
+ else enterByType.set(key, invoke);
7398
+ }
7399
+ if (enterByType.size === 0 && exitByType.size === 0) return;
7400
+ const hasExit = exitByType.size > 0;
7388
7401
  function visit3(value) {
7389
7402
  if (Array.isArray(value)) {
7390
- for (const child of value) visit3(child);
7403
+ for (let i = 0; i < value.length; i++) visit3(value[i]);
7391
7404
  return;
7392
7405
  }
7393
7406
  if (!isRecord(value) || typeof value.type !== "string") return;
7394
7407
  const keys = import_oxc_parser.visitorKeys[value.type];
7395
7408
  if (!keys) return;
7396
- const enter = Reflect.get(visitor, value.type);
7397
- if (typeof enter === "function") enter(value);
7398
- for (const key of keys) visit3(value[key]);
7399
- const exit = Reflect.get(visitor, `${value.type}:exit`);
7400
- if (typeof exit === "function") exit(value);
7409
+ const enter = enterByType.get(value.type);
7410
+ if (enter) enter(value);
7411
+ for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
7412
+ if (hasExit) {
7413
+ const exit = exitByType.get(value.type);
7414
+ if (exit) exit(value);
7415
+ }
7401
7416
  }
7402
7417
  visit3(program);
7403
7418
  }
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -536,6 +536,7 @@ export declare class SootSimNode extends NativeNodeRecord {
536
536
  until: number;
537
537
  } | null;
538
538
  _paintBoundary?: import('./paint-boundary-types.d.ts').PaintBoundaryState | null;
539
+ _svgSpriteAtlas?: import('./svg-native.d.ts').SvgSpriteAtlas;
539
540
  __lastBackdropSig?: string;
540
541
  __lastBackdropInk?: DamageRect;
541
542
  constructor(type: SootSimNodeType, props?: Record<string, any>, nativeRenderer?: NativeRenderer, fabricTextEpsilon?: number, resolvedStyle?: SootSimStyle, svgCurrentColorUsesPaintOpacity?: boolean);
@@ -0,0 +1,60 @@
1
+ import { type CanvasKitRenderingApi } from './canvaskit-api.d.ts';
2
+ import { SootSimNode } from './node.d.ts';
3
+ import type { RenderContext } from './types.d.ts';
4
+ import type { Image } from 'canvaskit-wasm';
5
+ export interface SvgSpriteAtlas {
6
+ key: string;
7
+ canvasKitVersion: number;
8
+ image: Image;
9
+ rects: Map<string, readonly [number, number, number, number]>;
10
+ }
11
+ export declare function drawSvgRoot(node: SootSimNode, ctx: RenderContext, x: number, y: number, w: number, h: number): void;
12
+ export declare function paintSvgLeaf(node: SootSimNode, ctx: RenderContext, x: number, y: number, w: number, h: number): number;
13
+ export declare function svgSymbolImageRect(ck: CanvasKitRenderingApi, node: SootSimNode): {
14
+ left: number;
15
+ top: number;
16
+ width: number;
17
+ height: number;
18
+ units: number;
19
+ insets: [number, number, number, number];
20
+ viewBox: {
21
+ translateX: number;
22
+ translateY: number;
23
+ scaleX: number;
24
+ scaleY: number;
25
+ };
26
+ };
27
+ export declare function isSvgRenderablePointInFill(target: unknown, point: {
28
+ x: number;
29
+ y: number;
30
+ }): boolean;
31
+ export declare function isSvgRenderablePointInStroke(target: unknown, point: {
32
+ x: number;
33
+ y: number;
34
+ }): boolean;
35
+ export declare function getSvgRenderableTotalLength(target: unknown): number;
36
+ export declare function getSvgRenderablePointAtLength(target: unknown, distance: number): {
37
+ x: number;
38
+ y: number;
39
+ };
40
+ export declare function getSvgRenderableBBox(target: unknown, options: {
41
+ clipped: boolean;
42
+ fill: boolean;
43
+ markers: boolean;
44
+ stroke: boolean;
45
+ }): {
46
+ x: number;
47
+ y: number;
48
+ width: number;
49
+ height: number;
50
+ } | null;
51
+ export declare function getSvgRenderableCTM(target: unknown): {
52
+ a: number;
53
+ b: number;
54
+ c: number;
55
+ d: number;
56
+ e: number;
57
+ f: number;
58
+ } | null;
59
+ export declare function svgShapeContains(ck: object, slot: number, path: string, x: number, y: number): boolean;
60
+ export declare function disposeSvgSurfaceResources(surface: object): void;
@@ -105,6 +105,7 @@ export interface SootSimLockstepCaptureController {
105
105
  end(): void;
106
106
  }
107
107
  export interface SootSimLockstepCaptureBridge {
108
+ getProgress(): ReturnType<SootSimLockstepCaptureController['progress']> | null;
108
109
  begin(fps: number, options?: {
109
110
  baseline?: boolean;
110
111
  holdGpuScenes?: boolean;
package/kotlin/README.md CHANGED
@@ -10,9 +10,10 @@ traffic in `scripts/debug/peach-swift-lazy-network.sh`.
10
10
 
11
11
  - `toolchain.json` pins the patched Kotlin compiler distribution, kotlinx-coroutines,
12
12
  and the AndroidX runtime and Compose Multiplatform UI Kotlin/Wasm klibs.
13
- `fork/compiler.ts` packages the patched jar with the upstream compiler's companion
14
- files in one verified archive. Skiko's browser resources and
15
- kotlinx-datetime's declared JS module are verified and served beside the wasm.
13
+ `fork/compiler.ts` packages the patched jar, Wasm/JS and JVM compiler files,
14
+ Compose and serialization plugins, and license records in one verified archive.
15
+ Skiko's browser resources and kotlinx-datetime's declared JS module are verified
16
+ and served beside the wasm.
16
17
  Compose libraries and the compiler's bundled Compose plugin are selected only
17
18
  for sources referencing `androidx.compose`. `peachsim/kotlin-host` fetches libraries once
18
19
  into `~/.peach/kotlin/<version>`. kotlinc needs a Java runtime (17 or newer)
package/kotlin/sdk.tar.gz CHANGED
Binary file
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compiler": {
3
3
  "version": "2.4.20",
4
- "url": "https://r2.rnxsim.com/peach-kotlin-fork/442ef3cc1c5d3bec68d5a2bfbd95e0cde4c3ffe8ac8d74e86e6fb4632a0e6133/kotlin-compiler.tar.gz",
5
- "sha256": "442ef3cc1c5d3bec68d5a2bfbd95e0cde4c3ffe8ac8d74e86e6fb4632a0e6133",
4
+ "url": "https://r2.rnxsim.com/peach-kotlin-fork/522d34b0c77983e43180fd369d26a140230502c0077ae5422419f9f59ac998a8/kotlin-compiler.tar.gz",
5
+ "sha256": "522d34b0c77983e43180fd369d26a140230502c0077ae5422419f9f59ac998a8",
6
6
  "upstreamSha256": "59e9ca74c7904ef2c122b12114937673ccce68de820a663f0ed66ccf8799e0b7"
7
7
  },
8
8
  "libraries": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2423",
3
+ "version": "0.1.2426",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",