peachsim 0.1.2219 → 0.1.2220

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 (85) hide show
  1. package/cli/commands/flow.ts +4 -0
  2. package/cli/maestro-compare.ts +37 -26
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +79 -16
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +1 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +76 -13
  29. package/dist-lib/expo-swift-metadata.cjs +1 -1
  30. package/dist-lib/expo-swift-metadata.mjs +1 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +77 -14
  33. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +2 -2
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.cjs +1 -1
  50. package/dist-lib/native-app-identity-project.mjs +1 -1
  51. package/dist-lib/native-app-identity.cjs +1 -1
  52. package/dist-lib/native-app-identity.mjs +1 -1
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +53 -53
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +1 -1
  68. package/dist-lib/sdk.mjs +1 -1
  69. package/dist-lib/skills.cjs +77 -14
  70. package/dist-lib/swift-compile.cjs +1 -1
  71. package/dist-lib/swift-compile.mjs +1 -1
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +74 -11
  79. package/dist-lib/vite.cjs +2 -2
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/package.json +1 -1
  83. package/src/swift-host.ts +84 -2
  84. package/src/swift-packages.ts +19 -10
  85. package/src/swift-standins.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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;
@@ -64991,7 +64991,7 @@ var init_swift_standin_digest = __esm({
64991
64991
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
64992
64992
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
64993
64993
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
64994
- STANDIN_SOURCE_DIGEST = true ? "f5dd13fe8982e117facf0d8c668773904364a887ec47c728db7584b73f34d119" : standinSourceDigest();
64994
+ STANDIN_SOURCE_DIGEST = true ? "c0f609da62368c513c186d23bc8aa8e450d27efae5b8c2e7cdf50d34fa734ff0" : standinSourceDigest();
64995
64995
  }
64996
64996
  });
64997
64997
 
