peachsim 0.1.1814 → 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/control.ts +5 -2
- package/cli/commands/inspect.ts +43 -385
- package/cli/commands/package.ts +88 -32
- package/cli/commands/runtime.ts +2 -2
- package/cli/outbound-endpoints.ts +2 -2
- 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 +5186 -5881
- 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 +100 -16
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +3949 -4535
- 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 +3724 -4482
- package/dist-lib/host/fetch-proxy-handler.cjs +25 -14
- 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 +26 -36
- 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 +26 -36
- package/dist-lib/native-app-identity-project.cjs +4 -23
- package/dist-lib/native-app-identity-project.mjs +4 -23
- 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 +87 -76
- 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 +4265 -4982
- package/dist-lib/swift-compile.cjs +218 -243
- package/dist-lib/swift-compile.mjs +218 -243
- 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 +274 -251
- package/dist-lib/vite.cjs +25 -14
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/nativeReplayContract.d.ts +2 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/answeredNativePackages.ts +41 -0
- package/src/cli-runtime.ts +34 -13
- 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/expo-swift-ready.ts +16 -2
- package/src/installed-native-libraries.ts +79 -18
- package/src/nitro-adapter.lock.json +240 -240
- package/src/nitro-bundle.ts +8 -6
- package/src/nitro-compile.ts +6 -3
- package/src/nitro-compiler-digest.ts +2 -4
- package/src/nitro-dependencies.ts +8 -2
- package/src/nitro-source.ts +34 -3
- package/src/nitro-superset.lock.json +21 -253
- package/src/nitro-superset.ts +59 -63
- package/src/nitroContract.ts +26 -3
- package/src/react-native-bridge-modules.ts +2 -4
- package/src/runtime-delivery.ts +2 -2
- package/src/swift-compile.ts +260 -255
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-installed-targets.ts +13 -0
- package/src/swift-objc-standin.ts +10 -6
- package/src/swift-standins.ts +44 -14
- package/src/turbo-bundle.ts +20 -1
- package/src/turbo-compile.ts +6 -12
- package/src/turbo-runtime.lock.json +19 -19
- package/src/turbo-source.ts +18 -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),
|
|
@@ -7469,7 +7449,8 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
|
|
|
7469
7449
|
TOCropViewController: [],
|
|
7470
7450
|
RiveRuntime: ["MetalKit"],
|
|
7471
7451
|
MetalKit: ["ModelIO"],
|
|
7472
|
-
|
|
7452
|
+
DatadogInternal: [],
|
|
7453
|
+
DatadogCore: ["DatadogInternal"],
|
|
7473
7454
|
DatadogLogs: ["DatadogCore"],
|
|
7474
7455
|
DatadogRUM: ["DatadogCore"],
|
|
7475
7456
|
DatadogTrace: ["DatadogCore"],
|
|
@@ -7821,7 +7802,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7821
7802
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7822
7803
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7823
7804
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7824
|
-
var compilerSourceDigest = true ? "
|
|
7805
|
+
var compilerSourceDigest = true ? "1519f1f37c446535792f7bb0c9ba9c5e59b0b0f87d7b5c849346abe684325aa7" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
7825
7806
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7826
7807
|
const hash = createHash8("sha256");
|
|
7827
7808
|
hash.update(`swift-compile
|
|
@@ -11636,245 +11617,239 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11636
11617
|
`swift-compile: no swift.org toolchain at ${options.toolchainBin}; install ${options.release} and its matching wasm sdk`
|
|
11637
11618
|
);
|
|
11638
11619
|
}
|
|
11639
|
-
|
|
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
|
-
swift,
|
|
11680
|
-
sdk,
|
|
11681
|
-
toolchainBin: options.toolchainBin,
|
|
11682
|
-
plugins: macroPlugins,
|
|
11683
|
-
buildOptions
|
|
11684
|
-
});
|
|
11685
|
-
await pruneFrameworkScratches(frameworkKey);
|
|
11686
|
-
}
|
|
11687
|
-
if (options.project) removeProjectLinks(root);
|
|
11688
|
-
if (retireStaleSwiftLink(
|
|
11689
|
-
root,
|
|
11690
|
-
swiftLinkStamp({
|
|
11691
|
-
frameworkKey,
|
|
11692
|
-
prebuilt
|
|
11693
|
-
})
|
|
11694
|
-
))
|
|
11695
|
-
report("framework revision changed; rebuilding the app link");
|
|
11696
|
-
const preparation = writeSwiftProject(
|
|
11697
|
-
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,
|
|
11698
11660
|
input,
|
|
11699
|
-
|
|
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,
|
|
11700
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(/\/$/, "")
|
|
11701
11698
|
);
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
)
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
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
|
|
11721
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
|
+
}
|
|
11722
11776
|
}
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
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(
|
|
11731
11787
|
root,
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
sdk,
|
|
11735
|
-
...input.packageFiles || prebuilt ? ["--toolset", path19.join(root, ".peach-target-toolset.json")] : [],
|
|
11736
|
-
"-c",
|
|
11788
|
+
".build",
|
|
11789
|
+
WASM_TRIPLE,
|
|
11737
11790
|
"release",
|
|
11738
|
-
"
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
[path19.dirname(options.toolchainBin), "toolchain"],
|
|
11744
|
-
[frameworkRoot, "framework"],
|
|
11745
|
-
[root, "build"],
|
|
11746
|
-
...forwarders
|
|
11747
|
-
]),
|
|
11748
|
-
...macroPlugins.libraries.flatMap((plugin) => [
|
|
11749
|
-
"-Xswiftc",
|
|
11750
|
-
"-load-plugin-library",
|
|
11751
|
-
"-Xswiftc",
|
|
11752
|
-
plugin
|
|
11753
|
-
]),
|
|
11754
|
-
...macroPlugins.executables.flatMap((plugin) => [
|
|
11755
|
-
"-Xswiftc",
|
|
11756
|
-
"-load-plugin-executable",
|
|
11757
|
-
"-Xswiftc",
|
|
11758
|
-
`${plugin}#ExpoModulesMacros`
|
|
11759
|
-
])
|
|
11760
|
-
];
|
|
11761
|
-
const linked = builtArtifact(layout);
|
|
11762
|
-
if (input.lazyDistribution) {
|
|
11763
|
-
rmSync5(path19.join(root, ".peach-link.rsp"), { force: true });
|
|
11764
|
-
if (existsSync4(linked) && statSync2(linked).size <= 8)
|
|
11765
|
-
rmSync5(linked, { force: true });
|
|
11766
|
-
}
|
|
11767
|
-
report("compiling and linking Swift modules");
|
|
11768
|
-
try {
|
|
11769
|
-
const headerBuilds = preparation.headerProductTarget ? [
|
|
11770
|
-
...Object.keys(preparation.nativeHeaderDeclarations),
|
|
11771
|
-
preparation.headerProductTarget
|
|
11772
|
-
] : preparation.headerProducers;
|
|
11773
|
-
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 {
|
|
11774
11796
|
await runCompiler(
|
|
11775
11797
|
swift,
|
|
11776
|
-
|
|
11798
|
+
buildArgs,
|
|
11777
11799
|
appOptions,
|
|
11778
11800
|
SWIFTPM_PROGRESS,
|
|
11779
11801
|
SWIFTPM_NOISE
|
|
11780
11802
|
);
|
|
11781
|
-
|
|
11782
|
-
const emitted = path19.join(
|
|
11783
|
-
root,
|
|
11784
|
-
".build",
|
|
11785
|
-
"peach-cxx-headers",
|
|
11786
|
-
`${producer}-Swift.h`
|
|
11787
|
-
);
|
|
11788
|
-
const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
|
|
11789
|
-
if (existsSync4(original))
|
|
11790
|
-
writeBuildFile(
|
|
11791
|
-
emitted,
|
|
11792
|
-
withoutSwiftDeclarations(
|
|
11793
|
-
clangInterfaceHeader(readFileSync11(original, "utf8")),
|
|
11794
|
-
new Set(preparation.nativeHeaderDeclarations[producer]),
|
|
11795
|
-
`#import <${producer}/${producer}.h>`
|
|
11796
|
-
)
|
|
11797
|
-
);
|
|
11798
|
-
}
|
|
11799
|
-
}
|
|
11800
|
-
await runCompiler(
|
|
11801
|
-
swift,
|
|
11802
|
-
buildArgs,
|
|
11803
|
-
appOptions,
|
|
11804
|
-
SWIFTPM_PROGRESS,
|
|
11805
|
-
SWIFTPM_NOISE
|
|
11806
|
-
);
|
|
11807
|
-
} catch (error) {
|
|
11808
|
-
const output2 = outputOf(error);
|
|
11809
|
-
const moduleCache = path19.join(
|
|
11810
|
-
root,
|
|
11811
|
-
".build",
|
|
11812
|
-
WASM_TRIPLE,
|
|
11813
|
-
"release",
|
|
11814
|
-
"ModuleCache"
|
|
11815
|
-
);
|
|
11816
|
-
if (output2.includes("was compiled with module cache path") && existsSync4(moduleCache)) {
|
|
11817
|
-
rmSync5(moduleCache, { recursive: true, force: true });
|
|
11818
|
-
try {
|
|
11819
|
-
await runCompiler(
|
|
11820
|
-
swift,
|
|
11821
|
-
buildArgs,
|
|
11822
|
-
appOptions,
|
|
11823
|
-
SWIFTPM_PROGRESS,
|
|
11824
|
-
SWIFTPM_NOISE
|
|
11825
|
-
);
|
|
11826
|
-
} catch (retryError) {
|
|
11827
|
-
throw new Error(
|
|
11828
|
-
[
|
|
11829
|
-
...unprepared,
|
|
11830
|
-
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
11831
|
-
].join("\n"),
|
|
11832
|
-
{ cause: retryError }
|
|
11833
|
-
);
|
|
11834
|
-
}
|
|
11835
|
-
} else {
|
|
11803
|
+
} catch (retryError) {
|
|
11836
11804
|
throw new Error(
|
|
11837
|
-
[
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11805
|
+
[
|
|
11806
|
+
...unprepared,
|
|
11807
|
+
projectDiagnostic(outputOf(retryError), layout, input.files)
|
|
11808
|
+
].join("\n"),
|
|
11809
|
+
{ cause: retryError }
|
|
11841
11810
|
);
|
|
11842
11811
|
}
|
|
11843
|
-
}
|
|
11844
|
-
if (options.project) endSwiftProjectProcesses(options.project);
|
|
11845
|
-
}
|
|
11846
|
-
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
11847
|
-
if (!existsSync4(linked)) {
|
|
11848
|
-
const binDir = path19.dirname(linked);
|
|
11849
|
-
const found = existsSync4(binDir) ? readdirSync8(binDir).filter((name2) => name2.endsWith(".wasm")).sort() : [];
|
|
11812
|
+
} else {
|
|
11850
11813
|
throw new Error(
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
const output = options.project ? projectOutputFile(root, linked, options.project) : linked;
|
|
11856
|
-
const optimized = `${output}.optimized`;
|
|
11857
|
-
if (input.lazyDistribution) {
|
|
11858
|
-
pruneSwiftWasmLink(
|
|
11859
|
-
root,
|
|
11860
|
-
options.toolchainBin,
|
|
11861
|
-
frameworkRoot,
|
|
11862
|
-
input.staticClangTargets
|
|
11814
|
+
[...unprepared, projectDiagnostic(output2, layout, input.files)].join(
|
|
11815
|
+
"\n"
|
|
11816
|
+
),
|
|
11817
|
+
{ cause: error }
|
|
11863
11818
|
);
|
|
11864
|
-
await optimizeWasm(output, optimized);
|
|
11865
11819
|
}
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
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
|
+
});
|
|
11878
11853
|
},
|
|
11879
11854
|
options.signal
|
|
11880
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;
|