peachsim 0.1.2208 → 0.1.2210
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/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 +712 -66
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +700 -60
- 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 +712 -66
- package/dist-lib/host/fetch-proxy-handler.cjs +17 -4
- 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 +17 -4
- 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 +7 -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 +17 -4
- package/dist-lib/native-app-identity-project.cjs +15 -2
- package/dist-lib/native-app-identity-project.mjs +15 -2
- 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 +69 -53
- 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 +5679 -358
- package/dist-lib/swift-compile.cjs +154 -16
- package/dist-lib/swift-compile.mjs +153 -16
- 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 +600 -55
- package/dist-lib/vite.cjs +17 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/render-tree.d.ts +18 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSCompoundPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExpression.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectCollection.h +27 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectSection.h +24 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/Intents.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImpactFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +21 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINibLoading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINotificationFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISelectionFeedbackGenerator.h +1 -1
- package/sdk/ios/usr/include/ObjectiveC.apinotes +7 -0
- package/sdk/ios/usr/lib/swift/Combine.swiftmodule/arm64-apple-ios-simulator.swiftinterface +18 -0
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -0
- package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/wasm/include/pthread.h +1 -0
- package/sdk/ios/wasm/include/signal.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/src/android-theme.ts +136 -2
- package/src/expo-swift-host.ts +90 -1
- package/src/generated/android-framework-text.json +4566 -0
- package/src/generated/android-framework-themes.json +11 -0
- package/src/kotlin-app.ts +24 -4
- package/src/kotlin-host.ts +9 -0
- package/src/native-static-libraries.ts +7 -0
- package/src/nitro-adapter.lock.json +246 -246
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +168 -12
- package/src/swift-distribution.lock.json +8 -8
- package/src/swift-host.ts +22 -3
- package/src/swift-objc-compile.ts +1 -1
- package/src/swift-objc-import.ts +32 -2
- package/src/swift-objc-standin.ts +10 -3
- package/src/swift-packages.ts +53 -28
- package/src/swift-pdf-raster.ts +60 -4
- package/src/swift-shared-sdk.ts +2 -1
- package/src/swift-shipped-archives.json +44 -0
- package/src/swift-shipped-binaries.ts +12 -0
- package/src/swift-standin-builtin-behavior.ts +248 -0
- package/src/swift-standin-emit.ts +11 -3
- package/src/swift-standins.ts +92 -13
- package/src/turbo-runtime.lock.json +17 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2210 | (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;
|
|
@@ -59,6 +59,7 @@ __export(swift_compile_exports, {
|
|
|
59
59
|
swiftCDefinedNames: () => swiftCDefinedNames,
|
|
60
60
|
swiftCMainEntry: () => swiftCMainEntry,
|
|
61
61
|
swiftCPredefines: () => swiftCPredefines,
|
|
62
|
+
swiftCTakesReturnAddress: () => swiftCTakesReturnAddress,
|
|
62
63
|
swiftCodeMask: () => swiftCodeMask,
|
|
63
64
|
swiftCompileSdkOptions: () => swiftCompileSdkOptions,
|
|
64
65
|
swiftCrossImportFlags: () => swiftCrossImportFlags,
|
|
@@ -4147,7 +4148,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4147
4148
|
const overlay = import_node_path8.default.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
|
|
4148
4149
|
const overlayFiles = (0, import_node_fs7.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path8.default.join(entry.parentPath, entry.name)).sort();
|
|
4149
4150
|
const key = JSON.stringify([
|
|
4150
|
-
"
|
|
4151
|
+
"v23",
|
|
4151
4152
|
toolchainBin,
|
|
4152
4153
|
sdk,
|
|
4153
4154
|
frameworks,
|
|
@@ -4204,6 +4205,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4204
4205
|
...[
|
|
4205
4206
|
"MacTypes.h",
|
|
4206
4207
|
"objc/NSObject.h",
|
|
4208
|
+
"ObjectiveC.apinotes",
|
|
4207
4209
|
"net/if.h",
|
|
4208
4210
|
"notify.h",
|
|
4209
4211
|
"notify.modulemap",
|
|
@@ -11041,10 +11043,25 @@ function swiftClangImporterFlags(flags) {
|
|
|
11041
11043
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
11042
11044
|
);
|
|
11043
11045
|
}
|
|
11044
|
-
|
|
11046
|
+
var SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
11047
|
+
function swiftSubmoduleImports(sources) {
|
|
11048
|
+
const imports = /* @__PURE__ */ new Map();
|
|
11049
|
+
for (const source of sources)
|
|
11050
|
+
for (const [, module2, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
11051
|
+
const names = imports.get(module2) ?? /* @__PURE__ */ new Set();
|
|
11052
|
+
names.add(submodule);
|
|
11053
|
+
imports.set(module2, names);
|
|
11054
|
+
}
|
|
11055
|
+
return imports;
|
|
11056
|
+
}
|
|
11057
|
+
function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
11058
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
11059
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
11045
11060
|
return [
|
|
11046
11061
|
`module ${module2} {`,
|
|
11047
|
-
...headers.map(
|
|
11062
|
+
...headers.map(
|
|
11063
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
11064
|
+
),
|
|
11048
11065
|
" export *",
|
|
11049
11066
|
"}",
|
|
11050
11067
|
""
|
|
@@ -12406,6 +12423,88 @@ function swiftSystemLibraryExclusions(files, targets, distributionModules) {
|
|
|
12406
12423
|
)
|
|
12407
12424
|
);
|
|
12408
12425
|
}
|
|
12426
|
+
var DISTRIBUTION_CLANG_MODULES = [
|
|
12427
|
+
{
|
|
12428
|
+
name: "EXStructuredHeaders",
|
|
12429
|
+
header: "EXStructuredHeaders/EXStructuredHeadersParser.h",
|
|
12430
|
+
source: `// Copyright \xA9 2021 650 Industries. All rights reserved.
|
|
12431
|
+
|
|
12432
|
+
#import <Foundation/Foundation.h>
|
|
12433
|
+
|
|
12434
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12435
|
+
|
|
12436
|
+
typedef NS_ENUM(NSInteger, EXStructuredHeadersParserFieldType) {
|
|
12437
|
+
EXStructuredHeadersParserFieldTypeDictionary,
|
|
12438
|
+
EXStructuredHeadersParserFieldTypeList,
|
|
12439
|
+
EXStructuredHeadersParserFieldTypeItem
|
|
12440
|
+
};
|
|
12441
|
+
|
|
12442
|
+
@interface EXStructuredHeadersParser : NSObject
|
|
12443
|
+
|
|
12444
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
12445
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType;
|
|
12446
|
+
|
|
12447
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
12448
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType
|
|
12449
|
+
ignoringParameters:(BOOL)shouldIgnoreParameters;
|
|
12450
|
+
|
|
12451
|
+
- (nullable id)parseStructuredFieldsWithError:(NSError ** _Nullable)error;
|
|
12452
|
+
|
|
12453
|
+
@end
|
|
12454
|
+
|
|
12455
|
+
NS_ASSUME_NONNULL_END
|
|
12456
|
+
`
|
|
12457
|
+
},
|
|
12458
|
+
{
|
|
12459
|
+
name: "EXUpdatesBSPatch",
|
|
12460
|
+
header: "EXUpdatesBSPatch.h",
|
|
12461
|
+
source: `// Copyright 2015-present 650 Industries. All rights reserved.
|
|
12462
|
+
|
|
12463
|
+
#pragma once
|
|
12464
|
+
|
|
12465
|
+
#import <Foundation/Foundation.h>
|
|
12466
|
+
|
|
12467
|
+
int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
12468
|
+
const char * _Nonnull newFilePath,
|
|
12469
|
+
const char * _Nonnull patchFilePath);
|
|
12470
|
+
`
|
|
12471
|
+
}
|
|
12472
|
+
];
|
|
12473
|
+
function distributionClangModulePresent(modules, name2) {
|
|
12474
|
+
return (0, import_node_fs25.existsSync)(import_node_path27.default.join(modules, `${name2}.swiftmodule`)) || (0, import_node_fs25.existsSync)(import_node_path27.default.join(modules, name2, "module.modulemap"));
|
|
12475
|
+
}
|
|
12476
|
+
function distributionClangModuleMap(root, modules) {
|
|
12477
|
+
const missing = DISTRIBUTION_CLANG_MODULES.filter(
|
|
12478
|
+
(mod) => !distributionClangModulePresent(modules, mod.name)
|
|
12479
|
+
);
|
|
12480
|
+
if (missing.length === 0) return null;
|
|
12481
|
+
const key = (0, import_node_crypto13.createHash)("sha256").update(modules).update(missing.map((mod) => `${mod.name}\0${mod.source}`).join("\0")).digest("hex").slice(0, 16);
|
|
12482
|
+
const directory = import_node_path27.default.join(root, `.peach-clang-modules-${key}`);
|
|
12483
|
+
const mapPath = import_node_path27.default.join(directory, "module.modulemap");
|
|
12484
|
+
if (!(0, import_node_fs25.existsSync)(mapPath)) {
|
|
12485
|
+
(0, import_node_fs25.mkdirSync)(directory, { recursive: true });
|
|
12486
|
+
const parts = [];
|
|
12487
|
+
for (const mod of missing) {
|
|
12488
|
+
const destination = import_node_path27.default.join(directory, mod.header);
|
|
12489
|
+
(0, import_node_fs25.mkdirSync)(import_node_path27.default.dirname(destination), { recursive: true });
|
|
12490
|
+
(0, import_node_fs25.writeFileSync)(destination, mod.source);
|
|
12491
|
+
parts.push(
|
|
12492
|
+
`module ${mod.name} {
|
|
12493
|
+
requires objc
|
|
12494
|
+
header "${mod.header}"
|
|
12495
|
+
export *
|
|
12496
|
+
}
|
|
12497
|
+
`
|
|
12498
|
+
);
|
|
12499
|
+
}
|
|
12500
|
+
(0, import_node_fs25.writeFileSync)(mapPath, parts.join("\n"));
|
|
12501
|
+
}
|
|
12502
|
+
return mapPath;
|
|
12503
|
+
}
|
|
12504
|
+
function distributionClangModuleOptions(root, modules) {
|
|
12505
|
+
const map = distributionClangModuleMap(root, modules);
|
|
12506
|
+
return map === null ? [] : ["-Xcc", `-fmodule-map-file=${map}`];
|
|
12507
|
+
}
|
|
12409
12508
|
function providedModulesPath(root, modules, excluded) {
|
|
12410
12509
|
if (!excluded || excluded.size === 0) return modules;
|
|
12411
12510
|
const entries = (0, import_node_fs25.readdirSync)(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
|
|
@@ -12499,7 +12598,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12499
12598
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12500
12599
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12501
12600
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12502
|
-
var compilerSourceDigest = true ? "
|
|
12601
|
+
var compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12503
12602
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12504
12603
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12505
12604
|
hash.update(`swift-compile
|
|
@@ -12773,7 +12872,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
12773
12872
|
import_node_path27.default.join(moduleRoot, "modules"),
|
|
12774
12873
|
args.moduleExcludes
|
|
12775
12874
|
)
|
|
12776
|
-
)}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map}`)}`).join("")}` : "");
|
|
12875
|
+
)}${distributionClangModuleOptions(args.root, import_node_path27.default.join(moduleRoot, "modules")).map((flag) => `, ${JSON.stringify(flag)}`).join("")}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map}`)}`).join("")}` : "");
|
|
12777
12876
|
const nativeFlags = [
|
|
12778
12877
|
...args.nativeFlags?.get(target.name) ?? [],
|
|
12779
12878
|
...args.nativeHeaderFlags ?? []
|
|
@@ -12980,7 +13079,9 @@ function syncSwiftTree(base, files) {
|
|
|
12980
13079
|
const walk = (dir) => {
|
|
12981
13080
|
for (const entry of (0, import_node_fs25.readdirSync)(dir, { withFileTypes: true })) {
|
|
12982
13081
|
const full = import_node_path27.default.join(dir, entry.name);
|
|
12983
|
-
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") ||
|
|
13082
|
+
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") || // distribution clang maps are written beside the project and named
|
|
13083
|
+
// from the compiler flags, so a sync must not remove them.
|
|
13084
|
+
entry.name.startsWith(".peach-clang-modules-") || entry.name === SWIFT_LINK_STAMP))
|
|
12984
13085
|
continue;
|
|
12985
13086
|
if (entry.isDirectory()) walk(full);
|
|
12986
13087
|
else if (!files.has(full)) (0, import_node_fs25.rmSync)(full, { force: true });
|
|
@@ -14129,6 +14230,20 @@ function stripCCode(source) {
|
|
|
14129
14230
|
}
|
|
14130
14231
|
return code;
|
|
14131
14232
|
}
|
|
14233
|
+
var wasmMacroEnvironment = {
|
|
14234
|
+
...emptyMacroEnvironment,
|
|
14235
|
+
defines: /* @__PURE__ */ new Map([
|
|
14236
|
+
["__wasm__", "1"],
|
|
14237
|
+
["__wasm32__", "1"],
|
|
14238
|
+
["__wasi__", "1"]
|
|
14239
|
+
])
|
|
14240
|
+
};
|
|
14241
|
+
function swiftCTakesReturnAddress(source) {
|
|
14242
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
14243
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
14244
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
14245
|
+
);
|
|
14246
|
+
}
|
|
14132
14247
|
function swiftCDefinedNames(sources) {
|
|
14133
14248
|
const names = /* @__PURE__ */ new Set();
|
|
14134
14249
|
for (const source of sources)
|
|
@@ -14476,6 +14591,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14476
14591
|
clangImportedModules.add(name2);
|
|
14477
14592
|
}
|
|
14478
14593
|
}
|
|
14594
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
14595
|
+
Object.entries(input.files).flatMap(
|
|
14596
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
14597
|
+
)
|
|
14598
|
+
);
|
|
14479
14599
|
const headerDirectory = import_node_path27.default.join(layout2.root, ".build", "peach-cxx-headers");
|
|
14480
14600
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
14481
14601
|
if ((0, import_node_fs25.existsSync)(headerDirectory)) {
|
|
@@ -14861,7 +14981,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14861
14981
|
);
|
|
14862
14982
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
14863
14983
|
swiftTargetModuleName(target.name),
|
|
14864
|
-
roots2.map((file) => import_node_path27.default.join(layout2.root, file))
|
|
14984
|
+
roots2.map((file) => import_node_path27.default.join(layout2.root, file)),
|
|
14985
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
14865
14986
|
);
|
|
14866
14987
|
if (moduleContents === void 0)
|
|
14867
14988
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -15186,10 +15307,14 @@ module ${moduleName}.Swift {
|
|
|
15186
15307
|
header ${JSON.stringify(import_node_path27.default.join(headerDirectory, name2 + "-Swift.h"))}
|
|
15187
15308
|
requires objc
|
|
15188
15309
|
}
|
|
15189
|
-
` : swiftObjCModuleMap(
|
|
15190
|
-
|
|
15191
|
-
|
|
15192
|
-
|
|
15310
|
+
` : swiftObjCModuleMap(
|
|
15311
|
+
moduleName,
|
|
15312
|
+
[
|
|
15313
|
+
...(input.nativeTargets?.find((target) => target.name === name2)?.publicHeaders ?? []).map((header) => import_node_path27.default.join(layout2.root, header)),
|
|
15314
|
+
import_node_path27.default.join(headerDirectory, name2 + "-Swift.h")
|
|
15315
|
+
],
|
|
15316
|
+
submoduleImports.get(moduleName)
|
|
15317
|
+
)
|
|
15193
15318
|
);
|
|
15194
15319
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
15195
15320
|
}
|
|
@@ -15199,6 +15324,9 @@ module ${moduleName}.Swift {
|
|
|
15199
15324
|
if (!distribution) {
|
|
15200
15325
|
modulePlan.update((0, import_node_fs25.readFileSync)(import_node_path27.default.join(moduleRoot, "Package.swift")));
|
|
15201
15326
|
}
|
|
15327
|
+
modulePlan.update(
|
|
15328
|
+
Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
|
|
15329
|
+
);
|
|
15202
15330
|
const resourcePlan = (0, import_node_crypto13.createHash)("sha256").update(
|
|
15203
15331
|
JSON.stringify(
|
|
15204
15332
|
resourceTargets.filter((target) => target.resources).map((target) => [
|
|
@@ -15621,6 +15749,10 @@ module ${moduleName}.Swift {
|
|
|
15621
15749
|
import_node_path27.default.join(moduleRoot, "modules"),
|
|
15622
15750
|
moduleExcludes
|
|
15623
15751
|
) : prebuilt ? providedModulesPath(layout2.root, prebuilt.modules, moduleExcludes) : import_node_path27.default.join(layout2.root, ".build", WASM_TRIPLE, "release", "Modules"),
|
|
15752
|
+
...distribution ? distributionClangModuleOptions(
|
|
15753
|
+
layout2.root,
|
|
15754
|
+
import_node_path27.default.join(moduleRoot, "modules")
|
|
15755
|
+
) : [],
|
|
15624
15756
|
...prebuilt?.moduleMaps.flatMap((map) => [
|
|
15625
15757
|
"-Xcc",
|
|
15626
15758
|
`-fmodule-map-file=${map}`
|
|
@@ -16173,8 +16305,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16173
16305
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
16174
16306
|
const objects = linked.objects;
|
|
16175
16307
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
16176
|
-
const
|
|
16177
|
-
|
|
16308
|
+
const constantsDir = import_node_path27.default.join(scratch2, "uniform-type-constants");
|
|
16309
|
+
const constantsStamp = import_node_path27.default.join(constantsDir, ".complete");
|
|
16310
|
+
const object3 = import_node_path27.default.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
16311
|
+
if (!(0, import_node_fs25.existsSync)(constantsStamp) || (0, import_node_fs25.readFileSync)(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
16312
|
+
(0, import_node_fs25.rmSync)(constantsDir, { recursive: true, force: true });
|
|
16313
|
+
(0, import_node_fs25.mkdirSync)(constantsDir);
|
|
16178
16314
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
16179
16315
|
compileUniformTypeConstants({
|
|
16180
16316
|
bin: args.toolchainBin,
|
|
@@ -16182,8 +16318,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16182
16318
|
darwin: sdkPaths2.darwin,
|
|
16183
16319
|
packageRoot: args.moduleRoot,
|
|
16184
16320
|
minimum: darwinRecordsMinimum(),
|
|
16185
|
-
out:
|
|
16321
|
+
out: constantsDir
|
|
16186
16322
|
});
|
|
16323
|
+
(0, import_node_fs25.writeFileSync)(constantsStamp, args.frameworkKey);
|
|
16187
16324
|
}
|
|
16188
16325
|
objects.push(object3);
|
|
16189
16326
|
linked.owners.set(object3, "UniformTypeIdentifiers");
|
|
@@ -16489,7 +16626,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16489
16626
|
report("reusing verified disk artifact");
|
|
16490
16627
|
return retain(root, previous);
|
|
16491
16628
|
}
|
|
16492
|
-
if (!options.intermediates && process.platform === "darwin" && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
16629
|
+
if (!options.intermediates && process.platform === "darwin" && !options.intermediates && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
16493
16630
|
const requestRoot = (0, import_node_fs25.mkdtempSync)(`${root}.builder-request-`);
|
|
16494
16631
|
const output = import_node_path27.default.join(requestRoot, "output");
|
|
16495
16632
|
const request = import_node_path27.default.join(requestRoot, "request.json");
|
|
@@ -16901,6 +17038,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16901
17038
|
swiftCDefinedNames,
|
|
16902
17039
|
swiftCMainEntry,
|
|
16903
17040
|
swiftCPredefines,
|
|
17041
|
+
swiftCTakesReturnAddress,
|
|
16904
17042
|
swiftCodeMask,
|
|
16905
17043
|
swiftCompileSdkOptions,
|
|
16906
17044
|
swiftCrossImportFlags,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2210 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -4094,7 +4094,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4094
4094
|
const overlay = path8.join(swiftSharedSdkRoot(moduleRoot, distribution), "wasm/include");
|
|
4095
4095
|
const overlayFiles = readdirSync4(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path8.join(entry.parentPath, entry.name)).sort();
|
|
4096
4096
|
const key = JSON.stringify([
|
|
4097
|
-
"
|
|
4097
|
+
"v23",
|
|
4098
4098
|
toolchainBin,
|
|
4099
4099
|
sdk,
|
|
4100
4100
|
frameworks,
|
|
@@ -4151,6 +4151,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4151
4151
|
...[
|
|
4152
4152
|
"MacTypes.h",
|
|
4153
4153
|
"objc/NSObject.h",
|
|
4154
|
+
"ObjectiveC.apinotes",
|
|
4154
4155
|
"net/if.h",
|
|
4155
4156
|
"notify.h",
|
|
4156
4157
|
"notify.modulemap",
|
|
@@ -11003,10 +11004,25 @@ function swiftClangImporterFlags(flags) {
|
|
|
11003
11004
|
(flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
|
|
11004
11005
|
);
|
|
11005
11006
|
}
|
|
11006
|
-
|
|
11007
|
+
var SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
|
|
11008
|
+
function swiftSubmoduleImports(sources) {
|
|
11009
|
+
const imports = /* @__PURE__ */ new Map();
|
|
11010
|
+
for (const source of sources)
|
|
11011
|
+
for (const [, module, submodule] of source.matchAll(SWIFT_SUBMODULE_IMPORT)) {
|
|
11012
|
+
const names = imports.get(module) ?? /* @__PURE__ */ new Set();
|
|
11013
|
+
names.add(submodule);
|
|
11014
|
+
imports.set(module, names);
|
|
11015
|
+
}
|
|
11016
|
+
return imports;
|
|
11017
|
+
}
|
|
11018
|
+
function swiftObjCModuleMap(module, headers, submodules = /* @__PURE__ */ new Set()) {
|
|
11019
|
+
const header = (file) => `header ${JSON.stringify(file)}`;
|
|
11020
|
+
const stem = (file) => file.slice(file.lastIndexOf("/") + 1).replace(/\.[^.]*$/, "");
|
|
11007
11021
|
return [
|
|
11008
11022
|
`module ${module} {`,
|
|
11009
|
-
...headers.map(
|
|
11023
|
+
...headers.map(
|
|
11024
|
+
(file) => submodules.has(stem(file)) ? ` module ${stem(file)} { ${header(file)} export * }` : ` ${header(file)}`
|
|
11025
|
+
),
|
|
11010
11026
|
" export *",
|
|
11011
11027
|
"}",
|
|
11012
11028
|
""
|
|
@@ -12386,6 +12402,88 @@ function swiftSystemLibraryExclusions(files, targets, distributionModules) {
|
|
|
12386
12402
|
)
|
|
12387
12403
|
);
|
|
12388
12404
|
}
|
|
12405
|
+
var DISTRIBUTION_CLANG_MODULES = [
|
|
12406
|
+
{
|
|
12407
|
+
name: "EXStructuredHeaders",
|
|
12408
|
+
header: "EXStructuredHeaders/EXStructuredHeadersParser.h",
|
|
12409
|
+
source: `// Copyright \xA9 2021 650 Industries. All rights reserved.
|
|
12410
|
+
|
|
12411
|
+
#import <Foundation/Foundation.h>
|
|
12412
|
+
|
|
12413
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12414
|
+
|
|
12415
|
+
typedef NS_ENUM(NSInteger, EXStructuredHeadersParserFieldType) {
|
|
12416
|
+
EXStructuredHeadersParserFieldTypeDictionary,
|
|
12417
|
+
EXStructuredHeadersParserFieldTypeList,
|
|
12418
|
+
EXStructuredHeadersParserFieldTypeItem
|
|
12419
|
+
};
|
|
12420
|
+
|
|
12421
|
+
@interface EXStructuredHeadersParser : NSObject
|
|
12422
|
+
|
|
12423
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
12424
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType;
|
|
12425
|
+
|
|
12426
|
+
- (instancetype)initWithRawInput:(NSString *)raw
|
|
12427
|
+
fieldType:(EXStructuredHeadersParserFieldType)fieldType
|
|
12428
|
+
ignoringParameters:(BOOL)shouldIgnoreParameters;
|
|
12429
|
+
|
|
12430
|
+
- (nullable id)parseStructuredFieldsWithError:(NSError ** _Nullable)error;
|
|
12431
|
+
|
|
12432
|
+
@end
|
|
12433
|
+
|
|
12434
|
+
NS_ASSUME_NONNULL_END
|
|
12435
|
+
`
|
|
12436
|
+
},
|
|
12437
|
+
{
|
|
12438
|
+
name: "EXUpdatesBSPatch",
|
|
12439
|
+
header: "EXUpdatesBSPatch.h",
|
|
12440
|
+
source: `// Copyright 2015-present 650 Industries. All rights reserved.
|
|
12441
|
+
|
|
12442
|
+
#pragma once
|
|
12443
|
+
|
|
12444
|
+
#import <Foundation/Foundation.h>
|
|
12445
|
+
|
|
12446
|
+
int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
12447
|
+
const char * _Nonnull newFilePath,
|
|
12448
|
+
const char * _Nonnull patchFilePath);
|
|
12449
|
+
`
|
|
12450
|
+
}
|
|
12451
|
+
];
|
|
12452
|
+
function distributionClangModulePresent(modules, name2) {
|
|
12453
|
+
return existsSync5(path27.join(modules, `${name2}.swiftmodule`)) || existsSync5(path27.join(modules, name2, "module.modulemap"));
|
|
12454
|
+
}
|
|
12455
|
+
function distributionClangModuleMap(root, modules) {
|
|
12456
|
+
const missing = DISTRIBUTION_CLANG_MODULES.filter(
|
|
12457
|
+
(mod) => !distributionClangModulePresent(modules, mod.name)
|
|
12458
|
+
);
|
|
12459
|
+
if (missing.length === 0) return null;
|
|
12460
|
+
const key = createHash13("sha256").update(modules).update(missing.map((mod) => `${mod.name}\0${mod.source}`).join("\0")).digest("hex").slice(0, 16);
|
|
12461
|
+
const directory = path27.join(root, `.peach-clang-modules-${key}`);
|
|
12462
|
+
const mapPath = path27.join(directory, "module.modulemap");
|
|
12463
|
+
if (!existsSync5(mapPath)) {
|
|
12464
|
+
mkdirSync6(directory, { recursive: true });
|
|
12465
|
+
const parts = [];
|
|
12466
|
+
for (const mod of missing) {
|
|
12467
|
+
const destination = path27.join(directory, mod.header);
|
|
12468
|
+
mkdirSync6(path27.dirname(destination), { recursive: true });
|
|
12469
|
+
writeFileSync7(destination, mod.source);
|
|
12470
|
+
parts.push(
|
|
12471
|
+
`module ${mod.name} {
|
|
12472
|
+
requires objc
|
|
12473
|
+
header "${mod.header}"
|
|
12474
|
+
export *
|
|
12475
|
+
}
|
|
12476
|
+
`
|
|
12477
|
+
);
|
|
12478
|
+
}
|
|
12479
|
+
writeFileSync7(mapPath, parts.join("\n"));
|
|
12480
|
+
}
|
|
12481
|
+
return mapPath;
|
|
12482
|
+
}
|
|
12483
|
+
function distributionClangModuleOptions(root, modules) {
|
|
12484
|
+
const map = distributionClangModuleMap(root, modules);
|
|
12485
|
+
return map === null ? [] : ["-Xcc", `-fmodule-map-file=${map}`];
|
|
12486
|
+
}
|
|
12389
12487
|
function providedModulesPath(root, modules, excluded) {
|
|
12390
12488
|
if (!excluded || excluded.size === 0) return modules;
|
|
12391
12489
|
const entries = readdirSync8(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
|
|
@@ -12479,7 +12577,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12479
12577
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12480
12578
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12481
12579
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12482
|
-
var compilerSourceDigest = true ? "
|
|
12580
|
+
var compilerSourceDigest = true ? "4fa3e84f8c3b585bc8e864c92f0682e6f02757d455de1ce784f0d40ba9df875a" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12483
12581
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12484
12582
|
const hash = createHash13("sha256");
|
|
12485
12583
|
hash.update(`swift-compile
|
|
@@ -12753,7 +12851,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
12753
12851
|
path27.join(moduleRoot, "modules"),
|
|
12754
12852
|
args.moduleExcludes
|
|
12755
12853
|
)
|
|
12756
|
-
)}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map}`)}`).join("")}` : "");
|
|
12854
|
+
)}${distributionClangModuleOptions(args.root, path27.join(moduleRoot, "modules")).map((flag) => `, ${JSON.stringify(flag)}`).join("")}` : prebuilt ? `, "-Isystem", ${JSON.stringify(providedModulesPath(args.root, prebuilt.modules, args.moduleExcludes))}${prebuilt.moduleMaps.map((map) => `, "-Xcc", ${JSON.stringify(`-fmodule-map-file=${map}`)}`).join("")}` : "");
|
|
12757
12855
|
const nativeFlags = [
|
|
12758
12856
|
...args.nativeFlags?.get(target.name) ?? [],
|
|
12759
12857
|
...args.nativeHeaderFlags ?? []
|
|
@@ -12960,7 +13058,9 @@ function syncSwiftTree(base, files) {
|
|
|
12960
13058
|
const walk = (dir) => {
|
|
12961
13059
|
for (const entry of readdirSync8(dir, { withFileTypes: true })) {
|
|
12962
13060
|
const full = path27.join(dir, entry.name);
|
|
12963
|
-
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") ||
|
|
13061
|
+
if (dir === base && (entry.name === ".build" || entry.name.startsWith(".peach-modules-") || // distribution clang maps are written beside the project and named
|
|
13062
|
+
// from the compiler flags, so a sync must not remove them.
|
|
13063
|
+
entry.name.startsWith(".peach-clang-modules-") || entry.name === SWIFT_LINK_STAMP))
|
|
12964
13064
|
continue;
|
|
12965
13065
|
if (entry.isDirectory()) walk(full);
|
|
12966
13066
|
else if (!files.has(full)) rmSync6(full, { force: true });
|
|
@@ -14109,6 +14209,20 @@ function stripCCode(source) {
|
|
|
14109
14209
|
}
|
|
14110
14210
|
return code;
|
|
14111
14211
|
}
|
|
14212
|
+
var wasmMacroEnvironment = {
|
|
14213
|
+
...emptyMacroEnvironment,
|
|
14214
|
+
defines: /* @__PURE__ */ new Map([
|
|
14215
|
+
["__wasm__", "1"],
|
|
14216
|
+
["__wasm32__", "1"],
|
|
14217
|
+
["__wasi__", "1"]
|
|
14218
|
+
])
|
|
14219
|
+
};
|
|
14220
|
+
function swiftCTakesReturnAddress(source) {
|
|
14221
|
+
if (!source.includes("__builtin_return_address")) return false;
|
|
14222
|
+
return /\b__builtin_return_address\s*\(/.test(
|
|
14223
|
+
cActiveCode(stripCCode(source), wasmMacroEnvironment)
|
|
14224
|
+
);
|
|
14225
|
+
}
|
|
14112
14226
|
function swiftCDefinedNames(sources) {
|
|
14113
14227
|
const names = /* @__PURE__ */ new Set();
|
|
14114
14228
|
for (const source of sources)
|
|
@@ -14456,6 +14570,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14456
14570
|
clangImportedModules.add(name2);
|
|
14457
14571
|
}
|
|
14458
14572
|
}
|
|
14573
|
+
const submoduleImports = swiftSubmoduleImports(
|
|
14574
|
+
Object.entries(input.files).flatMap(
|
|
14575
|
+
([file, contents]) => file.endsWith(".swift") ? [contents] : []
|
|
14576
|
+
)
|
|
14577
|
+
);
|
|
14459
14578
|
const headerDirectory = path27.join(layout2.root, ".build", "peach-cxx-headers");
|
|
14460
14579
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
14461
14580
|
if (existsSync5(headerDirectory)) {
|
|
@@ -14841,7 +14960,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14841
14960
|
);
|
|
14842
14961
|
const moduleContents = originalModuleMap ? input.files[originalModuleMap[1]] : swiftpmModuleMap?.contents ?? packageModuleMap?.[1] ?? swiftObjCModuleMap(
|
|
14843
14962
|
swiftTargetModuleName(target.name),
|
|
14844
|
-
roots2.map((file) => path27.join(layout2.root, file))
|
|
14963
|
+
roots2.map((file) => path27.join(layout2.root, file)),
|
|
14964
|
+
submoduleImports.get(swiftTargetModuleName(target.name))
|
|
14845
14965
|
);
|
|
14846
14966
|
if (moduleContents === void 0)
|
|
14847
14967
|
throw new Error("missing original module map " + modulemap);
|
|
@@ -15166,10 +15286,14 @@ module ${moduleName}.Swift {
|
|
|
15166
15286
|
header ${JSON.stringify(path27.join(headerDirectory, name2 + "-Swift.h"))}
|
|
15167
15287
|
requires objc
|
|
15168
15288
|
}
|
|
15169
|
-
` : swiftObjCModuleMap(
|
|
15170
|
-
|
|
15171
|
-
|
|
15172
|
-
|
|
15289
|
+
` : swiftObjCModuleMap(
|
|
15290
|
+
moduleName,
|
|
15291
|
+
[
|
|
15292
|
+
...(input.nativeTargets?.find((target) => target.name === name2)?.publicHeaders ?? []).map((header) => path27.join(layout2.root, header)),
|
|
15293
|
+
path27.join(headerDirectory, name2 + "-Swift.h")
|
|
15294
|
+
],
|
|
15295
|
+
submoduleImports.get(moduleName)
|
|
15296
|
+
)
|
|
15173
15297
|
);
|
|
15174
15298
|
nativeHeaderFlags.push("-fmodule-map-file=" + modulemap);
|
|
15175
15299
|
}
|
|
@@ -15179,6 +15303,9 @@ module ${moduleName}.Swift {
|
|
|
15179
15303
|
if (!distribution) {
|
|
15180
15304
|
modulePlan.update(readFileSync16(path27.join(moduleRoot, "Package.swift")));
|
|
15181
15305
|
}
|
|
15306
|
+
modulePlan.update(
|
|
15307
|
+
Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
|
|
15308
|
+
);
|
|
15182
15309
|
const resourcePlan = createHash13("sha256").update(
|
|
15183
15310
|
JSON.stringify(
|
|
15184
15311
|
resourceTargets.filter((target) => target.resources).map((target) => [
|
|
@@ -15601,6 +15728,10 @@ module ${moduleName}.Swift {
|
|
|
15601
15728
|
path27.join(moduleRoot, "modules"),
|
|
15602
15729
|
moduleExcludes
|
|
15603
15730
|
) : prebuilt ? providedModulesPath(layout2.root, prebuilt.modules, moduleExcludes) : path27.join(layout2.root, ".build", WASM_TRIPLE, "release", "Modules"),
|
|
15731
|
+
...distribution ? distributionClangModuleOptions(
|
|
15732
|
+
layout2.root,
|
|
15733
|
+
path27.join(moduleRoot, "modules")
|
|
15734
|
+
) : [],
|
|
15604
15735
|
...prebuilt?.moduleMaps.flatMap((map) => [
|
|
15605
15736
|
"-Xcc",
|
|
15606
15737
|
`-fmodule-map-file=${map}`
|
|
@@ -16153,8 +16284,12 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16153
16284
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
16154
16285
|
const objects = linked.objects;
|
|
16155
16286
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
16156
|
-
const
|
|
16157
|
-
|
|
16287
|
+
const constantsDir = path27.join(scratch2, "uniform-type-constants");
|
|
16288
|
+
const constantsStamp = path27.join(constantsDir, ".complete");
|
|
16289
|
+
const object3 = path27.join(constantsDir, "UniformTypeIdentifiers-NativeConstants.o");
|
|
16290
|
+
if (!existsSync5(constantsStamp) || readFileSync16(constantsStamp, "utf8") !== args.frameworkKey) {
|
|
16291
|
+
rmSync6(constantsDir, { recursive: true, force: true });
|
|
16292
|
+
mkdirSync6(constantsDir);
|
|
16158
16293
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
16159
16294
|
compileUniformTypeConstants({
|
|
16160
16295
|
bin: args.toolchainBin,
|
|
@@ -16162,8 +16297,9 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16162
16297
|
darwin: sdkPaths2.darwin,
|
|
16163
16298
|
packageRoot: args.moduleRoot,
|
|
16164
16299
|
minimum: darwinRecordsMinimum(),
|
|
16165
|
-
out:
|
|
16300
|
+
out: constantsDir
|
|
16166
16301
|
});
|
|
16302
|
+
writeFileSync7(constantsStamp, args.frameworkKey);
|
|
16167
16303
|
}
|
|
16168
16304
|
objects.push(object3);
|
|
16169
16305
|
linked.owners.set(object3, "UniformTypeIdentifiers");
|
|
@@ -16469,7 +16605,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16469
16605
|
report("reusing verified disk artifact");
|
|
16470
16606
|
return retain(root, previous);
|
|
16471
16607
|
}
|
|
16472
|
-
if (!options.intermediates && process.platform === "darwin" && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
16608
|
+
if (!options.intermediates && process.platform === "darwin" && !options.intermediates && process.env.TM_SESSION && !windowAdmission() && process.env.CI !== "true" && moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(moduleRoot)) {
|
|
16473
16609
|
const requestRoot = mkdtempSync3(`${root}.builder-request-`);
|
|
16474
16610
|
const output = path27.join(requestRoot, "output");
|
|
16475
16611
|
const request = path27.join(requestRoot, "request.json");
|
|
@@ -16880,6 +17016,7 @@ export {
|
|
|
16880
17016
|
swiftCDefinedNames,
|
|
16881
17017
|
swiftCMainEntry,
|
|
16882
17018
|
swiftCPredefines,
|
|
17019
|
+
swiftCTakesReturnAddress,
|
|
16883
17020
|
swiftCodeMask,
|
|
16884
17021
|
swiftCompileSdkOptions,
|
|
16885
17022
|
swiftCrossImportFlags,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2210 | (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.2210 | (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.2210 | (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.2210 | (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;
|