peachsim 0.1.1856 → 0.1.1857

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 (96) hide show
  1. package/cli/outbound-endpoints.ts +4 -0
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +2384 -2156
  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 +1761 -1474
  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 +2699 -2461
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  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 +2 -2
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +2 -2
  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 +84 -68
  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 +3432 -3176
  69. package/dist-lib/swift-compile.cjs +33 -62
  70. package/dist-lib/swift-compile.mjs +33 -62
  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 +44 -72
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/package.json +1 -1
  82. package/src/expo-native-compiler-digest.ts +18 -0
  83. package/src/expo-native-prebuilt.ts +353 -0
  84. package/src/expo-native-workspace.ts +1 -1
  85. package/src/expo-swift-host.ts +9 -0
  86. package/src/native-bundles.ts +6 -6
  87. package/src/native-prebuilt.ts +7 -4
  88. package/src/nitro-compile.ts +2 -6
  89. package/src/nitro-superset.ts +7 -23
  90. package/src/package-tree-digest.ts +29 -0
  91. package/src/swift-compile.ts +22 -60
  92. package/src/swift-host.ts +6 -6
  93. package/src/swift-standin-digest.ts +24 -12
  94. package/src/swift-wasm-prune.ts +13 -16
  95. package/src/turbo-bundle.ts +9 -2
  96. package/src/turbo-compile.ts +2 -2
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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;
@@ -5989,7 +5989,7 @@ function getModulePrefix(file) {
5989
5989
  const dash = base.indexOf("-");
5990
5990
  return dash > 0 ? base.slice(0, dash) : base;
5991
5991
  }
5992
- function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTargets = []) {
5992
+ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTargets = [], owner) {
5993
5993
  const rspPath = import_node_path16.default.join(directory, ".peach-link.rsp");
5994
5994
  if (!import_node_fs14.default.existsSync(rspPath)) return;
5995
5995
  const origRsp = import_node_fs14.default.readFileSync(rspPath, "utf8");
@@ -5998,8 +5998,11 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
5998
5998
  const sdkFlag = tokens.find(
5999
5999
  (t) => t.startsWith("-L") && t.endsWith("/swift_static/wasi")
6000
6000
  );
6001
- if (!sdkFlag) return;
6002
- const sdkWasiDir = sdkFlag.slice(2);
6001
+ if (!sdkFlag)
6002
+ throw new Error(`swift-wasm-prune: ${rspPath} names no sdk library directory`);
6003
+ const sdkWasiDir = import_node_fs14.default.realpathSync(sdkFlag.slice(2));
6004
+ if (owner && import_node_fs14.default.statSync(sdkWasiDir).uid === owner.uid)
6005
+ throw new Error(`swift-wasm-prune: the build owns its sdk directory ${sdkWasiDir}`);
6003
6006
  const sdkObjsDir = ensureUnpackedSdkObjects(sdkWasiDir);
6004
6007
  const distDir = import_node_path16.default.join(moduleRoot, "lib");
6005
6008
  const prunedObjsDir = import_node_path16.default.join(directory, ".peach-pruned-objs");
@@ -6021,7 +6024,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6021
6024
  continue;
6022
6025
  }
