peachsim 0.1.2248 → 0.1.2250

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 (106) hide show
  1. package/cli/bridge-flow-runner.ts +30 -3
  2. package/cli/commands/flow.ts +4 -1
  3. package/cli/commands/inspect/settling.ts +35 -4
  4. package/cli/drivers/playwright.ts +2 -0
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +203 -53
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +1 -1
  28. package/dist-lib/detox/index.cjs +33 -9
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +177 -49
  31. package/dist-lib/expo-swift-metadata.cjs +1 -1
  32. package/dist-lib/expo-swift-metadata.mjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +210 -54
  35. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +45 -14
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +15 -8
  51. package/dist-lib/native-app-identity-project.cjs +2 -2
  52. package/dist-lib/native-app-identity-project.mjs +2 -2
  53. package/dist-lib/native-app-identity.cjs +1 -1
  54. package/dist-lib/native-app-identity.mjs +1 -1
  55. package/dist-lib/native-firebase-metadata.cjs +1 -1
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/pdfium-raster.cjs +1 -1
  58. package/dist-lib/pdfium-raster.mjs +1 -1
  59. package/dist-lib/plist.cjs +1 -1
  60. package/dist-lib/plist.mjs +1 -1
  61. package/dist-lib/profiles.cjs +1 -1
  62. package/dist-lib/public-brand.cjs +1 -1
  63. package/dist-lib/public-origins-lib-esm.json +24 -24
  64. package/dist-lib/public-origins-lib.json +53 -53
  65. package/dist-lib/react-native-host-modules.cjs +1 -1
  66. package/dist-lib/react-native-host-modules.mjs +1 -1
  67. package/dist-lib/reap-browser.cjs +2 -2
  68. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  69. package/dist-lib/sdk.cjs +31 -7
  70. package/dist-lib/sdk.mjs +31 -7
  71. package/dist-lib/skills.cjs +289 -64
  72. package/dist-lib/swift-compile.cjs +165 -38
  73. package/dist-lib/swift-compile.mjs +165 -38
  74. package/dist-lib/swift-package.cjs +1 -1
  75. package/dist-lib/swift-package.mjs +1 -1
  76. package/dist-lib/swift-submit.cjs +1 -1
  77. package/dist-lib/swift-submit.mjs +1 -1
  78. package/dist-lib/swift-toolchain.cjs +1 -1
  79. package/dist-lib/swift.cjs +1 -1
  80. package/dist-lib/vite-swift.cjs +174 -46
  81. package/dist-lib/vite.cjs +15 -8
  82. package/dist-lib/worklet-executable.cjs +1 -1
  83. package/dist-lib/worklet-executable.mjs +1 -1
  84. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
  85. package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +0 -4
  86. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +8 -0
  88. package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +1 -0
  89. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +5 -0
  90. package/kotlin/sdk.tar.gz +0 -0
  91. package/package.json +1 -1
  92. package/runtime-companion.json +1 -1
  93. package/sdk/ios/wasm/include/math.h +1 -1
  94. package/sdk/ios/wasm/include/pthread.h +1 -1
  95. package/src/assetCatalogContract.ts +6 -0
  96. package/src/nitro-compile.ts +23 -1
  97. package/src/process-group.ts +5 -2
  98. package/src/runtime-packs.ts +8 -0
  99. package/src/sfSymbolMetricsContract.ts +73 -37
  100. package/src/swift-compile.ts +119 -13
  101. package/src/swift-guest-image-ledger.ts +10 -5
  102. package/src/swift-guest-link.ts +20 -14
  103. package/src/swift-guest-source-inputs.ts +5 -1
  104. package/src/swift-installed-targets.ts +4 -1
  105. package/src/swift-standins.ts +11 -8
  106. package/src/swift-wasm-prune.ts +33 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2250 | (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;
@@ -3949,8 +3949,9 @@ function readProcessTable(timeoutMs = 1e4, pid) {
3949
3949
  // src/process-group.ts
3950
3950
  var GRACEFUL_TIMEOUT_MS = 3e3;
3951
3951
  var FORCED_EXIT_TIMEOUT_MS = 1e3;
3952
+ var INSPECTION_TIMEOUT_MS = 1e4;
3952
3953
  var FREEZE_GUARD_NAME = "process-freeze-guard";
3953
- function listProcessChildren(parents, timeoutMs = 3e3) {
3954
+ function listProcessChildren(parents, timeoutMs = 1e4) {
3954
3955
  if (parents.some((pid) => !Number.isInteger(pid) || pid <= 1))
3955
3956
  throw new Error("process inspection requires valid parent pids");
3956
3957
  if (parents.length === 0) return [];
@@ -4160,7 +4161,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
4160
4161
  try {
4161
4162
  signalProcessGroup(child, "SIGSTOP");
4162
4163
  let parents = [child.pid];
4163
- const inspectionDeadline = Date.now() + GRACEFUL_TIMEOUT_MS;
4164
+ const inspectionDeadline = Date.now() + INSPECTION_TIMEOUT_MS;
4164
4165
  while (parents.length > 0) {
4165
4166
  const remaining = inspectionDeadline - Date.now();
4166
4167
  if (remaining <= 0) {
@@ -10517,7 +10518,11 @@ function parseWasmObjectBytes(file, buf, isDist, symbolFlagOffsets) {
10517
10518
  objcClassSymToTypePrefix,
10518
10519
  typePrefixesInObj,
10519
10520
  rootFuncs,
10520
- rootSegs
10521
+ rootSegs,
10522
+ segPayloadRanges: sEnds.map((end, i) => [
10523
+ dataStart + sPayloadStarts[i],
10524
+ dataStart + end
10525
+ ])
10521
10526
  };
10522
10527
  }
10523
10528
  function parseWasmObjectCached(file, isDist, useCache) {
@@ -10777,6 +10782,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
10777
10782
  const eagerFiles = [];
10778
10783
  const lazyBuildObjects = /* @__PURE__ */ new Map();
10779
10784
  const extraArchiveObjs = [];
10785
+ const objectBytes = /* @__PURE__ */ new Map();
10780
10786
  let inStartLib = false;
10781
10787
  let swiftrtOrigPath = "";
10782
10788
  for (const t of tokens2) {
@@ -10823,7 +10829,9 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
10823
10829
  } else if (!inStartLib && t.endsWith(".a") && !t.endsWith("libclang_rt.builtins-wasm64.a") && import_node_fs10.default.existsSync(t)) {
10824
10830
  const members2 = readArMembers(new Uint8Array(import_node_fs10.default.readFileSync(t)));
10825
10831
  for (const m of members2) {
10826
- extraArchiveObjs.push(parseWasmObjectBytes(`${t}(${m.name})`, m.bytes, false));
10832
+ const object4 = parseWasmObjectBytes(`${t}(${m.name})`, m.bytes, false);
10833
+ extraArchiveObjs.push(object4);
10834
+ objectBytes.set(object4, Buffer.from(m.bytes));
10827
10835
  }
10828
10836
  }
10829
10837
  }
@@ -11194,9 +11202,28 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
11194
11202
  "$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufC",
11195
11203
  "$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufc"
11196
11204
  ]);
11205
+ const keepObjCClassesNamedInSegment = (obj, segIdx) => {
11206
+ const range2 = obj.segPayloadRanges[segIdx];
11207
+ if (!range2) return;
11208
+ let bytes = objectBytes.get(obj);
11209
+ if (!bytes) objectBytes.set(obj, bytes = import_node_fs10.default.readFileSync(obj.file));
11210
+ const text5 = bytes.toString("latin1", range2[0], range2[1]);
11211
+ for (const match of text5.matchAll(/So(\d+)/g)) {
11212
+ const start = match.index + 2 + match[1].length;
11213
+ const length = Number(match[1]);
11214
+ if (text5[start + length] !== "C") continue;
11215
+ const symbol2 = `._OBJC_CLASS_${text5.slice(start, start + length)}`;
11216
+ for (const provider of lazyProviders.get(symbol2) ?? []) {
11217
+ eagerDynamicObjects.add(provider);
11218
+ extractObject(provider);
11219
+ activateSymbolInObj(provider, provider.symNames.indexOf(symbol2));
11220
+ }
11221
+ }
11222
+ };
11197
11223
  while (workQueue.length > 0) {
11198
11224
  const item = workQueue.pop();
11199
11225
  const obj = item.obj;
11226
+ if (item.kind === "seg") keepObjCClassesNamedInSegment(obj, item.idx);
11200
11227
  let relocs;
11201
11228
  if (item.kind === "func") {
11202
11229
  relocs = obj.funcRelocs[item.idx];
@@ -12046,8 +12073,12 @@ function createGuestImageLedger(input) {
12046
12073
  }
12047
12074
  }
12048
12075
  }
12076
+ const nameBytes = /* @__PURE__ */ new Map();
12077
+ for (const definition2 of definitions)
12078
+ if (!nameBytes.has(definition2.name))
12079
+ nameBytes.set(definition2.name, Buffer.from(definition2.name));
12049
12080
  definitions.sort(
12050
- (a, b) => Buffer.compare(Buffer.from(a.name), Buffer.from(b.name)) || a.image - b.image
12081
+ (a, b) => Buffer.compare(nameBytes.get(a.name), nameBytes.get(b.name)) || a.image - b.image
12051
12082
  );
12052
12083
  const preserveCanonical = /* @__PURE__ */ new Set();
12053
12084
  const definitionsByName = Map.groupBy(definitions, (definition2) => definition2.name);
@@ -12077,12 +12108,12 @@ function createGuestImageLedger(input) {
12077
12108
  preserveCanonical.add(name3);
12078
12109
  for (const name3 of input.commandLineSymbols ?? []) preserveCanonical.add(name3);
12079
12110
  const bindingsByImage = /* @__PURE__ */ new Map();
12111
+ const definitionsByImage = Map.groupBy(definitions, (definition2) => definition2.image);
12080
12112
  for (const caller of input.callers) {
12081
12113
  const bindings = /* @__PURE__ */ new Map();
12082
12114
  const seen = /* @__PURE__ */ new Map();
12083
12115
  for (const image of [caller.image, ...caller.next])
12084
- for (const definition2 of definitions) {
12085
- if (definition2.image !== image) continue;
12116
+ for (const definition2 of definitionsByImage.get(image) ?? []) {
12086
12117
  const previous = seen.get(definition2.name);
12087
12118
  if (previous?.image === definition2.image) {
12088
12119
  if (previous.weak && !definition2.weak) {
@@ -12122,8 +12153,9 @@ function createGuestImageLedger(input) {
12122
12153
  definitionsByAlias.set(definition2.alias, definition2);
12123
12154
  }
12124
12155
  const objects = units.map(({ image, object: object4, aliases, functionImports }) => {
12125
- const bindings = new Map(bindingsByImage.get(image));
12126
- for (const [name3, alias] of startup.get(object4.path) ?? []) bindings.set(name3, alias);
12156
+ const shared = bindingsByImage.get(image);
12157
+ const own = startup.get(object4.path);
12158
+ const bindings = own ? new Map([...shared, ...own]) : shared;
12127
12159
  for (const [name3, type] of functionImports) {
12128
12160
  const alias = bindings.get(name3);
12129
12161
  const provider = alias === void 0 ? void 0 : definitionsByAlias.get(alias);
@@ -13971,6 +14003,7 @@ function linkGuestImages(options) {
13971
14003
  );
13972
14004
  }
13973
14005
  const archives = /* @__PURE__ */ new Map();
14006
+ const memberBytes = /* @__PURE__ */ new Map();
13974
14007
  const prepare = (provider2) => {
13975
14008
  const trace = runLink("discovery", [
13976
14009
  ...withOutput(args, discovery, true),
@@ -14014,20 +14047,23 @@ function linkGuestImages(options) {
14014
14047
  }
14015
14048
  const objectsByImage = /* @__PURE__ */ new Map();
14016
14049
  for (const image of plan.images) objectsByImage.set(image.id, []);
14050
+ const artifacts = new Map(plan.artifacts.map((artifact) => [artifact.path, artifact]));
14017
14051
  for (const item of selected2) {
14018
- const artifact = plan.artifacts.find(
14019
- (candidate) => candidate.path === item.artifact
14020
- );
14052
+ const artifact = artifacts.get(item.artifact);
14021
14053
  const image = selectedGuestInputImage(artifact, item.member);
14022
14054
  let bytes;
14023
14055
  if (item.member === null) bytes = import_node_fs14.default.readFileSync(item.artifact);
14024
14056
  else {
14025
- let members2 = archives.get(item.artifact);
14026
- if (!members2) {
14027
- members2 = readArMembers(import_node_fs14.default.readFileSync(item.artifact));
14057
+ let byName = memberBytes.get(item.artifact);
14058
+ if (!byName) {
14059
+ const members2 = readArMembers(import_node_fs14.default.readFileSync(item.artifact));
14028
14060
  archives.set(item.artifact, members2);
14061
+ byName = /* @__PURE__ */ new Map();
14062
+ for (const member of members2)
14063
+ if (!byName.has(member.name)) byName.set(member.name, member.bytes);
14064
+ memberBytes.set(item.artifact, byName);
14029
14065
  }
14030
- bytes = members2.find((member) => member.name === item.member).bytes;
14066
+ bytes = byName.get(item.member);
14031
14067
  }
14032
14068
  const objects = objectsByImage.get(image);
14033
14069
  if (!objects) throw new Error(`unknown image ${image}`);
@@ -14060,10 +14096,11 @@ function linkGuestImages(options) {
14060
14096
  const { selected, ledger } = prepared;
14061
14097
  const replacements = /* @__PURE__ */ new Map();
14062
14098
  const linkedOwners = /* @__PURE__ */ new Map();
14099
+ const ledgerObjects = new Map(ledger.objects.map((item) => [item.path, item]));
14063
14100
  for (const [index, artifact] of plan.artifacts.entries()) {
14064
14101
  const prefix = `${artifact.path}(`;
14065
14102
  if (artifact.kind === "object") {
14066
- const object4 = ledger.objects.find((item) => item.path === artifact.path);
14103
+ const object4 = ledgerObjects.get(artifact.path);
14067
14104
  if (!object4) continue;
14068
14105
  const output3 = import_node_path14.default.join(directory, `object-${index}.o`);
14069
14106
  import_node_fs14.default.writeFileSync(output3, object4.bytes);
@@ -14083,9 +14120,7 @@ function linkGuestImages(options) {
14083
14120
  const output2 = import_node_path14.default.join(directory, `archive-${index}.a`);
14084
14121
  const inputs = members2.map((member) => {
14085
14122
  const memberOutput = import_node_path14.default.join(memberDir, member.name);
14086
- const rewritten = ledger.objects.find(
14087
- (item) => item.path === `${prefix}${member.name})`
14088
- );
14123
+ const rewritten = ledgerObjects.get(`${prefix}${member.name})`);
14089
14124
  import_node_fs14.default.writeFileSync(memberOutput, rewritten?.bytes ?? member.bytes);
14090
14125
  if (rewritten) {
14091
14126
  linkedOwners.set(
@@ -14424,10 +14459,13 @@ function selectedGuestSymbolInputs(plan, selected) {
14424
14459
  else {
14425
14460
  let members2 = archives.get(item.artifact);
14426
14461
  if (!members2) {
14427
- members2 = readArMembers(import_node_fs14.default.readFileSync(item.artifact));
14462
+ members2 = Map.groupBy(
14463
+ readArMembers(import_node_fs14.default.readFileSync(item.artifact)),
14464
+ (member) => member.name
14465
+ );
14428
14466
  archives.set(item.artifact, members2);
14429
14467
  }
14430
- const matching = members2.filter((member) => member.name === item.member);
14468
+ const matching = members2.get(item.member) ?? [];
14431
14469
  if (matching.length !== 1)
14432
14470
  throw new Error(
14433
14471
  `ambiguous selected symbol input ${item.artifact}(${item.member})`
@@ -14826,9 +14864,10 @@ function sourceGuestClangLinkOptions(options) {
14826
14864
  if (command.tool !== "clang" || compiler !== (0, import_node_fs15.realpathSync)(import_node_path15.default.join(options.toolchainBin, "clang")) && compiler !== (0, import_node_fs15.realpathSync)(import_node_path15.default.join(options.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)))
14827
14865
  throw new Error(`unsupported source object producer ${file}`);
14828
14866
  const args = command.args.slice(1).filter((arg) => arg !== "-c");
14867
+ const targetBuild = import_node_path15.default.relative(options.buildDirectory, file).split(import_node_path15.default.sep).findLast((part) => part !== ".build" && part.endsWith(".build"));
14829
14868
  const outputDirectory = import_node_path15.default.join(
14830
14869
  options.directory,
14831
- import_node_path15.default.basename(import_node_path15.default.dirname(file))
14870
+ targetBuild ?? import_node_path15.default.basename(import_node_path15.default.dirname(file))
14832
14871
  );
14833
14872
  (0, import_node_fs15.mkdirSync)(outputDirectory, { recursive: true });
14834
14873
  const output2 = import_node_path15.default.join(outputDirectory, `clang-link-${index}.ll`);
@@ -16974,6 +17013,52 @@ var clangInterfaceHeader = (header) => header.replace(/^@import (?:UIKitCore|UIK
16974
17013
  /^@import (?:CoreFoundation|FoundationNetworking);$/gm,
16975
17014
  "@import Foundation;"
16976
17015
  ).replace(/\b_TtC10Foundation\d+(NS\w+)\b/g, "$1").replace(/\b__attribute__\(\(objc_subclassing_restricted\)\)\s*/g, "");
17016
+ var objcEnumerations = (header) => [
17017
+ ...header.matchAll(
17018
+ /^\s*typedef\s+(?:NS|CF|SWIFT)_\w*(?:ENUM|OPTIONS)\w*\s*\(\s*\w+\s*,\s*(\w+)\b/gm
17019
+ )
17020
+ ].map((match) => match[1]);
17021
+ function nativelyDeclaredFunctions(generated, headers) {
17022
+ const candidates = [
17023
+ ...new Set(
17024
+ [...generated.matchAll(/^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(/gm)].map(
17025
+ (match) => match[1]
17026
+ )
17027
+ )
17028
+ ];
17029
+ if (candidates.length === 0) return [];
17030
+ const declaration = new RegExp(`^[^\\n#/*]*?\\b(${candidates.join("|")})\\s*\\(`, "gm");
17031
+ const found = /* @__PURE__ */ new Set();
17032
+ for (const header of headers)
17033
+ for (const match of header.matchAll(declaration)) found.add(match[1]);
17034
+ return [...found];
17035
+ }
17036
+ var sdkDeclarationOwners = /* @__PURE__ */ new Map();
17037
+ function sdkObjCDeclarationOwners(frameworks) {
17038
+ const known = sdkDeclarationOwners.get(frameworks);
17039
+ if (known) return known;
17040
+ const owners = /* @__PURE__ */ new Map();
17041
+ for (const framework of (0, import_node_fs27.readdirSync)(frameworks))
17042
+ if (framework.endsWith(".framework")) {
17043
+ const headers = import_node_path27.default.join(frameworks, framework, "Headers");
17044
+ if ((0, import_node_fs27.existsSync)(headers)) {
17045
+ for (const file of (0, import_node_fs27.readdirSync)(headers, { recursive: true, encoding: "utf8" }))
17046
+ if (file.endsWith(".h")) {
17047
+ const header = (0, import_node_fs27.readFileSync)(import_node_path27.default.join(headers, file), "utf8");
17048
+ for (const name3 of [
17049
+ ...swiftInterfaceDeclarations(header),
17050
+ ...objcEnumerations(header),
17051
+ ...[
17052
+ ...header.matchAll(/^[A-Z_]*_(?:EXTERN|EXPORT)\b[^;(\n]*?\b(\w+)\s*\(/gm)
17053
+ ].map((match) => match[1])
17054
+ ])
17055
+ owners.set(name3, framework.slice(0, -".framework".length));
17056
+ }
17057
+ }
17058
+ }
17059
+ sdkDeclarationOwners.set(frameworks, owners);
17060
+ return owners;
17061
+ }
16977
17062
  function swiftHeaderWithSuperclassImports(header, interfaceFor) {
16978
17063
  const superclasses = new Set(
16979
17064
  [...header.matchAll(/@interface\s+\w+\s*:\s*(\w+)/g)].map((match) => match[1])
@@ -17018,6 +17103,10 @@ function withoutSwiftDeclarations(text5, declared, interfaceImport) {
17018
17103
  const name3 = /^\s*(?:[A-Z_]\w*(?:\([^()\n]*\))?\s+)*@(?:protocol|interface)\s+(\w+)\s*(?=[:<{]|$)/.exec(
17019
17104
  line
17020
17105
  )?.[1];
17106
+ const external = /^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(.*\)[^;\n]*;\s*$/.exec(
17107
+ line
17108
+ )?.[1];
17109
+ if (external && declared.has(external)) continue;
17021
17110
  const enumeration = /^\s*typedef\s+(?:NS_ENUM|NS_OPTIONS|SWIFT_ENUM(?:_NAMED)?)\s*\(\s*\w+\s*,\s*(\w+)\b/.exec(
17022
17111
  line
17023
17112
  )?.[1];
@@ -17844,7 +17933,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
17844
17933
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
17845
17934
  var MULTI_MANIFEST_VERSION = 68;
17846
17935
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
17847
- var compilerSourceDigest = true ? "6b31bc2b6f1a60a8ff02569b886f5f3a6cca1ec484cdb3c17ac060942b93cb3e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17936
+ var compilerSourceDigest = true ? "4a1be1d1296381c7090b5b2b704a7d2bebba03ceaa580613acd0f2c39c31ed4c" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
17848
17937
  function swiftArtifactHash(input, release, moduleRoot) {
17849
17938
  const hash = (0, import_node_crypto13.createHash)("sha256");
17850
17939
  hash.update(`swift-compile
@@ -20930,15 +21019,29 @@ module ${moduleName}.Swift {
20930
21019
  [
20931
21020
  "#!/bin/sh",
20932
21021
  "name=",
21022
+ "explicit=",
20933
21023
  "prev=",
20934
21024
  'for arg in "$@"; do',
20935
- ' if [ "$prev" = -o ]; then name=${arg%/*}; name=${name##*/}; fi',
21025
+ " case $arg in -fmodule-name=*) explicit=1 ;; esac",
21026
+ ' if [ "$prev" = -o ]; then',
21027
+ " case $arg in */*) dir=${arg%/*} ;; *) dir= ;; esac",
21028
+ ' while [ -n "$dir" ] && [ "$dir" != / ] && [ "$dir" != . ]; do',
21029
+ " base=${dir##*/}",
21030
+ " case $base in",
21031
+ " .build) break ;;",
21032
+ " *.build) name=${base%.build}; break ;;",
21033
+ " esac",
21034
+ " next=${dir%/*}",
21035
+ ' [ "$next" = "$dir" ] && break',
21036
+ " dir=$next",
21037
+ " done",
21038
+ " fi",
20936
21039
  " prev=$arg",
20937
21040
  "done",
20938
- "case $name in",
20939
- ` *.build) exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "-fmodule-name=\${name%.build}" "$@" ;;`,
20940
- ` *) exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "$@" ;;`,
20941
- "esac",
21041
+ 'if [ -n "$name" ] && [ -z "$explicit" ]; then',
21042
+ ` exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "-fmodule-name=$name" "$@"`,
21043
+ "fi",
21044
+ `exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "$@"`,
20942
21045
  ""
20943
21046
  ].join("\n")
20944
21047
  );
@@ -21405,7 +21508,7 @@ function frameworkLinkClosure(scratch2, roots) {
21405
21508
  const deps = /* @__PURE__ */ new Set();
21406
21509
  for (const file of paths) {
21407
21510
  const module2 = /\/Modules\/([^/]+)\.swiftmodule$/.exec(file);
21408
- const object4 = /\/([^/]+)\.build\/[^/]+\.o$/.exec(file);
21511
+ const object4 = /\/release\/([^/]+)\.build\/.+\.o$/.exec(file);
21409
21512
  if (module2) deps.add(module2[1]);
21410
21513
  else if (object4 && object4[1] !== pending.name) deps.add(object4[1]);
21411
21514
  }
@@ -22085,11 +22188,28 @@ function compileSwiftProjectOnce(input, options) {
22085
22188
  ))
22086
22189
  declared.add(name4);
22087
22190
  }
22088
- const header = withoutSwiftDeclarations(
22191
+ const own = withoutSwiftDeclarations(
22089
22192
  clangInterfaceHeader((0, import_node_fs27.readFileSync)(source, "utf8")),
22090
22193
  declared,
22091
22194
  `#import <${name3}/${name3}.h>`
22092
22195
  );
22196
+ const owners = sdkObjCDeclarationOwners(import_node_path27.default.dirname(import_node_path27.default.dirname(headers)));
22197
+ const foreign = /* @__PURE__ */ new Map();
22198
+ for (const declaration of [
22199
+ ...swiftInterfaceDeclarations(own),
22200
+ ...objcEnumerations(own),
22201
+ ...[...own.matchAll(/^\s*SWIFT_EXTERN\b[^(\n]*?\b(\w+)\s*\(/gm)].map(
22202
+ (match) => match[1]
22203
+ )
22204
+ ]) {
22205
+ const owner = owners.get(declaration);
22206
+ if (owner && owner !== name3) foreign.set(declaration, owner);
22207
+ }
22208
+ const header = foreign.size ? withoutSwiftDeclarations(
22209
+ own,
22210
+ new Set(foreign.keys()),
22211
+ [...new Set(foreign.values())].map((owner) => `#import <${owner}/${owner}.h>`).join("\n")
22212
+ ) : own;
22093
22213
  const value = {
22094
22214
  file: import_node_path27.default.join(root, ".build/peach-framework-objc", `${name3}-Swift.h`),
22095
22215
  header,
@@ -22126,18 +22246,25 @@ function compileSwiftProjectOnce(input, options) {
22126
22246
  `${producer}-Swift.h`
22127
22247
  );
22128
22248
  const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
22129
- if ((0, import_node_fs27.existsSync)(original))
22249
+ if ((0, import_node_fs27.existsSync)(original)) {
22250
+ const generated = clangInterfaceHeader((0, import_node_fs27.readFileSync)(original, "utf8"));
22130
22251
  writeBuildFile(
22131
22252
  emitted,
22132
22253
  withoutSwiftDeclarations(
22133
- swiftHeaderWithSuperclassImports(
22134
- clangInterfaceHeader((0, import_node_fs27.readFileSync)(original, "utf8")),
22135
- frameworkInterface
22136
- ),
22137
- new Set(preparation.nativeHeaderDeclarations[producer]),
22254
+ swiftHeaderWithSuperclassImports(generated, frameworkInterface),
22255
+ /* @__PURE__ */ new Set([
22256
+ ...preparation.nativeHeaderDeclarations[producer] ?? [],
22257
+ ...nativelyDeclaredFunctions(
22258
+ generated,
22259
+ Object.entries(input.files).filter(
22260
+ ([name3]) => name3.endsWith(".h") && !name3.endsWith("-Swift.h")
22261
+ ).map(([, source]) => source)
22262
+ )
22263
+ ]),
22138
22264
  `#import <${producer}/${producer}.h>`
22139
22265
  )
22140
22266
  );
22267
+ }
22141
22268
  }
22142
22269
  }
22143
22270
  const checkpoints = import_node_path27.default.join(
@@ -31361,7 +31488,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
31361
31488
  return hash.digest("hex");
31362
31489
  }
31363
31490
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
31364
- var STANDIN_SOURCE_DIGEST = true ? "7b618908e76b704175d5c94e30ceb691f6a3f50052a1d5a7bc25f24a07375c9b" : standinSourceDigest();
31491
+ var STANDIN_SOURCE_DIGEST = true ? "977c30e838b3cb068d200b9a9a12851b01d2192d0d04e2b5a6abe8189c168d42" : standinSourceDigest();
31365
31492
 
31366
31493
  // src/swift-standins.ts
31367
31494
  var import_node_child_process31 = require("node:child_process");
@@ -32503,9 +32630,9 @@ function exec(file, args, cwd) {
32503
32630
  }
32504
32631
  function failure(error) {
32505
32632
  const output2 = error && typeof error === "object" && "stderr" in error ? `${String(error.stderr)}
32506
- ${"stdout" in error ? String(error.stdout) : ""}` : String(error);
32507
- const errors = output2.split("\n").filter((line) => /^\S.*?:\d+:\d+: error:/.test(line)).map((line) => line.replace(/^.*?:\d+:\d+: error:\s*/, "").trim());
32508
- return [...new Set(errors)].slice(0, 3).join("; ") || output2.trim().slice(0, 400);
32633
+ ${"stdout" in error ? String(error.stdout) : ""}` : error instanceof Error ? error.message : String(error);
32634
+ const errors = output2.split("\n").filter((line) => /^(\S.*?:\d+:\d+: )?error:/.test(line)).map((line) => line.replace(/^(.*?:\d+:\d+: )?error:\s*/, "").trim());
32635
+ return [...new Set(errors)].slice(0, 3).join("; ") || output2.trim().slice(-600);
32509
32636
  }
32510
32637
  var key = (...parts) => (0, import_node_crypto25.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
32511
32638
  var digests = /* @__PURE__ */ new Map();
@@ -33023,6 +33150,8 @@ function peachModuleDirs(toolchain, imports2, sdkIncludes) {
33023
33150
  target,
33024
33151
  "-Xswiftc",
33025
33152
  "-Osize",
33153
+ "-Xswiftc",
33154
+ "-gnone",
33026
33155
  ...plugins.libraries.flatMap((library) => [
33027
33156
  "-Xswiftc",
33028
33157
  "-load-plugin-library",
@@ -34676,10 +34805,9 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
34676
34805
  ) : binary.cxxHeaders ? await cxxStandin(surface, binary, toolchain, dir) : cStandin(surface, binary, toolchain, dir)
34677
34806
  );
34678
34807
  } catch (error) {
34679
- throw new Error(
34680
- `no stand-in for ${surface.module}: ${error instanceof Error && !("stderr" in error) ? error.message : failure(error)}`,
34681
- { cause: error }
34682
- );
34808
+ throw new Error(`no stand-in for ${surface.module}: ${failure(error)}`, {
34809
+ cause: error
34810
+ });
34683
34811
  }
34684
34812
  }
34685
34813
  publish(result);
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2250 | (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;
@@ -129,7 +129,7 @@ var init_process_table = __esm({
129
129
  });
130
130
 
131
131
  // src/process-group.ts
132
- function listProcessChildren(parents, timeoutMs = 3e3) {
132
+ function listProcessChildren(parents, timeoutMs = 1e4) {
133
133
  if (parents.some((pid) => !Number.isInteger(pid) || pid <= 1))
134
134
  throw new Error("process inspection requires valid parent pids");
135
135
  if (parents.length === 0) return [];
@@ -339,7 +339,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
339
339
  try {
340
340
  signalProcessGroup(child, "SIGSTOP");
341
341
  let parents = [child.pid];
342
- const inspectionDeadline = Date.now() + GRACEFUL_TIMEOUT_MS;
342
+ const inspectionDeadline = Date.now() + INSPECTION_TIMEOUT_MS;
343
343
  while (parents.length > 0) {
344
344
  const remaining = inspectionDeadline - Date.now();
345
345
  if (remaining <= 0) {
@@ -435,7 +435,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
435
435
  }
436
436
  if (inspectionError) throw inspectionError;
437
437
  }
438
- var import_node_child_process2, import_node_fs2, import_node_os2, import_node_path, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, FREEZE_GUARD_NAME;
438
+ var import_node_child_process2, import_node_fs2, import_node_os2, import_node_path, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
439
439
  var init_process_group = __esm({
440
440
  "src/process-group.ts"() {
441
441
  "use strict";
@@ -448,6 +448,7 @@ var init_process_group = __esm({
448
448
  init_process_table();
449
449
  GRACEFUL_TIMEOUT_MS = 3e3;
450
450
  FORCED_EXIT_TIMEOUT_MS = 1e3;
451
+ INSPECTION_TIMEOUT_MS = 1e4;
451
452
  FREEZE_GUARD_NAME = "process-freeze-guard";
452
453
  }
453
454
  });
@@ -1058,7 +1059,7 @@ var init_src = __esm({
1058
1059
  var runtime_companion_default;
1059
1060
  var init_runtime_companion = __esm({
1060
1061
  "runtime-companion.json"() {
1061
- runtime_companion_default = { abi: 1, sha256: "0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a", file: "node/cli-0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a.cjs" };
1062
+ runtime_companion_default = { abi: 1, sha256: "15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e", file: "node/cli-15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e.cjs" };
1062
1063
  }
1063
1064
  });
1064
1065
 
@@ -2744,7 +2745,8 @@ var init_runtime_delivery = __esm({
2744
2745
  // src/runtime-packs.ts
2745
2746
  var runtime_packs_exports = {};
2746
2747
  __export(runtime_packs_exports, {
2747
- ensureRuntimePackFor: () => ensureRuntimePackFor
2748
+ ensureRuntimePackFor: () => ensureRuntimePackFor,
2749
+ installAllRuntimePacks: () => installAllRuntimePacks
2748
2750
  });
2749
2751
  function listedFiles(runtimeRoot) {
2750
2752
  let listed = listedByRoot.get(runtimeRoot);
@@ -2807,6 +2809,11 @@ async function ensureRuntimePackFor(runtimeRoot, pathname) {
2807
2809
  if (!/\.m?js$/.test(rel) || import_node_fs13.default.existsSync(import_node_path17.default.join(tenantDir, rel))) return;
2808
2810
  await installNamedPack(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
2809
2811
  }
2812
+ async function installAllRuntimePacks(runtimeRoot) {
2813
+ for (const name2 of Object.keys(readPacks(runtimeRoot) ?? {}))
2814
+ if (!await installNamedPack(runtimeRoot, name2))
2815
+ throw new Error(`runtime pack ${name2} did not install under ${runtimeRoot}`);
2816
+ }
2810
2817
  function installNamedPack(runtimeRoot, name2) {
2811
2818
  if (name2 === RUNTIME_MERGE_PACK_DIR) {
2812
2819
  const tenantDir = import_node_path17.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
@@ -3160,7 +3167,7 @@ var import_plist5 = __toESM(require("plist"), 1);
3160
3167
  init_answeredNativePackages();
3161
3168
 
3162
3169
  // src/swift-standin-digest.ts
3163
- var STANDIN_SOURCE_DIGEST = true ? "7b618908e76b704175d5c94e30ceb691f6a3f50052a1d5a7bc25f24a07375c9b" : standinSourceDigest();
3170
+ var STANDIN_SOURCE_DIGEST = true ? "977c30e838b3cb068d200b9a9a12851b01d2192d0d04e2b5a6abe8189c168d42" : standinSourceDigest();
3164
3171
 
3165
3172
  // cli/commands/detect.ts
3166
3173
  var import_json5 = __toESM(require_lib(), 1);
@@ -6292,7 +6299,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
6292
6299
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
6293
6300
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
6294
6301
  ).join("");
6295
- var compilerSourceDigest = true ? "6b31bc2b6f1a60a8ff02569b886f5f3a6cca1ec484cdb3c17ac060942b93cb3e" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
6302
+ var compilerSourceDigest = true ? "4a1be1d1296381c7090b5b2b704a7d2bebba03ceaa580613acd0f2c39c31ed4c" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
6296
6303
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
6297
6304
  "CFAllocator",
6298
6305
  "CFArray",
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2250 | (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.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2250 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -1243,6 +1243,10 @@ export type CompositorHostToWorker = {
1243
1243
  } | {
1244
1244
  type: 'webViewCaptureStream';
1245
1245
  port: MessagePort;
1246
+ } | {
1247
+ type: 'webViewSnapshot';
1248
+ view: import('./webview-capture-protocol.d.ts').WebViewSnapshotTarget;
1249
+ bitmap: ImageBitmap | null;
1246
1250
  } | {
1247
1251
  type: 'animationClock';
1248
1252
  snapshot: AnimationClockSnapshot;
@@ -6,10 +6,6 @@ export type ImagePixelRequest = {
6
6
  readonly width: number;
7
7
  readonly height: number;
8
8
  } | null;
9
- readonly urgent: boolean;
10
- } | {
11
- readonly kind: 'raise';
12
- readonly id: number;
13
9
  } | {
14
10
  readonly kind: 'cancel';
15
11
  readonly id: number;
@@ -72,6 +72,7 @@ export interface KeyboardShowSpec {
72
72
  spellCheck: boolean;
73
73
  keyboardAppearance: KeyboardAppearance;
74
74
  accessoryBarId: string | null;
75
+ accessoryHeight: number;
75
76
  currentTextIsEmpty: boolean;
76
77
  currentText: string;
77
78
  selectionStart: number;
@@ -6,6 +6,13 @@ import type { SootSimNodeType } from '../engine/types.d.ts';
6
6
  import type { LayoutAnimationConfig } from '../react-native/layout-animation.d.ts';
7
7
  import type { GraphPresentation } from './graph-linked-value.d.ts';
8
8
  import type { WireInlineSources } from './shell-tree-inline-sources.d.ts';
9
+ export interface WireCenteredPlacement {
10
+ leading: number;
11
+ trailing: number;
12
+ margin: number;
13
+ width: number;
14
+ gap: number;
15
+ }
9
16
  export interface WireElementNode {
10
17
  k: 0;
11
18
  id: number;
@@ -13,6 +20,7 @@ export interface WireElementNode {
13
20
  props: Record<string, unknown>;
14
21
  styleRecord: Uint8Array;
15
22
  layoutPlacement?: LayoutHookPlacement;
23
+ centeredPlacement?: WireCenteredPlacement;
16
24
  animDriven?: readonly AnimatedDrivenStyleLease[];
17
25
  animDrivenRetired?: readonly AnimatedDrivenStyleRetirement[];
18
26
  text?: string;
@@ -28,3 +28,4 @@ export declare function isWebViewCaptureRegistration(value: unknown): value is W
28
28
  export interface WebViewCaptureTarget extends WebViewCaptureRegistration {
29
29
  captureGeneration: number;
30
30
  }
31
+ export type WebViewSnapshotTarget = Omit<WebViewCaptureRegistration, 'sourceKey'>;
@@ -426,6 +426,11 @@ export type SootSimMetroDefine = (factory: (globalObj: typeof globalThis, requir
426
426
  export interface SootSimDirectGlobals {
427
427
  __peachPageServingAuthority: PeachPageServingAuthority | null;
428
428
  __peachWebViewHost: (request: SootSimWebViewHostRequest) => Promise<void>;
429
+ __peachWebViewFrame: (instanceId: string) => Promise<{
430
+ width: number;
431
+ height: number;
432
+ rgbaBase64: string;
433
+ } | null>;
429
434
  __sootsimAuxCompositorStats: () => SootSimAuxCompositorStats;
430
435
  __sootsimDeviceSpec: SootSimDeviceSpec;
431
436
  __sootsimDeviceSpecListeners: Set<() => void>;
package/kotlin/sdk.tar.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2248",
3
+ "version": "0.1.2250",
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",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a","file":"node/cli-0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a.cjs"}
1
+ {"abi":1,"sha256":"15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e","file":"node/cli-15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e.cjs"}
@@ -53,7 +53,7 @@ _Float16 __fmaf16(_Float16, _Float16, _Float16);
53
53
  #endif
54
54
 
55
55
  #define PEACH_MATH_PREDICATE(name, builtin, suffix, type) \
56
- static inline int __inline_##name##suffix(type x) { return __builtin_##builtin(x); }
56
+ static __inline__ int __inline_##name##suffix(type x) { return __builtin_##builtin(x); }
57
57
  #define PEACH_MATH_PREDICATES(name, builtin) \
58
58
  PEACH_MATH_PREDICATE(name, builtin, f, float) \
59
59
  PEACH_MATH_PREDICATE(name, builtin, d, double) \
@@ -62,7 +62,7 @@ int pthread_key_delete(pthread_key_t) __asm__("__peach_darwin_pthread_key_delete
62
62
  void * _Nullable pthread_getspecific(pthread_key_t) __asm__("__peach_darwin_pthread_getspecific");
63
63
  int pthread_setspecific(pthread_key_t, const void * _Nullable) __asm__("__peach_darwin_pthread_setspecific");
64
64
  int sched_yield(void);
65
- static inline void pthread_yield_np(void) { sched_yield(); }
65
+ static __inline__ void pthread_yield_np(void) { sched_yield(); }
66
66
  __END_DECLS
67
67
 
68
68
  #define pthread_cleanup_push(func, val) \