peachsim 0.1.1815 → 0.1.1817
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/cli/commands/package.ts +82 -31
- package/cli/outbound-endpoints.ts +1 -1
- package/cli/packaged-app-launcher.ts +6 -1
- 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 +4418 -5235
- 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 +12 -3
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3932 -4526
- 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 +3289 -4175
- package/dist-lib/host/fetch-proxy-handler.cjs +12 -3
- 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 +13 -24
- 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 +13 -24
- package/dist-lib/native-app-identity-project.cjs +2 -22
- package/dist-lib/native-app-identity-project.mjs +2 -22
- 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 +74 -66
- 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 +3793 -4671
- package/dist-lib/swift-compile.cjs +216 -242
- package/dist-lib/swift-compile.mjs +216 -242
- 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 +251 -236
- package/dist-lib/vite.cjs +12 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/answeredNativePackages.ts +41 -0
- package/src/cli-runtime.ts +2 -9
- package/src/expo-discovery-cache.ts +2 -0
- package/src/expo-kotlin-host.ts +11 -9
- package/src/expo-swift-host.ts +10 -6
- package/src/nitro-bundle.ts +8 -6
- package/src/nitro-compiler-digest.ts +2 -4
- package/src/nitro-superset.lock.json +19 -251
- package/src/nitro-superset.ts +59 -63
- package/src/react-native-bridge-modules.ts +2 -4
- package/src/swift-compile.ts +258 -254
- package/src/swift-objc-standin.ts +10 -6
- package/src/swift-standins.ts +36 -12
- package/src/turbo-source.ts +2 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1817 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -3744,26 +3744,6 @@ var NATIVE_GRAPH_INPUTS = {
|
|
|
3744
3744
|
target: IOS_SDK_TARGET
|
|
3745
3745
|
};
|
|
3746
3746
|
var NATIVE_GRAPH_ID = createHash3("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
|
|
3747
|
-
function stripExternalSourceMarks(text2) {
|
|
3748
|
-
return text2.split("\n").map(
|
|
3749
|
-
(line) => line.startsWith("#define PEACH_SWIFT_CLASS(") ? line : line.replace(/PEACH_SWIFT_CLASS\(\w+\)\s*/g, "")
|
|
3750
|
-
).join("\n");
|
|
3751
|
-
}
|
|
3752
|
-
function iosSdkEntries() {
|
|
3753
|
-
const overlays = Object.entries(IOS_SDK_OVERLAYS).map(
|
|
3754
|
-
([module, text2]) => [
|
|
3755
|
-
`usr/lib/swift/${module}.swiftmodule/arm64-apple-ios-simulator.swiftinterface`,
|
|
3756
|
-
`// swift-interface-format-version: 1.0
|
|
3757
|
-
// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}
|
|
3758
|
-
${text2}`
|
|
3759
|
-
]
|
|
3760
|
-
);
|
|
3761
|
-
const headers = Object.entries(IOS_SDK_HEADERS).map(
|
|
3762
|
-
([file, text2]) => [file, stripExternalSourceMarks(text2)]
|
|
3763
|
-
);
|
|
3764
|
-
return [...headers, ...overlays].sort(([a], [b]) => a < b ? -1 : 1);
|
|
3765
|
-
}
|
|
3766
|
-
var IOS_SDK_ID = createHash3("sha256").update(JSON.stringify(iosSdkEntries())).digest("hex").slice(0, 16);
|
|
3767
3747
|
function objcSdkIntakeFlags(headers, toolchainBin, minimum) {
|
|
3768
3748
|
return [
|
|
3769
3749
|
...swiftObjCPlatformFlags(toolchainBin, minimum),
|
|
@@ -7822,7 +7802,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7822
7802
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7823
7803
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7824
7804
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7825
|
-
var compilerSourceDigest = true ? "
|
|
7805
|
+
var compilerSourceDigest = true ? "1519f1f37c446535792f7bb0c9ba9c5e59b0b0f87d7b5c849346abe684325aa7" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
7826
7806
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7827
7807
|
const hash = createHash8("sha256");
|
|
7828
7808
|
hash.update(`swift-compile
|
|
@@ -11637,245 +11617,239 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11637
11617
|
`swift-compile: no swift.org toolchain at ${options.toolchainBin}; install ${options.release} and its matching wasm sdk`
|
|
11638
11618
|
);
|
|
11639
11619
|
}
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
}
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
swift,
|
|
11681
|
-
sdk,
|
|
11682
|
-
toolchainBin: options.toolchainBin,
|
|
11683
|
-
plugins: macroPlugins,
|
|
11684
|
-
buildOptions
|
|
11685
|
-
});
|
|
11686
|
-
await pruneFrameworkScratches(frameworkKey);
|
|
11687
|
-
}
|
|
11688
|
-
if (options.project) removeProjectLinks(root);
|
|
11689
|
-
if (retireStaleSwiftLink(
|
|
11690
|
-
root,
|
|
11691
|
-
swiftLinkStamp({
|
|
11692
|
-
frameworkKey,
|
|
11693
|
-
prebuilt
|
|
11694
|
-
})
|
|
11695
|
-
))
|
|
11696
|
-
report("framework revision changed; rebuilding the app link");
|
|
11697
|
-
const preparation = writeSwiftProject(
|
|
11698
|
-
layout,
|
|
11620
|
+
const frameworkScratch = swiftFrameworkScratch(frameworkKey);
|
|
11621
|
+
const withFrameworkLock = (work) => distribution ? work() : withSwiftRootLock(frameworkScratch, work, options.signal);
|
|
11622
|
+
return withFrameworkLock(async (frameworkLease) => {
|
|
11623
|
+
const frameworkRoot = stageFrameworkSource(moduleRoot, frameworkKey);
|
|
11624
|
+
report("preparing compiler plugins");
|
|
11625
|
+
const pluginsFor = (pluginLease) => ensureMacroPlugins(
|
|
11626
|
+
frameworkRoot,
|
|
11627
|
+
options.toolchainBin,
|
|
11628
|
+
options.release,
|
|
11629
|
+
options.signal,
|
|
11630
|
+
pluginLease
|
|
11631
|
+
);
|
|
11632
|
+
const macroPlugins = distribution ? await withSwiftRootLock(frameworkScratch, pluginsFor, options.signal) : await pluginsFor(frameworkLease);
|
|
11633
|
+
const sdk = swiftModuleSdk(frameworkRoot).wasmSdkId;
|
|
11634
|
+
const icu = swiftIcuAsset(options.toolchainBin, sdk);
|
|
11635
|
+
const buildOptions = {
|
|
11636
|
+
env: {
|
|
11637
|
+
...options.project?.env ?? process.env,
|
|
11638
|
+
// shipped host plugins resolve against the selected compiler's runtime.
|
|
11639
|
+
...process.platform === "linux" ? {
|
|
11640
|
+
LD_LIBRARY_PATH: [
|
|
11641
|
+
path19.resolve(options.toolchainBin, "../lib/swift/linux"),
|
|
11642
|
+
path19.resolve(options.toolchainBin, "../lib/swift/host"),
|
|
11643
|
+
process.env.LD_LIBRARY_PATH
|
|
11644
|
+
].filter(Boolean).join(":")
|
|
11645
|
+
} : {},
|
|
11646
|
+
...input.lazyDistribution ? { PEACH_DEFER_WASM_LINK: "1" } : {}
|
|
11647
|
+
},
|
|
11648
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
11649
|
+
timeout: options.timeoutMs,
|
|
11650
|
+
signal: options.signal,
|
|
11651
|
+
lease,
|
|
11652
|
+
frameworkLease
|
|
11653
|
+
};
|
|
11654
|
+
let prebuilt;
|
|
11655
|
+
if (!distribution) {
|
|
11656
|
+
report("compiling framework products");
|
|
11657
|
+
prebuilt = await compileFrameworkProducts({
|
|
11658
|
+
moduleRoot: frameworkRoot,
|
|
11659
|
+
frameworkKey,
|
|
11699
11660
|
input,
|
|
11700
|
-
|
|
11661
|
+
swift,
|
|
11662
|
+
sdk,
|
|
11663
|
+
toolchainBin: options.toolchainBin,
|
|
11664
|
+
plugins: macroPlugins,
|
|
11665
|
+
buildOptions
|
|
11666
|
+
});
|
|
11667
|
+
await pruneFrameworkScratches(frameworkKey);
|
|
11668
|
+
}
|
|
11669
|
+
if (options.project) removeProjectLinks(root);
|
|
11670
|
+
if (retireStaleSwiftLink(
|
|
11671
|
+
root,
|
|
11672
|
+
swiftLinkStamp({
|
|
11673
|
+
frameworkKey,
|
|
11701
11674
|
prebuilt
|
|
11675
|
+
})
|
|
11676
|
+
))
|
|
11677
|
+
report("framework revision changed; rebuilding the app link");
|
|
11678
|
+
const preparation = writeSwiftProject(layout, input, frameworkRoot, prebuilt);
|
|
11679
|
+
writeSwiftAutolinkLinker(root, options.toolchainBin);
|
|
11680
|
+
const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
|
|
11681
|
+
const appOptions = projectProcess ? {
|
|
11682
|
+
...buildOptions,
|
|
11683
|
+
uid: projectProcess.uid,
|
|
11684
|
+
gid: projectProcess.gid,
|
|
11685
|
+
confined: projectProcess.env
|
|
11686
|
+
} : buildOptions;
|
|
11687
|
+
const unprepared = preparation.targetFailures.map(
|
|
11688
|
+
(failure) => `error: target ${failure}`
|
|
11689
|
+
);
|
|
11690
|
+
const forwarders = /* @__PURE__ */ new Map();
|
|
11691
|
+
for (const [file, text2] of Object.entries(input.files)) {
|
|
11692
|
+
const parents = /^#include "((?:\.\.\/)+)[^"\n]+"\n$/.exec(text2)?.[1];
|
|
11693
|
+
if (!parents) continue;
|
|
11694
|
+
const directory = path19.posix.dirname(file);
|
|
11695
|
+
forwarders.set(
|
|
11696
|
+
`${path19.join(root, directory)}/${parents.slice(0, -1)}`,
|
|
11697
|
+
path19.posix.join("build", directory, parents).replace(/\/$/, "")
|
|
11702
11698
|
);
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
)
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11699
|
+
}
|
|
11700
|
+
const buildArgs = [
|
|
11701
|
+
"build",
|
|
11702
|
+
...projectProcess?.cacheOptions ?? swiftPackageCacheOptions(),
|
|
11703
|
+
"--build-system",
|
|
11704
|
+
"native",
|
|
11705
|
+
"-j",
|
|
11706
|
+
BUILD_JOBS,
|
|
11707
|
+
"--package-path",
|
|
11708
|
+
root,
|
|
11709
|
+
...swiftCompileSdkOptions(frameworkRoot, options.toolchainBin),
|
|
11710
|
+
"--swift-sdk",
|
|
11711
|
+
sdk,
|
|
11712
|
+
...input.packageFiles || prebuilt ? ["--toolset", path19.join(root, ".peach-target-toolset.json")] : [],
|
|
11713
|
+
"-c",
|
|
11714
|
+
"release",
|
|
11715
|
+
"-Xswiftc",
|
|
11716
|
+
"-num-threads",
|
|
11717
|
+
"-Xswiftc",
|
|
11718
|
+
BUILD_JOBS,
|
|
11719
|
+
...swiftReproducibleBuildFlags([
|
|
11720
|
+
[path19.dirname(options.toolchainBin), "toolchain"],
|
|
11721
|
+
[frameworkRoot, "framework"],
|
|
11722
|
+
[root, "build"],
|
|
11723
|
+
...forwarders
|
|
11724
|
+
]),
|
|
11725
|
+
...macroPlugins.libraries.flatMap((plugin) => [
|
|
11726
|
+
"-Xswiftc",
|
|
11727
|
+
"-load-plugin-library",
|
|
11728
|
+
"-Xswiftc",
|
|
11729
|
+
plugin
|
|
11730
|
+
]),
|
|
11731
|
+
...macroPlugins.executables.flatMap((plugin) => [
|
|
11732
|
+
"-Xswiftc",
|
|
11733
|
+
"-load-plugin-executable",
|
|
11734
|
+
"-Xswiftc",
|
|
11735
|
+
`${plugin}#ExpoModulesMacros`
|
|
11736
|
+
])
|
|
11737
|
+
];
|
|
11738
|
+
const linked = builtArtifact(layout);
|
|
11739
|
+
if (input.lazyDistribution) {
|
|
11740
|
+
rmSync5(path19.join(root, ".peach-link.rsp"), { force: true });
|
|
11741
|
+
if (existsSync4(linked) && statSync2(linked).size <= 8)
|
|
11742
|
+
rmSync5(linked, { force: true });
|
|
11743
|
+
}
|
|
11744
|
+
report("compiling and linking Swift modules");
|
|
11745
|
+
try {
|
|
11746
|
+
const headerBuilds = preparation.headerProductTarget ? [
|
|
11747
|
+
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
11748
|
+
preparation.headerProductTarget
|
|
11749
|
+
] : preparation.headerProducers;
|
|
11750
|
+
for (const build of headerBuilds) {
|
|
11751
|
+
await runCompiler(
|
|
11752
|
+
swift,
|
|
11753
|
+
[...buildArgs, "--target", build],
|
|
11754
|
+
appOptions,
|
|
11755
|
+
SWIFTPM_PROGRESS,
|
|
11756
|
+
SWIFTPM_NOISE
|
|
11722
11757
|
);
|
|
11758
|
+
for (const producer of build === preparation.headerProductTarget ? preparation.headerProducers : [build]) {
|
|
11759
|
+
const emitted = path19.join(
|
|
11760
|
+
root,
|
|
11761
|
+
".build",
|
|
11762
|
+
"peach-cxx-headers",
|
|
11763
|
+
`${producer}-Swift.h`
|
|
11764
|
+
);
|
|
11765
|
+
const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
|
|
11766
|
+
if (existsSync4(original))
|
|
11767
|
+
writeBuildFile(
|
|
11768
|
+
emitted,
|
|
11769
|
+
withoutSwiftDeclarations(
|
|
11770
|
+
clangInterfaceHeader(readFileSync11(original, "utf8")),
|
|
11771
|
+
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
11772
|
+
`#import <${producer}/${producer}.h>`
|
|
11773
|
+
)
|
|
11774
|
+
);
|
|
11775
|
+
}
|
|
11723
11776
|
}
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11777
|
+
await runCompiler(
|
|
11778
|
+
swift,
|
|
11779
|
+
buildArgs,
|
|
11780
|
+
appOptions,
|
|
11781
|
+
SWIFTPM_PROGRESS,
|
|
11782
|
+
SWIFTPM_NOISE
|
|
11783
|
+
);
|
|
11784
|
+
} catch (error) {
|
|
11785
|
+
const output2 = outputOf(error);
|
|
11786
|
+
const moduleCache = path19.join(
|
|
11732
11787
|
root,
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
sdk,
|
|
11736
|
-
...input.packageFiles || prebuilt ? ["--toolset", path19.join(root, ".peach-target-toolset.json")] : [],
|
|
11737
|
-
"-c",
|
|
11788
|
+
".build",
|
|
11789
|
+
WASM_TRIPLE,
|
|
11738
11790
|
"release",
|
|
11739
|
-
"
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
[path19.dirname(options.toolchainBin), "toolchain"],
|
|
11745
|
-
[frameworkRoot, "framework"],
|
|
11746
|
-
[root, "build"],
|
|
11747
|
-
...forwarders
|
|
11748
|
-
]),
|
|
11749
|
-
...macroPlugins.libraries.flatMap((plugin) => [
|
|
11750
|
-
"-Xswiftc",
|
|
11751
|
-
"-load-plugin-library",
|
|
11752
|
-
"-Xswiftc",
|
|
11753
|
-
plugin
|
|
11754
|
-
]),
|
|
11755
|
-
...macroPlugins.executables.flatMap((plugin) => [
|
|
11756
|
-
"-Xswiftc",
|
|
11757
|
-
"-load-plugin-executable",
|
|
11758
|
-
"-Xswiftc",
|
|
11759
|
-
`${plugin}#ExpoModulesMacros`
|
|
11760
|
-
])
|
|
11761
|
-
];
|
|
11762
|
-
const linked = builtArtifact(layout);
|
|
11763
|
-
if (input.lazyDistribution) {
|
|
11764
|
-
rmSync5(path19.join(root, ".peach-link.rsp"), { force: true });
|
|
11765
|
-
if (existsSync4(linked) && statSync2(linked).size <= 8)
|
|
11766
|
-
rmSync5(linked, { force: true });
|
|
11767
|
-
}
|
|
11768
|
-
report("compiling and linking Swift modules");
|
|
11769
|
-
try {
|
|
11770
|
-
const headerBuilds = preparation.headerProductTarget ? [
|
|
11771
|
-
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
11772
|
-
preparation.headerProductTarget
|
|
11773
|
-
] : preparation.headerProducers;
|
|
11774
|
-
for (const build of headerBuilds) {
|
|
11791
|
+
"ModuleCache"
|
|
11792
|
+
);
|
|
11793
|
+
if (output2.includes("was compiled with module cache path") && existsSync4(moduleCache)) {
|
|
11794
|
+
rmSync5(moduleCache, { recursive: true, force: true });
|
|
11795
|
+
try {
|
|
11775
11796
|
await runCompiler(
|
|
11776
11797
|
swift,
|
|
11777
|
-
|
|
11798
|
+
buildArgs,
|
|
11778
11799
|
appOptions,
|
|
11779
11800
|
SWIFTPM_PROGRESS,
|
|
11780
11801
|
SWIFTPM_NOISE
|
|
11781
11802
|
);
|
|
11782
|
-
|
|
11783
|
-
const emitted = path19.join(
|
|
11784
|
-
root,
|
|
11785
|
-
".build",
|
|
11786
|
-
"peach-cxx-headers",
|
|
11787
|
-
`${producer}-Swift.h`
|
|
11788
|
-
);
|
|
11789
|
-
const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
|
|
11790
|
-
if (existsSync4(original))
|
|
11791
|
-
writeBuildFile(
|
|
11792
|
-
emitted,
|
|
11793
|
-
withoutSwiftDeclarations(
|
|
11794
|
-
clangInterfaceHeader(readFileSync11(original, "utf8")),
|
|
11795
|
-
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
11796
|
-
`#import <${producer}/${producer}.h>`
|
|
11797
|
-
)
|
|
11798
|
-
);
|
|
11799
|
-
}
|
|
11800
|
-
}
|
|
11801
|
-
await runCompiler(
|
|
11802
|
-
swift,
|
|
11803
|
-
buildArgs,
|
|
11804
|
-
appOptions,
|
|
11805
|
-
SWIFTPM_PROGRESS,
|
|
11806
|
-
SWIFTPM_NOISE
|
|
11807
|
-
);
|
|
11808
|
-
} catch (error) {
|
|
11809
|
-
const output2 = outputOf(error);
|
|
11810
|
-
const moduleCache = path19.join(
|
|
11811
|
-
root,
|
|
11812
|
-
".build",
|
|
11813
|
-
WASM_TRIPLE,
|
|
11814
|
-
"release",
|
|
11815
|
-
"ModuleCache"
|
|
11816
|
-
);
|
|
11817
|
-
if (output2.includes("was compiled with module cache path") && existsSync4(moduleCache)) {
|
|
11818
|
-
rmSync5(moduleCache, { recursive: true, force: true });
|
|
11819
|
-
try {
|
|
11820
|
-
await runCompiler(
|
|
11821
|
-
swift,
|
|
11822
|
-
buildArgs,
|
|
11823
|
-
appOptions,
|
|
11824
|
-
SWIFTPM_PROGRESS,
|
|
11825
|
-
SWIFTPM_NOISE
|
|
11826
|
-
);
|
|
11827
|
-
} catch (retryError) {
|
|
11828
|
-
throw new Error(
|
|
11829
|
-
[
|
|
11830
|
-
...unprepared,
|
|
11831
|
-
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
11832
|
-
].join("\n"),
|
|
11833
|
-
{ cause: retryError }
|
|
11834
|
-
);
|
|
11835
|
-
}
|
|
11836
|
-
} else {
|
|
11803
|
+
} catch (retryError) {
|
|
11837
11804
|
throw new Error(
|
|
11838
|
-
[
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11805
|
+
[
|
|
11806
|
+
...unprepared,
|
|
11807
|
+
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
11808
|
+
].join("\n"),
|
|
11809
|
+
{ cause: retryError }
|
|
11842
11810
|
);
|
|
11843
11811
|
}
|
|
11844
|
-
}
|
|
11845
|
-
if (options.project) endSwiftProjectProcesses(options.project);
|
|
11846
|
-
}
|
|
11847
|
-
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
11848
|
-
if (!existsSync4(linked)) {
|
|
11849
|
-
const binDir = path19.dirname(linked);
|
|
11850
|
-
const found = existsSync4(binDir) ? readdirSync8(binDir).filter((name2) => name2.endsWith(".wasm")).sort() : [];
|
|
11812
|
+
} else {
|
|
11851
11813
|
throw new Error(
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
const output = options.project ? projectOutputFile(root, linked, options.project) : linked;
|
|
11857
|
-
const optimized = `${output}.optimized`;
|
|
11858
|
-
if (input.lazyDistribution) {
|
|
11859
|
-
pruneSwiftWasmLink(
|
|
11860
|
-
root,
|
|
11861
|
-
options.toolchainBin,
|
|
11862
|
-
frameworkRoot,
|
|
11863
|
-
input.staticClangTargets
|
|
11814
|
+
[...unprepared, projectDiagnostic(output2, layout, input.files)].join(
|
|
11815
|
+
"\n"
|
|
11816
|
+
),
|
|
11817
|
+
{ cause: error }
|
|
11864
11818
|
);
|
|
11865
|
-
await optimizeWasm(output, optimized);
|
|
11866
11819
|
}
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11820
|
+
} finally {
|
|
11821
|
+
if (options.project) endSwiftProjectProcesses(options.project);
|
|
11822
|
+
}
|
|
11823
|
+
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
11824
|
+
if (!existsSync4(linked)) {
|
|
11825
|
+
const binDir = path19.dirname(linked);
|
|
11826
|
+
const found = existsSync4(binDir) ? readdirSync8(binDir).filter((name2) => name2.endsWith(".wasm")).sort() : [];
|
|
11827
|
+
throw new Error(
|
|
11828
|
+
`swift-compile: the build produced no ${path19.basename(linked)} (found: ${found.join(", ") || "none"})`
|
|
11829
|
+
);
|
|
11830
|
+
}
|
|
11831
|
+
if (options.project) removeProjectLinks(root);
|
|
11832
|
+
const output = options.project ? projectOutputFile(root, linked, options.project) : linked;
|
|
11833
|
+
const optimized = `${output}.optimized`;
|
|
11834
|
+
if (input.lazyDistribution) {
|
|
11835
|
+
pruneSwiftWasmLink(
|
|
11836
|
+
root,
|
|
11837
|
+
options.toolchainBin,
|
|
11838
|
+
frameworkRoot,
|
|
11839
|
+
input.staticClangTargets
|
|
11840
|
+
);
|
|
11841
|
+
await optimizeWasm(output, optimized);
|
|
11842
|
+
}
|
|
11843
|
+
const artifact = {
|
|
11844
|
+
hash,
|
|
11845
|
+
bytes: readFileSync11(input.lazyDistribution ? optimized : output),
|
|
11846
|
+
icu: await icu
|
|
11847
|
+
};
|
|
11848
|
+
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
11849
|
+
saveSharedArtifact(sharedRoot, artifact);
|
|
11850
|
+
report("compiled artifact verified");
|
|
11851
|
+
return retain(root, artifact);
|
|
11852
|
+
});
|
|
11879
11853
|
},
|
|
11880
11854
|
options.signal
|
|
11881
11855
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1817 | (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.1817 | (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.1817 | (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.1817 | (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;
|