6023
6026
  if (t.endsWith(".o")) {
6024
- if (t.startsWith(distDir)) {
6027
+ if (import_node_path16.default.resolve(t).startsWith(distDir + import_node_path16.default.sep)) {
6025
6028
  if (!foundationCategoryObjects.some(
6026
6029
  (name2) => import_node_path16.default.basename(t) === `Foundation-${name2}.o`
6027
6030
  )) {
@@ -6326,12 +6329,9 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6326
6329
  }
6327
6330
  }
6328
6331
  let hasClangObjCEager = false;
6329
- const eagerBuildPrunable = [];
6330
6332
  for (const f of eagerFiles) {
6331
6333
  const isDist = f.startsWith(distDir);
6332
- const isBuildSwift = !isDist && f.endsWith(".swift.o");
6333
- const obj = distObjs.get(f) ?? parseWasmObjectCached(f, isDist || isBuildSwift, false);
6334
- if (isBuildSwift) eagerBuildPrunable.push(obj);
6334
+ const obj = distObjs.get(f) ?? parseWasmObjectCached(f, isDist, false);
6335
6335
  extractObject(obj);
6336
6336
  if (!isDist && !hasClangObjCEager && obj.symNames.includes("__objc_load")) {
6337
6337
  hasClangObjCEager = true;
@@ -6720,14 +6720,6 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6720
6720
  writePrunedObject(o, outPath);
6721
6721
  prunedMap.set(o.file, outPath);
6722
6722
  }
6723
- for (const o of eagerBuildPrunable) {
6724
- const outPath = import_node_path16.default.join(
6725
- prunedObjsDir,
6726
- `build-${import_node_path16.default.basename(import_node_path16.default.dirname(o.file))}-${import_node_path16.default.basename(o.file)}`
6727
- );
6728
- writePrunedObject(o, outPath);
6729
- prunedMap.set(o.file, outPath);
6730
- }
6731
6723
  const extraSdkObjs = allSdkObjFiles.filter(
6732
6724
  (f) => f.startsWith("libDarwin__") || f.startsWith("libswiftCore__") && f !== "libswiftCore__Swift.o" || f.startsWith("libswift_Concurrency__") && f !== "libswift_Concurrency___Concurrency.o"
6733
6725
  ).map((f) => import_node_path16.default.join(sdkObjsDir, f));
@@ -6788,7 +6780,8 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6788
6780
  import_node_fs14.default.writeFileSync(prunedRspPath, outTokens.map((t) => JSON.stringify(t)).join(" "));
6789
6781
  (0, import_node_child_process12.execFileSync)(import_node_path16.default.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
6790
6782
  stdio: "pipe",
6791
- maxBuffer: Infinity
6783
+ maxBuffer: Infinity,
6784
+ ...owner
6792
6785
  });
6793
6786
  import_node_fs14.default.rmSync(rspPath, { force: true });
6794
6787
  }
@@ -7870,7 +7863,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
7870
7863
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
7871
7864
  var MULTI_MANIFEST_VERSION = 65;
7872
7865
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
7873
- var compilerSourceDigest = true ? "266f0a8129486f5fdb6354090f587d7fcd2173e8fd6d97af6d11d9d278388e6f" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
7866
+ var compilerSourceDigest = true ? "e8de8fa3db7ed30ab6e2496f8e91fbb98dacbcb1ce01fd4cba3f949b2834edcd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
7874
7867
  function swiftArtifactHash(input, release, moduleRoot) {
7875
7868
  const hash = (0, import_node_crypto8.createHash)("sha256");
7876
7869
  hash.update(`swift-compile
@@ -7879,8 +7872,7 @@ ${release}
7879
7872
  hash.update(compilerSourceDigest);
7880
7873
  if (input.oneModule) hash.update("one-module\n");
7881
7874
  hash.update(swiftModuleDigest(moduleRoot));
7882
- if (input.lazyDistribution)
7883
- hash.update(`lazy-distribution
7875
+ if (input.optimize) hash.update(`optimize
7884
7876
  ${WASM_OPTIMIZE_IDENTITY}
7885
7877
  `);
7886
7878
  for (const file of Object.keys(input.files).sort()) {
@@ -8017,27 +8009,19 @@ function emitSwiftPackageManifest(args) {
8017
8009
  (name2) => !object.startsWith(`lib/${name2}-`) || reachedFrameworks.has(name2)
8018
8010
  )
8019
8011
  );
8020
- const selectedObjects = new Set(objects);
8021
8012
  const quoted = (object) => `"${import_node_path19.default.join(moduleRoot, object).replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
8022
8013
  const categoryObjects = new Set(
8023
8014
  foundationCategoryObjects.map((name2) => `lib/Foundation-${name2}.o`)
8024
8015
  );
8025
- const roots = args.lazyDistribution ? swiftObjcRootObjects(distribution.id, moduleRoot, distribution.objects) : null;
8016
+ const roots = swiftObjcRootObjects(distribution.id, moduleRoot, distribution.objects);
8026
8017
  const eager = new Set(
8027
- objects.filter((object) => roots?.has(object) || categoryObjects.has(object))
8018
+ objects.filter((object) => roots.has(object) || categoryObjects.has(object))
8028
8019
  );
8029
8020
  const list = [
8030
- ...roots ? [
8031
- ...[...eager].map(quoted),
8032
- "-Wl,--start-lib",
8033
- ...available.filter((object) => !eager.has(object)).map(quoted),
8034
- "-Wl,--end-lib"
8035
- ] : [
8036
- ...objects.map(quoted),
8037
- "-Wl,--start-lib",
8038
- ...available.filter((object) => !selectedObjects.has(object)).map(quoted),
8039
- "-Wl,--end-lib"
8040
- ],
8021
+ ...[...eager].map(quoted),
8022
+ "-Wl,--start-lib",
8023
+ ...available.filter((object) => !eager.has(object)).map(quoted),
8024
+ "-Wl,--end-lib",
8041
8025
  ...darwinRecordsRegion(distribution.objects.filter(isProvider).map(quoted))
8042
8026
  ].join("\n") + "\n";
8043
8027
  distributionLinkPath = distributionLink.path.replace(
@@ -10923,8 +10907,7 @@ module ${moduleName}.Swift {
10923
10907
  distributionLink: {
10924
10908
  path: import_node_path19.default.join(layout.root, ".peach-distribution-objects.rsp"),
10925
10909
  files
10926
- },
10927
- lazyDistribution: input.lazyDistribution
10910
+ }
10928
10911
  } : {},
10929
10912
  ...prebuilt && frameworkLink ? {
10930
10913
  prebuilt: {
@@ -11629,15 +11612,6 @@ function compileSwiftProjectOnce(input, options) {
11629
11612
  const root = (0, import_node_fs17.realpathSync)(options.buildRoot);
11630
11613
  const moduleRoot = import_node_path19.default.resolve(options.moduleRoot);
11631
11614
  const distribution = swiftDistributionAt(moduleRoot);
11632
- const entrySource = input.files[input.entry];
11633
- if (distribution && entrySource && !input.lazyDistribution) {
11634
- const imports = swiftImportNames(entrySource);
11635
- const sources = Object.keys(input.files).filter(
11636
- (file) => /\.(?:swift|c|cc|cpp|cxx|m|mm)$/.test(file) && file !== "Package.swift"
11637
- );
11638
- if (sources.length === 1 && sources[0] === input.entry && imports.includes("Foundation") && !imports.some((name2) => distribution.modules.includes(name2)))
11639
- input = { ...input, lazyDistribution: true };
11640
- }
11641
11615
  const layout = {
11642
11616
  root,
11643
11617
  sources: import_node_path19.default.join(root, "Sources", "App"),
@@ -11760,7 +11734,7 @@ function compileSwiftProjectOnce(input, options) {
11760
11734
  process.env.LD_LIBRARY_PATH
11761
11735
  ].filter(Boolean).join(":")
11762
11736
  } : {},
11763
- ...input.lazyDistribution ? { PEACH_DEFER_WASM_LINK: "1" } : {}
11737
+ PEACH_DEFER_WASM_LINK: "1"
11764
11738
  },
11765
11739
  maxBuffer: 64 * 1024 * 1024,
11766
11740
  timeout: options.timeoutMs,
@@ -11860,11 +11834,9 @@ function compileSwiftProjectOnce(input, options) {
11860
11834
  ])
11861
11835
  ];
11862
11836
  const linked = builtArtifact(layout);
11863
- if (input.lazyDistribution) {
11864
- (0, import_node_fs17.rmSync)(import_node_path19.default.join(root, ".peach-link.rsp"), { force: true });
11865
- if ((0, import_node_fs17.existsSync)(linked) && (0, import_node_fs17.statSync)(linked).size <= 8)
11866
- (0, import_node_fs17.rmSync)(linked, { force: true });
11867
- }
11837
+ (0, import_node_fs17.rmSync)(import_node_path19.default.join(root, ".peach-link.rsp"), { force: true });
11838
+ if ((0, import_node_fs17.existsSync)(linked) && (0, import_node_fs17.statSync)(linked).size <= 8)
11839
+ (0, import_node_fs17.rmSync)(linked, { force: true });
11868
11840
  report("compiling and linking Swift modules");
11869
11841
  try {
11870
11842
  const headerBuilds = preparation.headerProductTarget ? [
@@ -11978,20 +11950,19 @@ function compileSwiftProjectOnce(input, options) {
11978
11950
  );
11979
11951
  }
11980
11952
  if (options.project) removeProjectLinks(root);
11953
+ pruneSwiftWasmLink(
11954
+ root,
11955
+ options.toolchainBin,
11956
+ frameworkRoot,
11957
+ input.staticClangTargets,
11958
+ options.project
11959
+ );
11981
11960
  const output = options.project ? projectOutputFile(root, linked, options.project) : linked;
11982
11961
  const optimized = `${output}.optimized`;
11983
- if (input.lazyDistribution) {
11984
- pruneSwiftWasmLink(
11985
- root,
11986
- options.toolchainBin,
11987
- frameworkRoot,
11988
- input.staticClangTargets
11989
- );
11990
- await optimizeWasm(output, optimized);
11991
- }
11962
+ if (input.optimize) await optimizeWasm(output, optimized);
11992
11963
  const artifact = {
11993
11964
  hash,
11994
- bytes: (0, import_node_fs17.readFileSync)(input.lazyDistribution ? optimized : output),
11965
+ bytes: (0, import_node_fs17.readFileSync)(input.optimize ? optimized : output),
11995
11966
  icu: await icu
11996
11967
  };
11997
11968
  if (!options.project) saveCompiledArtifact(root, artifact);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -5959,7 +5959,7 @@ function getModulePrefix(file) {
5959
5959
  const dash = base.indexOf("-");
5960
5960
  return dash > 0 ? base.slice(0, dash) : base;
5961
5961
  }
5962
- function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTargets = []) {
5962
+ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTargets = [], owner) {
5963
5963
  const rspPath = path16.join(directory, ".peach-link.rsp");
5964
5964
  if (!fs6.existsSync(rspPath)) return;
5965
5965
  const origRsp = fs6.readFileSync(rspPath, "utf8");
@@ -5968,8 +5968,11 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
5968
5968
  const sdkFlag = tokens.find(
5969
5969
  (t) => t.startsWith("-L") && t.endsWith("/swift_static/wasi")
5970
5970
  );
5971
- if (!sdkFlag) return;
5972
- const sdkWasiDir = sdkFlag.slice(2);
5971
+ if (!sdkFlag)
5972
+ throw new Error(`swift-wasm-prune: ${rspPath} names no sdk library directory`);
5973
+ const sdkWasiDir = fs6.realpathSync(sdkFlag.slice(2));
5974
+ if (owner && fs6.statSync(sdkWasiDir).uid === owner.uid)
5975
+ throw new Error(`swift-wasm-prune: the build owns its sdk directory ${sdkWasiDir}`);
5973
5976
  const sdkObjsDir = ensureUnpackedSdkObjects(sdkWasiDir);
5974
5977
  const distDir = path16.join(moduleRoot, "lib");
5975
5978
  const prunedObjsDir = path16.join(directory, ".peach-pruned-objs");
@@ -5991,7 +5994,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
5991
5994
  continue;
5992
5995
  }
5993
5996
  if (t.endsWith(".o")) {
5994
- if (t.startsWith(distDir)) {
5997
+ if (path16.resolve(t).startsWith(distDir + path16.sep)) {
5995
5998
  if (!foundationCategoryObjects.some(
5996
5999
  (name2) => path16.basename(t) === `Foundation-${name2}.o`
5997
6000
  )) {
@@ -6296,12 +6299,9 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6296
6299
  }
6297
6300
  }
6298
6301
  let hasClangObjCEager = false;
6299
- const eagerBuildPrunable = [];
6300
6302
  for (const f of eagerFiles) {
6301
6303
  const isDist = f.startsWith(distDir);
6302
- const isBuildSwift = !isDist && f.endsWith(".swift.o");
6303
- const obj = distObjs.get(f) ?? parseWasmObjectCached(f, isDist || isBuildSwift, false);
6304
- if (isBuildSwift) eagerBuildPrunable.push(obj);
6304
+ const obj = distObjs.get(f) ?? parseWasmObjectCached(f, isDist, false);
6305
6305
  extractObject(obj);
6306
6306
  if (!isDist && !hasClangObjCEager && obj.symNames.includes("__objc_load")) {
6307
6307
  hasClangObjCEager = true;
@@ -6690,14 +6690,6 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6690
6690
  writePrunedObject(o, outPath);
6691
6691
  prunedMap.set(o.file, outPath);
6692
6692
  }
6693
- for (const o of eagerBuildPrunable) {
6694
- const outPath = path16.join(
6695
- prunedObjsDir,
6696
- `build-${path16.basename(path16.dirname(o.file))}-${path16.basename(o.file)}`
6697
- );
6698
- writePrunedObject(o, outPath);
6699
- prunedMap.set(o.file, outPath);
6700
- }
6701
6693
  const extraSdkObjs = allSdkObjFiles.filter(
6702
6694
  (f) => f.startsWith("libDarwin__") || f.startsWith("libswiftCore__") && f !== "libswiftCore__Swift.o" || f.startsWith("libswift_Concurrency__") && f !== "libswift_Concurrency___Concurrency.o"
6703
6695
  ).map((f) => path16.join(sdkObjsDir, f));
@@ -6758,7 +6750,8 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
6758
6750
  fs6.writeFileSync(prunedRspPath, outTokens.map((t) => JSON.stringify(t)).join(" "));
6759
6751
  execFileSync7(path16.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
6760
6752
  stdio: "pipe",
6761
- maxBuffer: Infinity
6753
+ maxBuffer: Infinity,
6754
+ ...owner
6762
6755
  });
6763
6756
  fs6.rmSync(rspPath, { force: true });
6764
6757
  }
@@ -7840,7 +7833,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
7840
7833
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
7841
7834
  var MULTI_MANIFEST_VERSION = 65;
7842
7835
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
7843
- var compilerSourceDigest = true ? "266f0a8129486f5fdb6354090f587d7fcd2173e8fd6d97af6d11d9d278388e6f" : swiftCompilerSourceDigest(import.meta.dirname);
7836
+ var compilerSourceDigest = true ? "e8de8fa3db7ed30ab6e2496f8e91fbb98dacbcb1ce01fd4cba3f949b2834edcd" : swiftCompilerSourceDigest(import.meta.dirname);
7844
7837
  function swiftArtifactHash(input, release, moduleRoot) {
7845
7838
  const hash = createHash8("sha256");
7846
7839
  hash.update(`swift-compile
@@ -7849,8 +7842,7 @@ ${release}
7849
7842
  hash.update(compilerSourceDigest);
7850
7843
  if (input.oneModule) hash.update("one-module\n");
7851
7844
  hash.update(swiftModuleDigest(moduleRoot));
7852
- if (input.lazyDistribution)
7853
- hash.update(`lazy-distribution
7845
+ if (input.optimize) hash.update(`optimize
7854
7846
  ${WASM_OPTIMIZE_IDENTITY}
7855
7847
  `);
7856
7848
  for (const file of Object.keys(input.files).sort()) {
@@ -7987,27 +7979,19 @@ function emitSwiftPackageManifest(args) {
7987
7979
  (name2) => !object.startsWith(`lib/${name2}-`) || reachedFrameworks.has(name2)
7988
7980
  )
7989
7981
  );
7990
- const selectedObjects = new Set(objects);
7991
7982
  const quoted = (object) => `"${path19.join(moduleRoot, object).replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
7992
7983
  const categoryObjects = new Set(
7993
7984
  foundationCategoryObjects.map((name2) => `lib/Foundation-${name2}.o`)
7994
7985
  );
7995
- const roots = args.lazyDistribution ? swiftObjcRootObjects(distribution.id, moduleRoot, distribution.objects) : null;
7986
+ const roots = swiftObjcRootObjects(distribution.id, moduleRoot, distribution.objects);
7996
7987
  const eager = new Set(
7997
- objects.filter((object) => roots?.has(object) || categoryObjects.has(object))
7988
+ objects.filter((object) => roots.has(object) || categoryObjects.has(object))
7998
7989
  );
7999
7990
  const list = [
8000
- ...roots ? [
8001
- ...[...eager].map(quoted),
8002
- "-Wl,--start-lib",
8003
- ...available.filter((object) => !eager.has(object)).map(quoted),
8004
- "-Wl,--end-lib"
8005
- ] : [
8006
- ...objects.map(quoted),
8007
- "-Wl,--start-lib",
8008
- ...available.filter((object) => !selectedObjects.has(object)).map(quoted),
8009
- "-Wl,--end-lib"
8010
- ],
7991
+ ...[...eager].map(quoted),
7992
+ "-Wl,--start-lib",
7993
+ ...available.filter((object) => !eager.has(object)).map(quoted),
7994
+ "-Wl,--end-lib",
8011
7995
  ...darwinRecordsRegion(distribution.objects.filter(isProvider).map(quoted))
8012
7996
  ].join("\n") + "\n";
8013
7997
  distributionLinkPath = distributionLink.path.replace(
@@ -10893,8 +10877,7 @@ module ${moduleName}.Swift {
10893
10877
  distributionLink: {
10894
10878
  path: path19.join(layout.root, ".peach-distribution-objects.rsp"),
10895
10879
  files
10896
- },
10897
- lazyDistribution: input.lazyDistribution
10880
+ }
10898
10881
  } : {},
10899
10882
  ...prebuilt && frameworkLink ? {
10900
10883
  prebuilt: {
@@ -11599,15 +11582,6 @@ function compileSwiftProjectOnce(input, options) {
11599
11582
  const root = realpathSync3(options.buildRoot);
11600
11583
  const moduleRoot = path19.resolve(options.moduleRoot);
11601
11584
  const distribution = swiftDistributionAt(moduleRoot);
11602
- const entrySource = input.files[input.entry];
11603
- if (distribution && entrySource && !input.lazyDistribution) {
11604
- const imports = swiftImportNames(entrySource);
11605
- const sources = Object.keys(input.files).filter(
11606
- (file) => /\.(?:swift|c|cc|cpp|cxx|m|mm)$/.test(file) && file !== "Package.swift"
11607
- );
11608
- if (sources.length === 1 && sources[0] === input.entry && imports.includes("Foundation") && !imports.some((name2) => distribution.modules.includes(name2)))
11609
- input = { ...input, lazyDistribution: true };
11610
- }
11611
11585
  const layout = {
11612
11586
  root,
11613
11587
  sources: path19.join(root, "Sources", "App"),
@@ -11730,7 +11704,7 @@ function compileSwiftProjectOnce(input, options) {
11730
11704
  process.env.LD_LIBRARY_PATH
11731
11705
  ].filter(Boolean).join(":")
11732
11706
  } : {},
11733
- ...input.lazyDistribution ? { PEACH_DEFER_WASM_LINK: "1" } : {}
11707
+ PEACH_DEFER_WASM_LINK: "1"
11734
11708
  },
11735
11709
  maxBuffer: 64 * 1024 * 1024,
11736
11710
  timeout: options.timeoutMs,
@@ -11830,11 +11804,9 @@ function compileSwiftProjectOnce(input, options) {
11830
11804
  ])
11831
11805
  ];
11832
11806
  const linked = builtArtifact(layout);
11833
- if (input.lazyDistribution) {
11834
- rmSync5(path19.join(root, ".peach-link.rsp"), { force: true });
11835
- if (existsSync4(linked) && statSync2(linked).size <= 8)
11836
- rmSync5(linked, { force: true });
11837
- }
11807
+ rmSync5(path19.join(root, ".peach-link.rsp"), { force: true });
11808
+ if (existsSync4(linked) && statSync2(linked).size <= 8)
11809
+ rmSync5(linked, { force: true });
11838
11810
  report("compiling and linking Swift modules");
11839
11811
  try {
11840
11812
  const headerBuilds = preparation.headerProductTarget ? [
@@ -11948,20 +11920,19 @@ function compileSwiftProjectOnce(input, options) {
11948
11920
  );
11949
11921
  }
11950
11922
  if (options.project) removeProjectLinks(root);
11923
+ pruneSwiftWasmLink(
11924
+ root,
11925
+ options.toolchainBin,
11926
+ frameworkRoot,
11927
+ input.staticClangTargets,
11928
+ options.project
11929
+ );
11951
11930
  const output = options.project ? projectOutputFile(root, linked, options.project) : linked;
11952
11931
  const optimized = `${output}.optimized`;
11953
- if (input.lazyDistribution) {
11954
- pruneSwiftWasmLink(
11955
- root,
11956
- options.toolchainBin,
11957
- frameworkRoot,
11958
- input.staticClangTargets
11959
- );
11960
- await optimizeWasm(output, optimized);
11961
- }
11932
+ if (input.optimize) await optimizeWasm(output, optimized);
11962
11933
  const artifact = {
11963
11934
  hash,
11964
- bytes: readFileSync11(input.lazyDistribution ? optimized : output),
11935
+ bytes: readFileSync11(input.optimize ? optimized : output),
11965
11936
  icu: await icu
11966
11937
  };
11967
11938
  if (!options.project) saveCompiledArtifact(root, artifact);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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.1856 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1857 | (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;