@@ -65452,7 +65452,7 @@ var init_package_tree_digest = __esm({
65452
65452
 
65453
65453
  // src/expo-native-prebuilt.ts
65454
65454
  function expoNativeCompilerDigestValue() {
65455
- return true ? "a02a843d19cee6ee62d1798fd5f234d2bbd4e12e327c75be531211719fc1c09b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
65455
+ return true ? "8e765b5dfd0ec93d9027f9d10365ed11f7d85a195d0a888dd1fb76b99195ff2e" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
65456
65456
  }
65457
65457
  function readSources(value) {
65458
65458
  const sources = isRecord(value) ? value.sources : null;
@@ -66198,17 +66198,17 @@ function remoteSwiftCheckouts(root) {
66198
66198
  import_node_fs73.default.mkdirSync(cacheDir(), { recursive: true });
66199
66199
  return import_node_path71.default.join(import_node_fs73.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
66200
66200
  }
66201
- function unlowerableSources(files2, target) {
66201
+ function unlowerableSources(files2, target, portable) {
66202
66202
  if (target.declaresWasiNativeSettings) return [];
66203
66203
  return [
66204
- ...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
66204
+ ...portable.has(target.name) ? [] : files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
66205
66205
  ...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs73.default.readFileSync(file, "utf8")))
66206
66206
  ];
66207
66207
  }
66208
- function unloweredSources(files2, target) {
66208
+ function unloweredSources(files2, target, portable) {
66209
66209
  if (target.type !== "regular") return null;
66210
66210
  if (!files2.some(isSwiftNativeTranslationUnit)) return null;
66211
- const unlowered = unlowerableSources(files2, target);
66211
+ const unlowered = unlowerableSources(files2, target, portable);
66212
66212
  if (unlowered.length === 0) return null;
66213
66213
  const headers = import_node_path71.default.resolve(target.dir, target.publicHeadersPath);
66214
66214
  if (!files2.some((file) => file.startsWith(`${headers}${import_node_path71.default.sep}`) && file.endsWith(".h")))
@@ -66412,6 +66412,7 @@ async function resolveSwiftPackagesAsync(options) {
66412
66412
  function resolveSwiftPackages(options) {
66413
66413
  const { rootDir, resolved, products, localDirs } = options;
66414
66414
  const providedTargets = new Set(options.provided ?? []);
66415
+ const portableAssembly = options.portableAssembly ?? /* @__PURE__ */ new Set();
66415
66416
  const providedProducts = new Set(options.provided ?? []);
66416
66417
  const result = {
66417
66418
  sourceLinks: { targets: [], owners: [] },
@@ -66509,7 +66510,7 @@ function resolveSwiftPackages(options) {
66509
66510
  if (target.type === "macro") return preservePackage(pkg, [name3], "host");
66510
66511
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
66511
66512
  const gap = options.binaryGaps?.get(name3);
66512
- const unlowerable = unlowerableSources(files2, target);
66513
+ const unlowerable = unlowerableSources(files2, target, portableAssembly);
66513
66514
  const placeholder = placeholderPackage(pkg);
66514
66515
  const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` : unlowerable.length > 0 ? `${name3} has native sources with no wasm32 lowering: ${unlowerable.map((file) => import_node_path71.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
66515
66516
  const reasons = target.dependencies.map((dependency) => {
@@ -66590,7 +66591,7 @@ function resolveSwiftPackages(options) {
66590
66591
  (file) => file.endsWith(".swift") && import_node_fs73.default.readFileSync(file, "utf8").trim() === ""
66591
66592
  ))
66592
66593
  return false;
66593
- if (unloweredSources(files2, target)) return false;
66594
+ if (unloweredSources(files2, target, portableAssembly)) return false;
66594
66595
  claimed.add(key2);
66595
66596
  providedTargets.delete(name3);
66596
66597
  for (const dependency of target.dependencies) {
@@ -66638,7 +66639,7 @@ function resolveSwiftPackages(options) {
66638
66639
  if (target.type === "executable") continue;
66639
66640
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
66640
66641
  const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
66641
- const unlowered = unloweredSources(files2, target);
66642
+ const unlowered = unloweredSources(files2, target, portableAssembly);
66642
66643
  const gap = placeholderPackage(pkg);
66643
66644
  const sources = files2.filter((file) => file.endsWith(".swift"));
66644
66645
  const release = (setting) => setting.configuration !== "debug";
@@ -68873,7 +68874,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
68873
68874
  }
68874
68875
  if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
68875
68876
  throw new Error(
68876
- `its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
68877
+ `its generated source does not typecheck: ${(elsewhere.length > 0 ? elsewhere : [...check2.stderr.matchAll(/^\S+?:\d+:\d+: error: .*$/gm)].map((line) => line[0].replace(/^[^:]*\//, ""))).slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
68877
68878
  );
68878
68879
  }
68879
68880
  }
@@ -74909,6 +74910,59 @@ function configureSwiftStandinBehavior(packagePath, config) {
74909
74910
  }
74910
74911
  entry.behavior = behavior;
74911
74912
  }
74913
+ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
74914
+ const assembly = binaries.filter(
74915
+ (binary2) => binary2.unloweredSources?.length && binary2.unloweredSources.every((file) => /\.(s|S)$/.test(file)) && binary2.publicHeaders !== void 0
74916
+ );
74917
+ if (assembly.length === 0) return /* @__PURE__ */ new Set();
74918
+ const sdk = swiftSdkPaths(moduleRoot, toolchainBin);
74919
+ const clang = import_node_path83.default.join(toolchainBin, "clang");
74920
+ const empty = (binary2, file) => {
74921
+ const source = import_node_path83.default.join(binary2.dir, file);
74922
+ const key2 = (0, import_node_crypto45.createHash)("sha256").update(
74923
+ JSON.stringify([
74924
+ clang,
74925
+ sdk.sysroot,
74926
+ sdk.cFlags,
74927
+ binary2.dir,
74928
+ binary2.publicHeaders
74929
+ ])
74930
+ ).update(import_node_fs86.default.readFileSync(source)).digest("hex");
74931
+ const known = emptyWasmAssembly.get(key2);
74932
+ if (known) return known;
74933
+ const result = new Promise(
74934
+ (resolve13) => (0, import_node_child_process46.execFile)(
74935
+ clang,
74936
+ [
74937
+ "-target",
74938
+ "wasm32-unknown-wasip1",
74939
+ "--sysroot",
74940
+ sdk.sysroot,
74941
+ ...sdk.cFlags,
74942
+ "-I",
74943
+ import_node_path83.default.join(binary2.dir, binary2.publicHeaders),
74944
+ "-I",
74945
+ import_node_path83.default.dirname(source),
74946
+ "-E",
74947
+ "-P",
74948
+ "-x",
74949
+ "assembler-with-cpp",
74950
+ source
74951
+ ],
74952
+ { maxBuffer: 64 * 1024 * 1024 },
74953
+ (error, stdout) => resolve13(!error && stdout.trim() === "")
74954
+ )
74955
+ );
74956
+ emptyWasmAssembly.set(key2, result);
74957
+ return result;
74958
+ };
74959
+ const portable = await Promise.all(
74960
+ assembly.map(
74961
+ async (binary2) => (await Promise.all(binary2.unloweredSources.map((file) => empty(binary2, file)))).every(Boolean) ? [binary2.target] : []
74962
+ )
74963
+ );
74964
+ return new Set(portable.flat());
74965
+ }
74912
74966
  async function swiftPackages(entry, app) {
74913
74967
  const stamp = (file) => import_node_fs86.default.existsSync(file) ? (0, import_node_crypto45.createHash)("sha256").update(import_node_fs86.default.readFileSync(file)).digest("hex") : null;
74914
74968
  const owners = [...app.frameworks, app].map((target) => ({
@@ -74973,7 +75027,14 @@ async function swiftPackages(entry, app) {
74973
75027
  entry.moduleRoot,
74974
75028
  import_node_path83.default.join(resolved.toolchainBin, "clang++")
74975
75029
  );
74976
- const cxxArtifacts = reached.filter(standinArtifact);
75030
+ const portableAssembly = await wasmPortableAssembly(
75031
+ reached,
75032
+ resolved.toolchainBin,
75033
+ entry.moduleRoot
75034
+ );
75035
+ const cxxArtifacts = reached.filter(
75036
+ (binary2) => standinArtifact(binary2) && !portableAssembly.has(binary2.target)
75037
+ );
74977
75038
  const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
74978
75039
  if (cached4.standinKey !== generation) {
74979
75040
  const replaced = new Set(
@@ -75000,6 +75061,7 @@ async function swiftPackages(entry, app) {
75000
75061
  [...replaced].filter((target) => !built2.gaps.has(target))
75001
75062
  ),
75002
75063
  binaryGaps: built2.gaps,
75064
+ portableAssembly,
75003
75065
  owners
75004
75066
  });
75005
75067
  for (const target of new Set(built2.standins.map((standin) => standin.target)))
@@ -76988,7 +77050,7 @@ function disposeSwiftProject(packagePath, signal) {
76988
77050
  xcodeProjects().delete(packagePath);
76989
77051
  sourceEntries().delete(packagePath);
76990
77052
  }
76991
- var import_node_async_hooks, import_node_child_process46, import_node_crypto45, import_node_fs86, import_node_os18, import_node_path83, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
77053
+ var import_node_async_hooks, import_node_child_process46, import_node_crypto45, import_node_fs86, import_node_os18, import_node_path83, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
76992
77054
  var init_swift_host = __esm({
76993
77055
  "src/swift-host.ts"() {
76994
77056
  "use strict";
@@ -77042,6 +77104,7 @@ var init_swift_host = __esm({
77042
77104
  sharedXcodeProjects = /* @__PURE__ */ new Map();
77043
77105
  xcodeProjects = () => projectScope.getStore()?.xcodeProjects ?? sharedXcodeProjects;
77044
77106
  preparedScriptInputs = /* @__PURE__ */ new Set();
77107
+ emptyWasmAssembly = /* @__PURE__ */ new Map();
77045
77108
  XCODE_APP_DIR = "__app__";
77046
77109
  XCODE_FRAMEWORKS_DIR = "__frameworks__";
77047
77110
  XCODE_PACKAGES_DIR = SWIFT_REMOTE_PACKAGES_DIR;
@@ -86334,7 +86397,7 @@ var init_nitro_superset = __esm({
86334
86397
  init_nitroContract();
86335
86398
  init_swift_standin_digest();
86336
86399
  NITRO_SUPERSET_ENTRY_NAME = "superset";
86337
- NITRO_COMPILER_DIGEST = true ? "608b1e1ae0987dea6c3662ac92657972a60f85956502d1389192ce91f321d92d" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
86400
+ NITRO_COMPILER_DIGEST = true ? "a16afc2e6e3c68812b9d48ad1c7be8c9d89cfebcf46e269779f2890053244d70" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
86338
86401
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
86339
86402
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
86340
86403
  published2 = /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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;
@@ -30267,17 +30267,17 @@ function remoteSwiftCheckouts(root) {
30267
30267
  return import_node_path41.default.join(import_node_fs40.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
30268
30268
  }
30269
30269
  var UNSUPPORTED_NATIVE = /\.(s|S)$/;
30270
- function unlowerableSources(files2, target) {
30270
+ function unlowerableSources(files2, target, portable) {
30271
30271
  if (target.declaresWasiNativeSettings) return [];
30272
30272
  return [
30273
- ...files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
30273
+ ...portable.has(target.name) ? [] : files2.filter((file) => UNSUPPORTED_NATIVE.test(file)),
30274
30274
  ...files2.filter(isSwiftNativeTranslationUnit).filter((file) => swiftCTakesReturnAddress(import_node_fs40.default.readFileSync(file, "utf8")))
30275
30275
  ];
30276
30276
  }
30277
- function unloweredSources(files2, target) {
30277
+ function unloweredSources(files2, target, portable) {
30278
30278
  if (target.type !== "regular") return null;
30279
30279
  if (!files2.some(isSwiftNativeTranslationUnit)) return null;
30280
- const unlowered = unlowerableSources(files2, target);
30280
+ const unlowered = unlowerableSources(files2, target, portable);
30281
30281
  if (unlowered.length === 0) return null;
30282
30282
  const headers = import_node_path41.default.resolve(target.dir, target.publicHeadersPath);
30283
30283
  if (!files2.some((file) => file.startsWith(`${headers}${import_node_path41.default.sep}`) && file.endsWith(".h")))
@@ -30350,6 +30350,7 @@ async function resolveSwiftPackagesAsync(options) {
30350
30350
  function resolveSwiftPackages(options) {
30351
30351
  const { rootDir, resolved, products, localDirs } = options;
30352
30352
  const providedTargets = new Set(options.provided ?? []);
30353
+ const portableAssembly = options.portableAssembly ?? /* @__PURE__ */ new Set();
30353
30354
  const providedProducts = new Set(options.provided ?? []);
30354
30355
  const result = {
30355
30356
  sourceLinks: { targets: [], owners: [] },
@@ -30447,7 +30448,7 @@ function resolveSwiftPackages(options) {
30447
30448
  if (target.type === "macro") return preservePackage(pkg, [name3], "host");
30448
30449
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
30449
30450
  const gap = options.binaryGaps?.get(name3);
30450
- const unlowerable = unlowerableSources(files2, target);
30451
+ const unlowerable = unlowerableSources(files2, target, portableAssembly);
30451
30452
  const placeholder = placeholderPackage(pkg);
30452
30453
  const ownReason = target.type === "binary" ? `${name3} ${BINARY}${gap ? `; ${gap}` : ""}` : placeholder && gap ? `${name3} stands in as a placeholder (${placeholder}), and ${gap}` : target.type !== "regular" && target.type !== "system" ? `${name3} is a ${target.type} target` : unlowerable.length > 0 ? `${name3} has native sources with no wasm32 lowering: ${unlowerable.map((file) => import_node_path41.default.relative(pkg.manifest.dir, file)).join(", ")}${gap ? `; ${gap}` : ""}` : null;
30453
30454
  const reasons = target.dependencies.map((dependency) => {
@@ -30528,7 +30529,7 @@ function resolveSwiftPackages(options) {
30528
30529
  (file) => file.endsWith(".swift") && import_node_fs40.default.readFileSync(file, "utf8").trim() === ""
30529
30530
  ))
30530
30531
  return false;
30531
- if (unloweredSources(files2, target)) return false;
30532
+ if (unloweredSources(files2, target, portableAssembly)) return false;
30532
30533
  claimed.add(key2);
30533
30534
  providedTargets.delete(name3);
30534
30535
  for (const dependency of target.dependencies) {
@@ -30576,7 +30577,7 @@ function resolveSwiftPackages(options) {
30576
30577
  if (target.type === "executable") continue;
30577
30578
  const files2 = target.type === "regular" || target.type === "system" ? swiftTargetFiles(pkg.manifest, target) : [];
30578
30579
  const objc = target.type === "regular" && files2.some((file) => /\.(m|mm)$/.test(file));
30579
- const unlowered = unloweredSources(files2, target);
30580
+ const unlowered = unloweredSources(files2, target, portableAssembly);
30580
30581
  const gap = placeholderPackage(pkg);
30581
30582
  const sources = files2.filter((file) => file.endsWith(".swift"));
30582
30583
  const release = (setting) => setting.configuration !== "debug";
@@ -30875,7 +30876,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
30875
30876
  return hash.digest("hex");
30876
30877
  }
30877
30878
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
30878
- var STANDIN_SOURCE_DIGEST = true ? "f5dd13fe8982e117facf0d8c668773904364a887ec47c728db7584b73f34d119" : standinSourceDigest();
30879
+ var STANDIN_SOURCE_DIGEST = true ? "c0f609da62368c513c186d23bc8aa8e450d27efae5b8c2e7cdf50d34fa734ff0" : standinSourceDigest();
30879
30880
 
30880
30881
  // src/swift-standins.ts
30881
30882
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -33116,7 +33117,7 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, re
33116
33117
  }
33117
33118
  if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size + forced.size + nonfailable.size === before)
33118
33119
  throw new Error(
33119
- `its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
33120
+ `its generated source does not typecheck: ${(elsewhere.length > 0 ? elsewhere : [...check2.stderr.matchAll(/^\S+?:\d+:\d+: error: .*$/gm)].map((line) => line[0].replace(/^[^:]*\//, ""))).slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
33120
33121
  );
33121
33122
  }
33122
33123
  }
@@ -36161,6 +36162,60 @@ function readXcodeAppTargetPrepared(input, target, configuration, options) {
36161
36162
  deferPackageResolution: true
36162
36163
  });
36163
36164
  }
36165
+ var emptyWasmAssembly = /* @__PURE__ */ new Map();
36166
+ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
36167
+ const assembly = binaries.filter(
36168
+ (binary) => binary.unloweredSources?.length && binary.unloweredSources.every((file) => /\.(s|S)$/.test(file)) && binary.publicHeaders !== void 0
36169
+ );
36170
+ if (assembly.length === 0) return /* @__PURE__ */ new Set();
36171
+ const sdk = swiftSdkPaths(moduleRoot, toolchainBin);
36172
+ const clang = import_node_path54.default.join(toolchainBin, "clang");
36173
+ const empty = (binary, file) => {
36174
+ const source = import_node_path54.default.join(binary.dir, file);
36175
+ const key2 = (0, import_node_crypto29.createHash)("sha256").update(
36176
+ JSON.stringify([
36177
+ clang,
36178
+ sdk.sysroot,
36179
+ sdk.cFlags,
36180
+ binary.dir,
36181
+ binary.publicHeaders
36182
+ ])
36183
+ ).update(import_node_fs53.default.readFileSync(source)).digest("hex");
36184
+ const known = emptyWasmAssembly.get(key2);
36185
+ if (known) return known;
36186
+ const result = new Promise(
36187
+ (resolve2) => (0, import_node_child_process33.execFile)(
36188
+ clang,
36189
+ [
36190
+ "-target",
36191
+ "wasm32-unknown-wasip1",
36192
+ "--sysroot",
36193
+ sdk.sysroot,
36194
+ ...sdk.cFlags,
36195
+ "-I",
36196
+ import_node_path54.default.join(binary.dir, binary.publicHeaders),
36197
+ "-I",
36198
+ import_node_path54.default.dirname(source),
36199
+ "-E",
36200
+ "-P",
36201
+ "-x",
36202
+ "assembler-with-cpp",
36203
+ source
36204
+ ],
36205
+ { maxBuffer: 64 * 1024 * 1024 },
36206
+ (error, stdout) => resolve2(!error && stdout.trim() === "")
36207
+ )
36208
+ );
36209
+ emptyWasmAssembly.set(key2, result);
36210
+ return result;
36211
+ };
36212
+ const portable = await Promise.all(
36213
+ assembly.map(
36214
+ async (binary) => (await Promise.all(binary.unloweredSources.map((file) => empty(binary, file)))).every(Boolean) ? [binary.target] : []
36215
+ )
36216
+ );
36217
+ return new Set(portable.flat());
36218
+ }
36164
36219
  async function swiftPackages(entry, app) {
36165
36220
  const stamp = (file) => import_node_fs53.default.existsSync(file) ? (0, import_node_crypto29.createHash)("sha256").update(import_node_fs53.default.readFileSync(file)).digest("hex") : null;
36166
36221
  const owners = [...app.frameworks, app].map((target) => ({
@@ -36225,7 +36280,14 @@ async function swiftPackages(entry, app) {
36225
36280
  entry.moduleRoot,
36226
36281
  import_node_path54.default.join(resolved.toolchainBin, "clang++")
36227
36282
  );
36228
- const cxxArtifacts = reached.filter(standinArtifact);
36283
+ const portableAssembly = await wasmPortableAssembly(
36284
+ reached,
36285
+ resolved.toolchainBin,
36286
+ entry.moduleRoot
36287
+ );
36288
+ const cxxArtifacts = reached.filter(
36289
+ (binary) => standinArtifact(binary) && !portableAssembly.has(binary.target)
36290
+ );
36229
36291
  const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior);
36230
36292
  if (cached.standinKey !== generation) {
36231
36293
  const replaced = new Set(
@@ -36252,6 +36314,7 @@ async function swiftPackages(entry, app) {
36252
36314
  [...replaced].filter((target) => !built2.gaps.has(target))
36253
36315
  ),
36254
36316
  binaryGaps: built2.gaps,
36317
+ portableAssembly,
36255
36318
  owners
36256
36319
  });
36257
36320
  for (const target of new Set(built2.standins.map((standin) => standin.target)))
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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;
@@ -2923,7 +2923,7 @@ function readIosSdkTree(root) {
2923
2923
 
2924
2924
  // src/swift-standin-digest.ts
2925
2925
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
2926
- var STANDIN_SOURCE_DIGEST = true ? "f5dd13fe8982e117facf0d8c668773904364a887ec47c728db7584b73f34d119" : standinSourceDigest();
2926
+ var STANDIN_SOURCE_DIGEST = true ? "c0f609da62368c513c186d23bc8aa8e450d27efae5b8c2e7cdf50d34fa734ff0" : standinSourceDigest();
2927
2927
 
2928
2928
  // src/expo-native-workspace.ts
2929
2929
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (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.2219 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2220 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2219",
3
+ "version": "0.1.2220",
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",
package/src/swift-host.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AsyncLocalStorage } from 'node:async_hooks'
2
- import { execFileSync } from 'node:child_process'
2
+ import { execFile, execFileSync } from 'node:child_process'
3
3
  import { createHash } from 'node:crypto'
4
4
  // the node host for every Swift preview: package inputs, one compile and
5
5
  // immutable artifact addresses. vite and the foreground CLI adapt this host.
@@ -42,6 +42,7 @@ import {
42
42
  swiftDistributionAt,
43
43
  swiftOptionalFramework,
44
44
  compilerSourceDigest,
45
+ swiftSdkPaths,
45
46
  } from './swift-compile'
46
47
  import {
47
48
  assetSymbolText,
@@ -522,6 +523,79 @@ export function configureSwiftStandinBehavior(
522
523
  const standinBuilds = new Map<string, Promise<SwiftStandins>>()
523
524
 
524
525
  // packages resolve once per set of linked products, pins and local manifests.
526
+ // assembly guarded to the architectures it was written for preprocesses to
527
+ // nothing for wasm32 under the target's own headers and the sdk's c flags, so
528
+ // swiftpm builds that target as plain c instead of it standing in. a file that
529
+ // fails to preprocess (#error on an unknown platform) keeps the stand-in.
530
+ const emptyWasmAssembly = new Map<string, Promise<boolean>>()
531
+ async function wasmPortableAssembly(
532
+ binaries: readonly SwiftPackageBinary[],
533
+ toolchainBin: string,
534
+ moduleRoot: string,
535
+ ): Promise<Set<string>> {
536
+ const assembly = binaries.filter(
537
+ (binary) =>
538
+ binary.unloweredSources?.length &&
539
+ binary.unloweredSources.every((file) => /\.(s|S)$/.test(file)) &&
540
+ binary.publicHeaders !== undefined,
541
+ )
542
+ if (assembly.length === 0) return new Set()
543
+ const sdk = swiftSdkPaths(moduleRoot, toolchainBin)
544
+ const clang = path.join(toolchainBin, 'clang')
545
+ const empty = (binary: SwiftPackageBinary, file: string) => {
546
+ const source = path.join(binary.dir, file)
547
+ const key = createHash('sha256')
548
+ .update(
549
+ JSON.stringify([
550
+ clang,
551
+ sdk.sysroot,
552
+ sdk.cFlags,
553
+ binary.dir,
554
+ binary.publicHeaders,
555
+ ]),
556
+ )
557
+ .update(fs.readFileSync(source))
558
+ .digest('hex')
559
+ const known = emptyWasmAssembly.get(key)
560
+ if (known) return known
561
+ const result = new Promise<boolean>((resolve) =>
562
+ execFile(
563
+ clang,
564
+ [
565
+ '-target',
566
+ 'wasm32-unknown-wasip1',
567
+ '--sysroot',
568
+ sdk.sysroot,
569
+ ...sdk.cFlags,
570
+ '-I',
571
+ path.join(binary.dir, binary.publicHeaders!),
572
+ '-I',
573
+ path.dirname(source),
574
+ '-E',
575
+ '-P',
576
+ '-x',
577
+ 'assembler-with-cpp',
578
+ source,
579
+ ],
580
+ { maxBuffer: 64 * 1024 * 1024 },
581
+ (error, stdout) => resolve(!error && stdout.trim() === ''),
582
+ ),
583
+ )
584
+ emptyWasmAssembly.set(key, result)
585
+ return result
586
+ }
587
+ const portable = await Promise.all(
588
+ assembly.map(async (binary) =>
589
+ (
590
+ await Promise.all(binary.unloweredSources!.map((file) => empty(binary, file)))
591
+ ).every(Boolean)
592
+ ? [binary.target]
593
+ : [],
594
+ ),
595
+ )
596
+ return new Set(portable.flat())
597
+ }
598
+
525
599
  async function swiftPackages(
526
600
  entry: XcodeProjectEntry,
527
601
  app: XcodeAppTarget,
@@ -616,7 +690,14 @@ async function swiftPackages(
616
690
  entry.moduleRoot,
617
691
  path.join(resolved.toolchainBin, 'clang++'),
618
692
  )
619
- const cxxArtifacts = reached.filter(standinArtifact)
693
+ const portableAssembly = await wasmPortableAssembly(
694
+ reached,
695
+ resolved.toolchainBin,
696
+ entry.moduleRoot,
697
+ )
698
+ const cxxArtifacts = reached.filter(
699
+ (binary) => standinArtifact(binary) && !portableAssembly.has(binary.target),
700
+ )
620
701
  const generation = standinGenerationInputs(cxxArtifacts, toolchain, entry.behavior)
621
702
  if (cached.standinKey !== generation) {
622
703
  // an archive other than the one peach ships a module for stands in itself
@@ -648,6 +729,7 @@ async function swiftPackages(
648
729
  [...replaced].filter((target) => !built.gaps.has(target)),
649
730
  ),
650
731
  binaryGaps: built.gaps,
732
+ portableAssembly,
651
733
  owners,
652
734
  })
653
735
  for (const target of new Set(built.standins.map((standin) => standin.target)))