peachsim 0.1.2410 → 0.1.2412
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.
- package/README.md +2 -5
- package/cli/internal-child-contract.ts +0 -1
- package/cli/internal-child.ts +0 -6
- package/cli/outbound-endpoints.ts +0 -23
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +10390 -4177
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +11656 -5443
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +12910 -6697
- package/dist-lib/host/fetch-proxy-handler.cjs +925 -151
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1018 -240
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +934 -156
- package/dist-lib/native-app-identity-project.cjs +9 -5
- package/dist-lib/native-app-identity-project.mjs +9 -5
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +124 -104
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +14016 -7803
- package/dist-lib/swift-compile.cjs +62 -14
- package/dist-lib/swift-compile.mjs +62 -13
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +190 -36
- package/dist-lib/vite.cjs +3101 -2327
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +5 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +3 -3
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +2 -2
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVibrancyEffect.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIVisualEffectView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKitActivity.framework/Headers/UIKitActivity.h +1 -1
- package/src/expo-native-workspace.ts +4 -0
- package/src/nitro-adapter.lock.json +262 -262
- package/src/nitro-superset.lock.json +4 -4
- package/src/podspec-cocoapods.ts +934 -0
- package/src/podspec-prism.ts +66 -0
- package/src/podspec-ruby-stdlib.ts +1121 -0
- package/src/podspec-ruby.ts +5175 -0
- package/src/podspec-sources.ts +25 -112
- package/src/swift-compile.ts +70 -12
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-host.ts +96 -19
- package/src/swift-objc-compile.ts +5 -0
- package/src/swift-packages.ts +46 -0
- package/src/turbo-runtime.lock.json +19 -19
- package/src/xcode-project.ts +17 -7
- package/cli/drivers/linux-cocoapods.lock.json +0 -303
- package/cli/drivers/linux-cocoapods.ts +0 -99
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2412 | (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;
|
|
@@ -85,7 +85,6 @@ __export(swift_compile_exports, {
|
|
|
85
85
|
swiftSystemLibraryExclusions: () => swiftSystemLibraryExclusions,
|
|
86
86
|
swiftSystemLibrarySurface: () => swiftSystemLibrarySurface,
|
|
87
87
|
swiftTargetDependencies: () => swiftTargetDependencies,
|
|
88
|
-
swiftTargetsOnWasmArch: () => swiftTargetsOnWasmArch,
|
|
89
88
|
swiftTypedApplicationEntry: () => swiftTypedApplicationEntry,
|
|
90
89
|
syncSwiftTree: () => syncSwiftTree,
|
|
91
90
|
withNativeSourceGlue: () => withNativeSourceGlue,
|
|
@@ -13866,7 +13865,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
13866
13865
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
13867
13866
|
var MULTI_MANIFEST_VERSION = 71;
|
|
13868
13867
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
13869
|
-
var compilerSourceDigest = true ? "
|
|
13868
|
+
var compilerSourceDigest = true ? "5bdda04d424b3a504c042269bf0bebf701fc0435974970611138a79db9b959cd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
13870
13869
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
13871
13870
|
const hash = (0, import_node_crypto14.createHash)("sha256");
|
|
13872
13871
|
hash.update(`swift-compile
|
|
@@ -14386,6 +14385,8 @@ var ARCH_ARM64 = /\barch\(\s*arm64\s*\)/g;
|
|
|
14386
14385
|
var NOT_ON_IOS = /\b(?:os\(\s*WASI\s*\)|canImport\(\s*FoundationNetworking\s*\))/g;
|
|
14387
14386
|
var DELEGATE_CLASS = /^class\s+[A-Za-z_]\w*\s*(?:<[^>{]*>)?\s*:[^{]*\b(?:UIApplicationDelegate|UISceneDelegate|UIWindowSceneDelegate)\b[^{]*\{/;
|
|
14388
14387
|
var ARM64_MACRO = /^__(?:aarch64|arm64|AARCH64|ARM)/;
|
|
14388
|
+
var WASM_MACRO = /\b__(?:wasm(?:32|64)?|wasi)__\b/;
|
|
14389
|
+
var ARCH_WASM32 = /\barch\(\s*wasm32\s*\)/;
|
|
14389
14390
|
var C_WORDS = new Set(
|
|
14390
14391
|
"auto bool break case char const continue default do double else enum extern false float for goto if inline int long register restrict return short signed sizeof static struct switch true typedef union unsigned void volatile while YES NO NULL nil Nil id self super instancetype".split(
|
|
14391
14392
|
" "
|
|
@@ -14403,18 +14404,28 @@ function headerNamesByArch(headers) {
|
|
|
14403
14404
|
}
|
|
14404
14405
|
};
|
|
14405
14406
|
})();
|
|
14406
|
-
const names = {
|
|
14407
|
+
const names = {
|
|
14408
|
+
arm64: /* @__PURE__ */ new Set(),
|
|
14409
|
+
wasm: /* @__PURE__ */ new Set(),
|
|
14410
|
+
withoutWasm: /* @__PURE__ */ new Set()
|
|
14411
|
+
};
|
|
14412
|
+
const withoutWasm = { ...archEnvironments.wasm, defines: emptyMacroEnvironment.defines };
|
|
14407
14413
|
for (const header of headers) {
|
|
14408
14414
|
const code = stripCCode(header);
|
|
14409
14415
|
const wasm = cActiveCode(code, archEnvironments.wasm).match(/[A-Za-z_]\w*/g) ?? [];
|
|
14410
14416
|
for (const name2 of wasm) names.wasm.add(name2);
|
|
14417
|
+
if (WASM_MACRO.test(code))
|
|
14418
|
+
for (const match of cActiveCode(code, withoutWasm).matchAll(
|
|
14419
|
+
/\b([A-Za-z_]\w*)\s*\(/g
|
|
14420
|
+
))
|
|
14421
|
+
names.withoutWasm.add(match[1]);
|
|
14411
14422
|
if (!/\b__(?:aarch64|arm64|AARCH64|ARM)/.test(code)) continue;
|
|
14412
14423
|
for (const name2 of cActiveCode(code, archEnvironments.arm64).match(/[A-Za-z_]\w*/g) ?? [])
|
|
14413
14424
|
names.arm64.add(name2);
|
|
14414
14425
|
}
|
|
14415
14426
|
return names;
|
|
14416
14427
|
}
|
|
14417
|
-
function
|
|
14428
|
+
function swiftTargetArchitectures(targets, swiftSources, headers) {
|
|
14418
14429
|
const byName = new Map(targets.map((target) => [target.name, target]));
|
|
14419
14430
|
const namesByTarget = /* @__PURE__ */ new Map();
|
|
14420
14431
|
const targetNames = (target) => {
|
|
@@ -14424,6 +14435,7 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14424
14435
|
return names;
|
|
14425
14436
|
};
|
|
14426
14437
|
const onWasm = /* @__PURE__ */ new Set();
|
|
14438
|
+
const withoutWasm = /* @__PURE__ */ new Map();
|
|
14427
14439
|
for (const [name2, sources] of swiftSources) {
|
|
14428
14440
|
const target = byName.get(name2);
|
|
14429
14441
|
if (!target) continue;
|
|
@@ -14435,6 +14447,12 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14435
14447
|
})
|
|
14436
14448
|
].map(targetNames);
|
|
14437
14449
|
const wasm = new Set(visible.flatMap((names) => [...names.wasm]));
|
|
14450
|
+
if (sources.some((source) => ARCH_WASM32.test(source))) {
|
|
14451
|
+
const unavailable = new Set(
|
|
14452
|
+
visible.flatMap((names) => [...names.withoutWasm]).filter((name3) => !wasm.has(name3))
|
|
14453
|
+
);
|
|
14454
|
+
if (unavailable.size) withoutWasm.set(name2, unavailable);
|
|
14455
|
+
}
|
|
14438
14456
|
const arm64Only = [...new Set(visible.flatMap((names) => [...names.arm64]))].filter(
|
|
14439
14457
|
(name3) => !wasm.has(name3) && !C_WORDS.has(name3)
|
|
14440
14458
|
);
|
|
@@ -14443,7 +14461,41 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14443
14461
|
if (sources.some((source) => named.test(source) && named.test(swiftCodeMask(source))))
|
|
14444
14462
|
onWasm.add(name2);
|
|
14445
14463
|
}
|
|
14446
|
-
return onWasm;
|
|
14464
|
+
return { onWasm, withoutWasm };
|
|
14465
|
+
}
|
|
14466
|
+
function swiftWasmCallGuards(source, unavailable) {
|
|
14467
|
+
if (!ARCH_WASM32.test(source)) return source;
|
|
14468
|
+
const code = swiftCodeMask(source);
|
|
14469
|
+
const clauses = /^[ \t]*#(if|elseif|else|endif)\b([^\n]*)/gm;
|
|
14470
|
+
const stack = [];
|
|
14471
|
+
const edits = [];
|
|
14472
|
+
for (const directive of code.matchAll(clauses)) {
|
|
14473
|
+
const kind = directive[1];
|
|
14474
|
+
if (kind !== "if") {
|
|
14475
|
+
const previous = stack.pop();
|
|
14476
|
+
if (previous) {
|
|
14477
|
+
const body = code.slice(previous.body, directive.index);
|
|
14478
|
+
for (const match of body.matchAll(/\b([A-Za-z_]\w*)\s*\(/g)) {
|
|
14479
|
+
if (!unavailable.has(match[1])) continue;
|
|
14480
|
+
const condition = ARCH_WASM32.exec(code.slice(previous.start, previous.body));
|
|
14481
|
+
edits.push([
|
|
14482
|
+
previous.start + condition.index,
|
|
14483
|
+
condition[0].length,
|
|
14484
|
+
"true".padEnd(condition[0].length)
|
|
14485
|
+
]);
|
|
14486
|
+
break;
|
|
14487
|
+
}
|
|
14488
|
+
}
|
|
14489
|
+
}
|
|
14490
|
+
if (kind !== "endif")
|
|
14491
|
+
stack.push(
|
|
14492
|
+
/^\s*!\s*arch\(\s*wasm32\s*\)\s*$/.test(directive[2]) ? { start: directive.index, body: directive.index + directive[0].length } : void 0
|
|
14493
|
+
);
|
|
14494
|
+
}
|
|
14495
|
+
let out = source;
|
|
14496
|
+
for (const [at, width, replacement] of edits.sort((a, b) => b[0] - a[0]))
|
|
14497
|
+
out = out.slice(0, at) + replacement + out.slice(at + width);
|
|
14498
|
+
return out;
|
|
14447
14499
|
}
|
|
14448
14500
|
function compiledSwiftSources(files, targets, overlayFrameworks, headers, nativeSourceGlue = false) {
|
|
14449
14501
|
const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
|
|
@@ -14464,7 +14516,7 @@ function compiledSwiftSources(files, targets, overlayFrameworks, headers, native
|
|
|
14464
14516
|
for (const { source, owner } of owners.values())
|
|
14465
14517
|
if (owner)
|
|
14466
14518
|
swiftSources.set(owner.name, [...swiftSources.get(owner.name) ?? [], source]);
|
|
14467
|
-
const
|
|
14519
|
+
const { onWasm, withoutWasm } = swiftTargetArchitectures(targets, swiftSources, headers);
|
|
14468
14520
|
return new Map(
|
|
14469
14521
|
[...owners].map(([file, { source, owner }]) => {
|
|
14470
14522
|
if (nativeSourceGlue && import_node_path26.default.posix.basename(file) === "OneNativeSource.generated.swift")
|
|
@@ -14472,11 +14524,12 @@ function compiledSwiftSources(files, targets, overlayFrameworks, headers, native
|
|
|
14472
14524
|
const manifest = /(?:^|\/)Package(?:@swift-[\d.]+)?\.swift$/.test(file);
|
|
14473
14525
|
if (manifest && (!owner || /^Package(?:@swift-[\d.]+)?\.swift$/.test(file)))
|
|
14474
14526
|
return [file, source];
|
|
14527
|
+
const unavailable = owner && withoutWasm.get(owner.name);
|
|
14475
14528
|
const ios = swiftSourceAsIOS(
|
|
14476
|
-
source,
|
|
14529
|
+
unavailable ? swiftWasmCallGuards(source, unavailable) : source,
|
|
14477
14530
|
overlayFrameworks,
|
|
14478
14531
|
owner?.defines?.includes(SWIFT_XCODE_BUILD_CONDITION) && !owner.defines.includes("SWIFT_PACKAGE") ? false : void 0,
|
|
14479
|
-
!owner || !
|
|
14532
|
+
!owner || !onWasm.has(owner.name)
|
|
14480
14533
|
);
|
|
14481
14534
|
return [file, withPreconcurrencyFoundationModules(ios)];
|
|
14482
14535
|
})
|
|
@@ -14618,7 +14671,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
|
|
|
14618
14671
|
"NSAssertionHandler",
|
|
14619
14672
|
"NSAttributedStringFormattingContextKey",
|
|
14620
14673
|
"NSBundleResourceRequest",
|
|
14621
|
-
"NSCollectionChangeType",
|
|
14622
14674
|
"NSConditionLock",
|
|
14623
14675
|
"NSException",
|
|
14624
14676
|
"NSExtensionItem",
|
|
@@ -14656,9 +14708,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
|
|
|
14656
14708
|
"NSMetadataQueryAttributeValueTuple",
|
|
14657
14709
|
"NSMetadataQueryDelegate",
|
|
14658
14710
|
"NSMetadataQueryResultGroup",
|
|
14659
|
-
"NSOrderedCollectionChange",
|
|
14660
|
-
"NSOrderedCollectionDifference",
|
|
14661
|
-
"NSOrderedCollectionDifferenceCalculationOptions",
|
|
14662
14711
|
"NSPointerArray",
|
|
14663
14712
|
"NSPredicateValidating",
|
|
14664
14713
|
"NSProxy",
|
|
@@ -18683,7 +18732,6 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
18683
18732
|
swiftSystemLibraryExclusions,
|
|
18684
18733
|
swiftSystemLibrarySurface,
|
|
18685
18734
|
swiftTargetDependencies,
|
|
18686
|
-
swiftTargetsOnWasmArch,
|
|
18687
18735
|
swiftTypedApplicationEntry,
|
|
18688
18736
|
syncSwiftTree,
|
|
18689
18737
|
withNativeSourceGlue,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2412 | (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);
|
|
@@ -13854,7 +13854,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
13854
13854
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
13855
13855
|
var MULTI_MANIFEST_VERSION = 71;
|
|
13856
13856
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
13857
|
-
var compilerSourceDigest = true ? "
|
|
13857
|
+
var compilerSourceDigest = true ? "5bdda04d424b3a504c042269bf0bebf701fc0435974970611138a79db9b959cd" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
13858
13858
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
13859
13859
|
const hash = createHash14("sha256");
|
|
13860
13860
|
hash.update(`swift-compile
|
|
@@ -14374,6 +14374,8 @@ var ARCH_ARM64 = /\barch\(\s*arm64\s*\)/g;
|
|
|
14374
14374
|
var NOT_ON_IOS = /\b(?:os\(\s*WASI\s*\)|canImport\(\s*FoundationNetworking\s*\))/g;
|
|
14375
14375
|
var DELEGATE_CLASS = /^class\s+[A-Za-z_]\w*\s*(?:<[^>{]*>)?\s*:[^{]*\b(?:UIApplicationDelegate|UISceneDelegate|UIWindowSceneDelegate)\b[^{]*\{/;
|
|
14376
14376
|
var ARM64_MACRO = /^__(?:aarch64|arm64|AARCH64|ARM)/;
|
|
14377
|
+
var WASM_MACRO = /\b__(?:wasm(?:32|64)?|wasi)__\b/;
|
|
14378
|
+
var ARCH_WASM32 = /\barch\(\s*wasm32\s*\)/;
|
|
14377
14379
|
var C_WORDS = new Set(
|
|
14378
14380
|
"auto bool break case char const continue default do double else enum extern false float for goto if inline int long register restrict return short signed sizeof static struct switch true typedef union unsigned void volatile while YES NO NULL nil Nil id self super instancetype".split(
|
|
14379
14381
|
" "
|
|
@@ -14391,18 +14393,28 @@ function headerNamesByArch(headers) {
|
|
|
14391
14393
|
}
|
|
14392
14394
|
};
|
|
14393
14395
|
})());
|
|
14394
|
-
const names = {
|
|
14396
|
+
const names = {
|
|
14397
|
+
arm64: /* @__PURE__ */ new Set(),
|
|
14398
|
+
wasm: /* @__PURE__ */ new Set(),
|
|
14399
|
+
withoutWasm: /* @__PURE__ */ new Set()
|
|
14400
|
+
};
|
|
14401
|
+
const withoutWasm = { ...archEnvironments.wasm, defines: emptyMacroEnvironment.defines };
|
|
14395
14402
|
for (const header of headers) {
|
|
14396
14403
|
const code = stripCCode(header);
|
|
14397
14404
|
const wasm = cActiveCode(code, archEnvironments.wasm).match(/[A-Za-z_]\w*/g) ?? [];
|
|
14398
14405
|
for (const name2 of wasm) names.wasm.add(name2);
|
|
14406
|
+
if (WASM_MACRO.test(code))
|
|
14407
|
+
for (const match of cActiveCode(code, withoutWasm).matchAll(
|
|
14408
|
+
/\b([A-Za-z_]\w*)\s*\(/g
|
|
14409
|
+
))
|
|
14410
|
+
names.withoutWasm.add(match[1]);
|
|
14399
14411
|
if (!/\b__(?:aarch64|arm64|AARCH64|ARM)/.test(code)) continue;
|
|
14400
14412
|
for (const name2 of cActiveCode(code, archEnvironments.arm64).match(/[A-Za-z_]\w*/g) ?? [])
|
|
14401
14413
|
names.arm64.add(name2);
|
|
14402
14414
|
}
|
|
14403
14415
|
return names;
|
|
14404
14416
|
}
|
|
14405
|
-
function
|
|
14417
|
+
function swiftTargetArchitectures(targets, swiftSources, headers) {
|
|
14406
14418
|
const byName = new Map(targets.map((target) => [target.name, target]));
|
|
14407
14419
|
const namesByTarget = /* @__PURE__ */ new Map();
|
|
14408
14420
|
const targetNames = (target) => {
|
|
@@ -14412,6 +14424,7 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14412
14424
|
return names;
|
|
14413
14425
|
};
|
|
14414
14426
|
const onWasm = /* @__PURE__ */ new Set();
|
|
14427
|
+
const withoutWasm = /* @__PURE__ */ new Map();
|
|
14415
14428
|
for (const [name2, sources] of swiftSources) {
|
|
14416
14429
|
const target = byName.get(name2);
|
|
14417
14430
|
if (!target) continue;
|
|
@@ -14423,6 +14436,12 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14423
14436
|
})
|
|
14424
14437
|
].map(targetNames);
|
|
14425
14438
|
const wasm = new Set(visible.flatMap((names) => [...names.wasm]));
|
|
14439
|
+
if (sources.some((source) => ARCH_WASM32.test(source))) {
|
|
14440
|
+
const unavailable = new Set(
|
|
14441
|
+
visible.flatMap((names) => [...names.withoutWasm]).filter((name3) => !wasm.has(name3))
|
|
14442
|
+
);
|
|
14443
|
+
if (unavailable.size) withoutWasm.set(name2, unavailable);
|
|
14444
|
+
}
|
|
14426
14445
|
const arm64Only = [...new Set(visible.flatMap((names) => [...names.arm64]))].filter(
|
|
14427
14446
|
(name3) => !wasm.has(name3) && !C_WORDS.has(name3)
|
|
14428
14447
|
);
|
|
@@ -14431,7 +14450,41 @@ function swiftTargetsOnWasmArch(targets, swiftSources, headers) {
|
|
|
14431
14450
|
if (sources.some((source) => named.test(source) && named.test(swiftCodeMask(source))))
|
|
14432
14451
|
onWasm.add(name2);
|
|
14433
14452
|
}
|
|
14434
|
-
return onWasm;
|
|
14453
|
+
return { onWasm, withoutWasm };
|
|
14454
|
+
}
|
|
14455
|
+
function swiftWasmCallGuards(source, unavailable) {
|
|
14456
|
+
if (!ARCH_WASM32.test(source)) return source;
|
|
14457
|
+
const code = swiftCodeMask(source);
|
|
14458
|
+
const clauses = /^[ \t]*#(if|elseif|else|endif)\b([^\n]*)/gm;
|
|
14459
|
+
const stack = [];
|
|
14460
|
+
const edits = [];
|
|
14461
|
+
for (const directive of code.matchAll(clauses)) {
|
|
14462
|
+
const kind = directive[1];
|
|
14463
|
+
if (kind !== "if") {
|
|
14464
|
+
const previous = stack.pop();
|
|
14465
|
+
if (previous) {
|
|
14466
|
+
const body = code.slice(previous.body, directive.index);
|
|
14467
|
+
for (const match of body.matchAll(/\b([A-Za-z_]\w*)\s*\(/g)) {
|
|
14468
|
+
if (!unavailable.has(match[1])) continue;
|
|
14469
|
+
const condition = ARCH_WASM32.exec(code.slice(previous.start, previous.body));
|
|
14470
|
+
edits.push([
|
|
14471
|
+
previous.start + condition.index,
|
|
14472
|
+
condition[0].length,
|
|
14473
|
+
"true".padEnd(condition[0].length)
|
|
14474
|
+
]);
|
|
14475
|
+
break;
|
|
14476
|
+
}
|
|
14477
|
+
}
|
|
14478
|
+
}
|
|
14479
|
+
if (kind !== "endif")
|
|
14480
|
+
stack.push(
|
|
14481
|
+
/^\s*!\s*arch\(\s*wasm32\s*\)\s*$/.test(directive[2]) ? { start: directive.index, body: directive.index + directive[0].length } : void 0
|
|
14482
|
+
);
|
|
14483
|
+
}
|
|
14484
|
+
let out = source;
|
|
14485
|
+
for (const [at, width, replacement] of edits.sort((a, b) => b[0] - a[0]))
|
|
14486
|
+
out = out.slice(0, at) + replacement + out.slice(at + width);
|
|
14487
|
+
return out;
|
|
14435
14488
|
}
|
|
14436
14489
|
function compiledSwiftSources(files, targets, overlayFrameworks, headers, nativeSourceGlue = false) {
|
|
14437
14490
|
const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
|
|
@@ -14452,7 +14505,7 @@ function compiledSwiftSources(files, targets, overlayFrameworks, headers, native
|
|
|
14452
14505
|
for (const { source, owner } of owners.values())
|
|
14453
14506
|
if (owner)
|
|
14454
14507
|
swiftSources.set(owner.name, [...swiftSources.get(owner.name) ?? [], source]);
|
|
14455
|
-
const
|
|
14508
|
+
const { onWasm, withoutWasm } = swiftTargetArchitectures(targets, swiftSources, headers);
|
|
14456
14509
|
return new Map(
|
|
14457
14510
|
[...owners].map(([file, { source, owner }]) => {
|
|
14458
14511
|
if (nativeSourceGlue && path28.posix.basename(file) === "OneNativeSource.generated.swift")
|
|
@@ -14460,11 +14513,12 @@ function compiledSwiftSources(files, targets, overlayFrameworks, headers, native
|
|
|
14460
14513
|
const manifest = /(?:^|\/)Package(?:@swift-[\d.]+)?\.swift$/.test(file);
|
|
14461
14514
|
if (manifest && (!owner || /^Package(?:@swift-[\d.]+)?\.swift$/.test(file)))
|
|
14462
14515
|
return [file, source];
|
|
14516
|
+
const unavailable = owner && withoutWasm.get(owner.name);
|
|
14463
14517
|
const ios = swiftSourceAsIOS(
|
|
14464
|
-
source,
|
|
14518
|
+
unavailable ? swiftWasmCallGuards(source, unavailable) : source,
|
|
14465
14519
|
overlayFrameworks,
|
|
14466
14520
|
owner?.defines?.includes(SWIFT_XCODE_BUILD_CONDITION) && !owner.defines.includes("SWIFT_PACKAGE") ? false : void 0,
|
|
14467
|
-
!owner || !
|
|
14521
|
+
!owner || !onWasm.has(owner.name)
|
|
14468
14522
|
);
|
|
14469
14523
|
return [file, withPreconcurrencyFoundationModules(ios)];
|
|
14470
14524
|
})
|
|
@@ -14606,7 +14660,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
|
|
|
14606
14660
|
"NSAssertionHandler",
|
|
14607
14661
|
"NSAttributedStringFormattingContextKey",
|
|
14608
14662
|
"NSBundleResourceRequest",
|
|
14609
|
-
"NSCollectionChangeType",
|
|
14610
14663
|
"NSConditionLock",
|
|
14611
14664
|
"NSException",
|
|
14612
14665
|
"NSExtensionItem",
|
|
@@ -14644,9 +14697,6 @@ var FOUNDATION_OVERLAY_TYPES = /* @__PURE__ */ new Set([
|
|
|
14644
14697
|
"NSMetadataQueryAttributeValueTuple",
|
|
14645
14698
|
"NSMetadataQueryDelegate",
|
|
14646
14699
|
"NSMetadataQueryResultGroup",
|
|
14647
|
-
"NSOrderedCollectionChange",
|
|
14648
|
-
"NSOrderedCollectionDifference",
|
|
14649
|
-
"NSOrderedCollectionDifferenceCalculationOptions",
|
|
14650
14700
|
"NSPointerArray",
|
|
14651
14701
|
"NSPredicateValidating",
|
|
14652
14702
|
"NSProxy",
|
|
@@ -18670,7 +18720,6 @@ export {
|
|
|
18670
18720
|
swiftSystemLibraryExclusions,
|
|
18671
18721
|
swiftSystemLibrarySurface,
|
|
18672
18722
|
swiftTargetDependencies,
|
|
18673
|
-
swiftTargetsOnWasmArch,
|
|
18674
18723
|
swiftTypedApplicationEntry,
|
|
18675
18724
|
syncSwiftTree,
|
|
18676
18725
|
withNativeSourceGlue,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2412 | (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.
|
|
1
|
+
/*! peach v0.1.2412 | (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.
|
|
1
|
+
/*! peach v0.1.2412 | (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/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2412 | (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;
|