peachsim 0.1.1817 → 0.1.1818
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/agent-indicator-mode.ts +2 -1
- package/cli/commands/coverage-swift.ts +4 -3
- package/cli/commands/flow.ts +7 -0
- package/cli/commands/inspect/core.ts +1 -1
- package/cli/commands/maestro-compare.ts +7 -0
- package/cli/commands/package.ts +5 -0
- package/cli/commands/screenshot-mode.ts +2 -1
- package/cli/commands/shell-boolean-mode.ts +7 -3
- package/cli/commands/shell-url.ts +4 -0
- package/cli/commands/show-touches-mode.ts +2 -1
- package/cli/commands/test.ts +3 -2
- package/cli/commands/three-mode.ts +2 -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 +2823 -3829
- 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 +1703 -1579
- 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 +2781 -3793
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- 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 +29 -8
- 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 +28 -7
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +295 -259
- 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 +29 -24
- package/dist-lib/public-origins-lib.json +100 -80
- 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 +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +3166 -4142
- package/dist-lib/swift-compile.cjs +118 -29
- package/dist-lib/swift-compile.mjs +125 -34
- 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 +52 -6
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2188 -2060
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +41 -0
- package/dist-types/packages/peach-engine/src/render-worker/mapServicesContract.d.ts +45 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +1 -1
- package/sdk/ios/usr/include/module.modulemap +3 -0
- package/sdk/ios/usr/include/notify.modulemap +9 -0
- package/sdk/ios/usr/lib/swift/Darwin.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -1
- package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +21 -0
- package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -1
- package/sdk/ios/wasm/include/__header_time.h +4 -0
- package/sdk/ios/wasm/include/pthread.h +2 -0
- package/sdk/ios/wasm/include/sys/mman.h +1 -1
- package/sdk/ios/wasm/include/sys/resource.h +31 -0
- package/sdk/ios/wasm/include/unistd.h +4 -0
- package/src/answeredNativePackages.ts +11 -9
- package/src/expo-discovery-cache.ts +69 -52
- package/src/expo-swift-host.ts +45 -7
- package/src/installed-native-libraries.ts +103 -20
- package/src/native-static-libraries.ts +69 -33
- package/src/nitro-adapter.ts +0 -9
- package/src/nitro-compile.ts +45 -16
- package/src/nitro-superset.ts +4 -5
- package/src/plist-bytes.ts +9 -0
- package/src/portable-expo-workspace.ts +4 -3
- package/src/react-native-bridge-modules.ts +11 -15
- package/src/swift-compile.ts +124 -18
- package/src/swift-cxx-reachable.ts +13 -0
- package/src/swift-distribution.ts +3 -4
- package/src/swift-host.ts +5 -3
- package/src/swift-installed-targets.ts +32 -14
- package/src/swift-native-pin.ts +45 -0
- package/src/swift-objc-compile.ts +23 -1
- package/src/swift-objc-standin.ts +4 -1
- package/src/swift-package-manifest.ts +2 -2
- package/src/swift-root-lock.ts +4 -3
- package/src/swift-standins.ts +5 -26
- package/src/swift-toolchain.ts +69 -12
- package/src/swift-wasm-prune.ts +1 -0
- package/src/swift-xcframework.ts +23 -12
- package/src/swiftContract.ts +2 -0
- package/src/swiftNativePinContract.ts +68 -0
- package/src/turbo-bundle.ts +14 -6
- package/src/turbo-compile.ts +76 -11
- package/src/turbo-source.ts +91 -15
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1818 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
5
|
-
spawn as
|
|
5
|
+
spawn as spawn4,
|
|
6
6
|
execFileSync as execFileSync9
|
|
7
7
|
} from "node:child_process";
|
|
8
8
|
import { createHash as createHash8, randomUUID as randomUUID5 } from "node:crypto";
|
|
@@ -2585,13 +2585,15 @@ import { spawnSync as spawnSync4 } from "node:child_process";
|
|
|
2585
2585
|
import path5 from "node:path";
|
|
2586
2586
|
|
|
2587
2587
|
// src/swift-toolchain.ts
|
|
2588
|
-
import { execFile, execFileSync } from "node:child_process";
|
|
2588
|
+
import { execFile, execFileSync, spawn as spawn2 } from "node:child_process";
|
|
2589
2589
|
import { createHash as createHash2 } from "node:crypto";
|
|
2590
2590
|
import fs from "node:fs";
|
|
2591
2591
|
import os from "node:os";
|
|
2592
2592
|
import path4 from "node:path";
|
|
2593
|
+
import { pipeline } from "node:stream/promises";
|
|
2593
2594
|
import { fileURLToPath } from "node:url";
|
|
2594
2595
|
import { promisify } from "node:util";
|
|
2596
|
+
import zlib from "node:zlib";
|
|
2595
2597
|
function peachsimPackageRoot() {
|
|
2596
2598
|
let dir = import.meta.dirname;
|
|
2597
2599
|
while (!fs.existsSync(path4.join(dir, "package.json")) && dir !== path4.dirname(dir))
|
|
@@ -2620,6 +2622,7 @@ var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
|
2620
2622
|
var compilerArchives = {
|
|
2621
2623
|
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2622
2624
|
identity: "0b2d0a9011c88e66",
|
|
2625
|
+
archive: "tar.gz",
|
|
2623
2626
|
hosts: {
|
|
2624
2627
|
"darwin-arm64": {
|
|
2625
2628
|
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
@@ -2637,6 +2640,7 @@ var compilerArchives = {
|
|
|
2637
2640
|
},
|
|
2638
2641
|
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
2639
2642
|
identity: "f7c03c3f59ec5d83",
|
|
2643
|
+
archive: "tar.gz",
|
|
2640
2644
|
hosts: {
|
|
2641
2645
|
"darwin-arm64": {
|
|
2642
2646
|
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
@@ -2654,6 +2658,7 @@ var compilerArchives = {
|
|
|
2654
2658
|
},
|
|
2655
2659
|
"swift-6.4.0-RELEASE-custom-3e3dca8fd1d82975": {
|
|
2656
2660
|
identity: "3e3dca8fd1d82975",
|
|
2661
|
+
archive: "tar.gz",
|
|
2657
2662
|
hosts: {
|
|
2658
2663
|
"darwin-arm64": {
|
|
2659
2664
|
checksum: "dfad56454f5e1e465071ff708bf485be65b438cf55d02b04d26d17d26df9f54a",
|
|
@@ -2671,6 +2676,7 @@ var compilerArchives = {
|
|
|
2671
2676
|
},
|
|
2672
2677
|
"swift-6.4.0-RELEASE-custom-b082ac5437336790": {
|
|
2673
2678
|
identity: "b082ac5437336790",
|
|
2679
|
+
archive: "tar.gz",
|
|
2674
2680
|
hosts: {
|
|
2675
2681
|
"darwin-arm64": {
|
|
2676
2682
|
checksum: "85e601982321d3a6f81f05928bc9bbe7a61bc75b27ce24508e79f6b5b537254d",
|
|
@@ -2688,6 +2694,7 @@ var compilerArchives = {
|
|
|
2688
2694
|
},
|
|
2689
2695
|
"swift-6.4.0-RELEASE-custom-9cdaffdb6b37fb47": {
|
|
2690
2696
|
identity: "9cdaffdb6b37fb47",
|
|
2697
|
+
archive: "tar.gz",
|
|
2691
2698
|
hosts: {
|
|
2692
2699
|
"darwin-arm64": {
|
|
2693
2700
|
checksum: "fdd3f88cf76a8dc2083275d4253255030068a25b5ba68acbf59e0407c45677dd",
|
|
@@ -2705,6 +2712,7 @@ var compilerArchives = {
|
|
|
2705
2712
|
},
|
|
2706
2713
|
"swift-6.4.0-RELEASE-custom-bd49e2f77434e7b1": {
|
|
2707
2714
|
identity: "bd49e2f77434e7b1",
|
|
2715
|
+
archive: "tar.gz",
|
|
2708
2716
|
hosts: {
|
|
2709
2717
|
"darwin-arm64": {
|
|
2710
2718
|
checksum: "e815b06394566e8125475afc8f1807f7f465318c845549c5831043cdc28eca64",
|
|
@@ -2722,6 +2730,7 @@ var compilerArchives = {
|
|
|
2722
2730
|
},
|
|
2723
2731
|
"swift-6.4.0-RELEASE-custom-13450179a7e01c81": {
|
|
2724
2732
|
identity: "13450179a7e01c81",
|
|
2733
|
+
archive: "tar.gz",
|
|
2725
2734
|
hosts: {
|
|
2726
2735
|
"darwin-arm64": {
|
|
2727
2736
|
checksum: "a29be6b722f15c7aafac26ba5703a7392f49ce7ea5e1c56548846b7e458290f7",
|
|
@@ -2739,6 +2748,7 @@ var compilerArchives = {
|
|
|
2739
2748
|
},
|
|
2740
2749
|
"swift-6.4.0-RELEASE-custom-f6868fa6054e83d6": {
|
|
2741
2750
|
identity: "f6868fa6054e83d6",
|
|
2751
|
+
archive: "tar.gz",
|
|
2742
2752
|
hosts: {
|
|
2743
2753
|
"darwin-arm64": {
|
|
2744
2754
|
checksum: "bd80c2f35864ec29883dd22001d0165821e80d78002fc12f92406c3c708694a4",
|
|
@@ -2756,23 +2766,25 @@ var compilerArchives = {
|
|
|
2756
2766
|
},
|
|
2757
2767
|
"swift-6.4.0-RELEASE-custom-a560ff35bf882b5c": {
|
|
2758
2768
|
identity: "a560ff35bf882b5c",
|
|
2769
|
+
archive: "tar.zst",
|
|
2759
2770
|
hosts: {
|
|
2760
2771
|
"darwin-arm64": {
|
|
2761
|
-
checksum: "
|
|
2772
|
+
checksum: "36c50bcdfba88a4c0989af0bd60371497eb4403aa7b80644b479fa509a2187a9",
|
|
2762
2773
|
manifest: "253e891527d2213f54eace768b902de89de5e9495a3c5f4018de1985516bd553"
|
|
2763
2774
|
},
|
|
2764
2775
|
"linux-x64": {
|
|
2765
|
-
checksum: "
|
|
2776
|
+
checksum: "ba25da9182314fc7b7dd2fc041280e1c7b409f80a1fbccdfa5c342669d164c8e",
|
|
2766
2777
|
manifest: "6f951cc4071dd0d6054d85711a7c5fe272273658847831b477a8b24be7254ca0"
|
|
2767
2778
|
},
|
|
2768
2779
|
"linux-arm64": {
|
|
2769
|
-
checksum: "
|
|
2780
|
+
checksum: "5f0f4456e9fe22b5486025db9f679c865841660797d71761245291c2c6811c20",
|
|
2770
2781
|
manifest: "b6f62fca2ec37593e274ee5bac474f21ffc5db14cd82f492ccbc774f8e9b75d8"
|
|
2771
2782
|
}
|
|
2772
2783
|
}
|
|
2773
2784
|
},
|
|
2774
2785
|
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2775
2786
|
identity: SWIFT_HOST_COMPILER_ID,
|
|
2787
|
+
archive: "tar.gz",
|
|
2776
2788
|
hosts: {
|
|
2777
2789
|
"darwin-arm64": {
|
|
2778
2790
|
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
@@ -2805,15 +2817,20 @@ function privateSwiftRelease() {
|
|
|
2805
2817
|
throw new Error(`${root} holds no Swift distribution release`);
|
|
2806
2818
|
return release;
|
|
2807
2819
|
}
|
|
2808
|
-
function
|
|
2820
|
+
function swiftHostCompilerPin(release) {
|
|
2809
2821
|
const compiler = compilerArchives[release];
|
|
2810
2822
|
if (!compiler) throw new Error(`unqualified host compiler ${release}`);
|
|
2823
|
+
return compiler;
|
|
2824
|
+
}
|
|
2825
|
+
function swiftHostCompilerArchive(release, host2 = `${process.platform}-${process.arch}`) {
|
|
2826
|
+
const compiler = swiftHostCompilerPin(release);
|
|
2811
2827
|
const archive = compiler.hosts[host2];
|
|
2812
2828
|
if (!archive) throw new Error(`unsupported Swift compiler host ${host2}`);
|
|
2813
2829
|
return {
|
|
2814
2830
|
...archive,
|
|
2815
2831
|
identity: compiler.identity,
|
|
2816
|
-
|
|
2832
|
+
archive: compiler.archive,
|
|
2833
|
+
url: `https://r2.sootsim.com/swift-host-compiler/${compiler.identity}/${archive.checksum}.${compiler.archive}`
|
|
2817
2834
|
};
|
|
2818
2835
|
}
|
|
2819
2836
|
function swiftUpstreamRelease(release) {
|
|
@@ -3771,6 +3788,9 @@ function objcSdkIntakeFlags(headers, toolchainBin, minimum) {
|
|
|
3771
3788
|
path7.join(headers, "System/Library/Frameworks"),
|
|
3772
3789
|
"-isystem",
|
|
3773
3790
|
path7.join(headers, "wasm/include"),
|
|
3791
|
+
// compiler intrinsics an arm64 unit includes, ahead of clang's arm-only ones.
|
|
3792
|
+
"-isystem",
|
|
3793
|
+
path7.join(headers, "wasm/intrinsics"),
|
|
3774
3794
|
// libxml2 headers sit one level deeper, as in the iOS sdk: a unit
|
|
3775
3795
|
// includes <libxml/parser.h> through usr/include/libxml2, never the parent.
|
|
3776
3796
|
"-I",
|
|
@@ -4992,7 +5012,7 @@ function swiftReproducibleBuildFlags(roots) {
|
|
|
4992
5012
|
|
|
4993
5013
|
// src/swift-root-lock.ts
|
|
4994
5014
|
import {
|
|
4995
|
-
spawn as
|
|
5015
|
+
spawn as spawn3
|
|
4996
5016
|
} from "node:child_process";
|
|
4997
5017
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
4998
5018
|
import {
|
|
@@ -5156,18 +5176,18 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
|
5156
5176
|
const children = [];
|
|
5157
5177
|
const lease = {
|
|
5158
5178
|
register(child) {
|
|
5159
|
-
children.push(child);
|
|
5179
|
+
const index = children.push(child);
|
|
5160
5180
|
if (child.pid === void 0) throw new Error("could not register compiler process");
|
|
5161
|
-
const childPending = `${pending}.child.${
|
|
5181
|
+
const childPending = `${pending}.child.${index}`;
|
|
5162
5182
|
try {
|
|
5163
5183
|
writeFileSync2(childPending, JSON.stringify(ownIdentity(child.pid)));
|
|
5164
|
-
linkSync(childPending, path14.join(directory, name(held, `child.${
|
|
5184
|
+
linkSync(childPending, path14.join(directory, name(held, `child.${index}`)));
|
|
5165
5185
|
} finally {
|
|
5166
5186
|
rmSync4(childPending, { force: true });
|
|
5167
5187
|
}
|
|
5168
5188
|
},
|
|
5169
5189
|
spawn(command, args, options, companion) {
|
|
5170
|
-
const child =
|
|
5190
|
+
const child = spawn3(
|
|
5171
5191
|
"/bin/sh",
|
|
5172
5192
|
["-c", 'IFS= read -r go || exit 1; exec "$@" </dev/null', "sh", command, ...args],
|
|
5173
5193
|
{ ...options, detached: true, stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -6737,7 +6757,8 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
6737
6757
|
const prunedRspPath = path16.join(directory, ".peach-link.pruned.rsp");
|
|
6738
6758
|
fs6.writeFileSync(prunedRspPath, outTokens.map((t) => JSON.stringify(t)).join(" "));
|
|
6739
6759
|
execFileSync7(path16.join(toolchainBin, "wasm-ld"), [`@${prunedRspPath}`], {
|
|
6740
|
-
stdio: "pipe"
|
|
6760
|
+
stdio: "pipe",
|
|
6761
|
+
maxBuffer: Infinity
|
|
6741
6762
|
});
|
|
6742
6763
|
fs6.rmSync(rspPath, { force: true });
|
|
6743
6764
|
}
|
|
@@ -7044,7 +7065,7 @@ async function runCompiler(command, args, options, stream = false, quiet) {
|
|
|
7044
7065
|
detached: true,
|
|
7045
7066
|
stdio: ["ignore", "pipe", "pipe"]
|
|
7046
7067
|
};
|
|
7047
|
-
const child = options.lease ? options.lease.spawn(command, args, launch, options.frameworkLease) :
|
|
7068
|
+
const child = options.lease ? options.lease.spawn(command, args, launch, options.frameworkLease) : spawn4(command, args, launch);
|
|
7048
7069
|
let stopping;
|
|
7049
7070
|
try {
|
|
7050
7071
|
return await new Promise((resolve, reject) => {
|
|
@@ -7261,7 +7282,7 @@ function swiftModuleInputFiles(root) {
|
|
|
7261
7282
|
walk("ios-simulator-stdlib");
|
|
7262
7283
|
return files.sort();
|
|
7263
7284
|
}
|
|
7264
|
-
function swiftMacroPlugins(moduleRoot) {
|
|
7285
|
+
function swiftMacroPlugins(moduleRoot, dir = path19.join(moduleRoot, ".build/host/RnxPreviewMacros")) {
|
|
7265
7286
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
7266
7287
|
if (distribution)
|
|
7267
7288
|
return {
|
|
@@ -7269,7 +7290,6 @@ function swiftMacroPlugins(moduleRoot) {
|
|
|
7269
7290
|
executables: distribution.plugins.filter((plugin) => path19.basename(plugin) === "ExpoModulesMacros").map((plugin) => path19.join(moduleRoot, plugin)),
|
|
7270
7291
|
stale: false
|
|
7271
7292
|
};
|
|
7272
|
-
const dir = path19.join(moduleRoot, ".build/host/RnxPreviewMacros");
|
|
7273
7293
|
const release = JSON.parse(
|
|
7274
7294
|
readFileSync11(path19.join(moduleRoot, "toolchain.json"), "utf8")
|
|
7275
7295
|
).release;
|
|
@@ -7663,14 +7683,20 @@ function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
|
7663
7683
|
for (const match of readFileSync11(map, "utf8").matchAll(/^module\s+([A-Za-z_]\w*)/gm))
|
|
7664
7684
|
modules.add(match[1]);
|
|
7665
7685
|
}
|
|
7666
|
-
const libc
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
)
|
|
7672
|
-
|
|
7673
|
-
|
|
7686
|
+
for (const libc of [
|
|
7687
|
+
path19.join(darwin, "usr/include"),
|
|
7688
|
+
path19.join(
|
|
7689
|
+
swiftSharedSdkRoot(moduleRoot, swiftDistributionAt(moduleRoot) !== null),
|
|
7690
|
+
"usr/include"
|
|
7691
|
+
)
|
|
7692
|
+
])
|
|
7693
|
+
for (const entry of readdirSync8(libc)) {
|
|
7694
|
+
if (!entry.endsWith(".modulemap")) continue;
|
|
7695
|
+
for (const match of readFileSync11(path19.join(libc, entry), "utf8").matchAll(
|
|
7696
|
+
/^module\s+([A-Za-z_]\w*)/gm
|
|
7697
|
+
))
|
|
7698
|
+
modules.add(match[1]);
|
|
7699
|
+
}
|
|
7674
7700
|
for (const directory of frameworks) {
|
|
7675
7701
|
for (const entry of readdirSync8(directory)) {
|
|
7676
7702
|
const map = path19.join(directory, entry, "Modules/module.modulemap");
|
|
@@ -7802,7 +7828,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7802
7828
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7803
7829
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7804
7830
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7805
|
-
var compilerSourceDigest = true ? "
|
|
7831
|
+
var compilerSourceDigest = true ? "f079d0f9f3d0467a52729f6950de38e5f71e1ad9017031a3ec3722aad044dac2" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
7806
7832
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7807
7833
|
const hash = createHash8("sha256");
|
|
7808
7834
|
hash.update(`swift-compile
|
|
@@ -7999,6 +8025,14 @@ function emitSwiftPackageManifest(args) {
|
|
|
7999
8025
|
);
|
|
8000
8026
|
const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
|
|
8001
8027
|
const flagArray = (literal) => `peachCompilerArguments(${JSON.stringify(literal.replace(/,\s*]$/, "]"))})`;
|
|
8028
|
+
const swiftFlagArray = (literal) => {
|
|
8029
|
+
const flags = JSON.parse(literal.replace(/,\s*]$/, "]"));
|
|
8030
|
+
const content = flags.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
|
|
8031
|
+
const digest = createHash8("sha256").update(content).digest("hex");
|
|
8032
|
+
const file = path19.join(args.root, ".peach-swift-arguments", `${digest}.rsp`);
|
|
8033
|
+
args.files.set(file, content);
|
|
8034
|
+
return JSON.stringify([`@${file}`]);
|
|
8035
|
+
};
|
|
8002
8036
|
const declaredClangSettings = (target, tool) => clangSettingEntries(
|
|
8003
8037
|
target?.clangSettings?.map(
|
|
8004
8038
|
(setting) => "flags" in setting ? {
|
|
@@ -8061,7 +8095,7 @@ function emitSwiftPackageManifest(args) {
|
|
|
8061
8095
|
(value) => value.late?.producers.includes(target.name)
|
|
8062
8096
|
)) ? `, "-emit-objc-header-path", ${JSON.stringify(path19.join(args.headerDirectory, `${target.name}-Swift${args.nativeHeaderDeclarations?.[target.name] ? ".original" : ""}.h`))}` : "";
|
|
8063
8097
|
const clangMode = target.cxxInterop ? "" : ', "-Xcc", "-fno-cxx-modules"';
|
|
8064
|
-
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation}${interoperability}${defines}${features}${upcoming} .unsafeFlags(${
|
|
8098
|
+
const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation}${interoperability}${defines}${features}${upcoming} .unsafeFlags(${swiftFlagArray(`["-Osize", "-Xfrontend", "-enable-cross-import-overlays"${overlayFlags}${FOUNDATION_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}${imports}${nativeImportFlags}${objcFlags}${header}${clangMode}${upstream}]`)})]`;
|
|
8065
8099
|
const deps = [
|
|
8066
8100
|
.../* @__PURE__ */ new Set([
|
|
8067
8101
|
...(target.dependencies ?? []).flatMap(
|
|
@@ -9763,7 +9797,13 @@ function namesLibxml2(input) {
|
|
|
9763
9797
|
}
|
|
9764
9798
|
return false;
|
|
9765
9799
|
}
|
|
9800
|
+
function needsNativeToolset(input, prebuilt) {
|
|
9801
|
+
return Boolean(
|
|
9802
|
+
input.packageFiles || prebuilt || Object.keys(input.files).some(isSwiftNativeTranslationUnit)
|
|
9803
|
+
);
|
|
9804
|
+
}
|
|
9766
9805
|
function writeSwiftProject(layout, input, moduleRoot, prebuilt) {
|
|
9806
|
+
const nativeToolset = needsNativeToolset(input, prebuilt);
|
|
9767
9807
|
if (input.headerAliases !== void 0 && !isSwiftHeaderAliases(input.headerAliases))
|
|
9768
9808
|
throw new Error("swift compile input has invalid original header aliases");
|
|
9769
9809
|
if (input.nativeTargets !== void 0 && !isSwiftNativeTargets(input.nativeTargets))
|
|
@@ -10109,7 +10149,11 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
10109
10149
|
importModuleMaps,
|
|
10110
10150
|
generatedModuleMaps
|
|
10111
10151
|
);
|
|
10112
|
-
const flags = [
|
|
10152
|
+
const flags = [
|
|
10153
|
+
...stageFlags(originalFlags, sdkInclude),
|
|
10154
|
+
...dependencyModuleMaps,
|
|
10155
|
+
...target.defines?.includes(SWIFT_XCODE_BUILD_CONDITION) && !target.defines.includes("SWIFT_PACKAGE") ? ["-USWIFT_PACKAGE"] : []
|
|
10156
|
+
];
|
|
10113
10157
|
const prefixHeader = settings?.prefixHeader ? ["-include", path19.join(layout.root, settings.prefixHeader)] : [];
|
|
10114
10158
|
const bundleName = entries.some(([file]) => file.endsWith(".swift")) ? void 0 : swiftObjCResourceBundleName({
|
|
10115
10159
|
target: target.name,
|
|
@@ -10265,7 +10309,8 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
10265
10309
|
).digest("hex").slice(0, 12);
|
|
10266
10310
|
const name2 = `${target.name}${nativeC ? "Native" : "Swift"}Implementation_${identity}`;
|
|
10267
10311
|
const groupPath = path19.posix.join("PeachNativeSources", name2);
|
|
10268
|
-
const
|
|
10312
|
+
const identityRoot = nativeToolset ? "/peach/build" : layout.root;
|
|
10313
|
+
const sourceIdentity = `-ffile-prefix-map=${path19.join(identityRoot, groupPath)}=${path19.join(identityRoot, target.path)}`;
|
|
10269
10314
|
const group = groups.get(identity) ?? {
|
|
10270
10315
|
name: name2,
|
|
10271
10316
|
path: groupPath,
|
|
@@ -10790,6 +10835,7 @@ module ${moduleName}.Swift {
|
|
|
10790
10835
|
path19.join(layout.root, "Package.swift"),
|
|
10791
10836
|
emitSwiftPackageManifest({
|
|
10792
10837
|
root: layout.root,
|
|
10838
|
+
files,
|
|
10793
10839
|
targets: manifestTargets,
|
|
10794
10840
|
packages,
|
|
10795
10841
|
native,
|
|
@@ -10844,7 +10890,7 @@ module ${moduleName}.Swift {
|
|
|
10844
10890
|
if (files.has(destination)) continue;
|
|
10845
10891
|
files.set(destination, Buffer.from(bytes, "base64"));
|
|
10846
10892
|
}
|
|
10847
|
-
if (
|
|
10893
|
+
if (nativeToolset) {
|
|
10848
10894
|
files.set(
|
|
10849
10895
|
path19.join(layout.root, ".peach-target-toolset.json"),
|
|
10850
10896
|
JSON.stringify({
|
|
@@ -10935,6 +10981,10 @@ module ${moduleName}.Swift {
|
|
|
10935
10981
|
for (const producer of producers)
|
|
10936
10982
|
for (const dependency of dependencies.get(producer) ?? []) include(dependency);
|
|
10937
10983
|
return {
|
|
10984
|
+
nativeBuildTargets: [...native].flatMap(([name2, plan]) => [
|
|
10985
|
+
...!plan.mixed && plan.sources.length > 0 ? [name2] : [],
|
|
10986
|
+
...plan.groups?.map((group) => group.name) ?? (plan.late ? [plan.late.name] : [])
|
|
10987
|
+
]),
|
|
10938
10988
|
headerProducers: [
|
|
10939
10989
|
.../* @__PURE__ */ new Set([
|
|
10940
10990
|
...Object.keys(nativeHeaderDeclarations),
|
|
@@ -10957,7 +11007,7 @@ function outputOf(error) {
|
|
|
10957
11007
|
streamText(Reflect.get(error, "stdout")),
|
|
10958
11008
|
streamText(Reflect.get(error, "stderr"))
|
|
10959
11009
|
].filter(Boolean);
|
|
10960
|
-
if (error instanceof Error) streams.
|
|
11010
|
+
if (error instanceof Error) streams.unshift(error.message);
|
|
10961
11011
|
if (streams.length > 0) return streams.join("\n");
|
|
10962
11012
|
}
|
|
10963
11013
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -11506,7 +11556,17 @@ function retireStaleSwiftLink(root, stamp) {
|
|
|
11506
11556
|
rmSync5(retired, { recursive: true, force: true });
|
|
11507
11557
|
return true;
|
|
11508
11558
|
}
|
|
11509
|
-
function compileSwiftProjectUnit(input, options) {
|
|
11559
|
+
async function compileSwiftProjectUnit(input, options) {
|
|
11560
|
+
for (let attempt = 1; ; attempt++) {
|
|
11561
|
+
try {
|
|
11562
|
+
return await compileSwiftProjectOnce(input, options);
|
|
11563
|
+
} catch (error) {
|
|
11564
|
+
if (attempt >= 3 || !outputOf(error).includes("differs from the caller"))
|
|
11565
|
+
throw error;
|
|
11566
|
+
}
|
|
11567
|
+
}
|
|
11568
|
+
}
|
|
11569
|
+
function compileSwiftProjectOnce(input, options) {
|
|
11510
11570
|
options.signal?.throwIfAborted();
|
|
11511
11571
|
mkdirSync4(options.buildRoot, { recursive: true });
|
|
11512
11572
|
const root = realpathSync3(options.buildRoot);
|
|
@@ -11675,6 +11735,7 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11675
11735
|
})
|
|
11676
11736
|
))
|
|
11677
11737
|
report("framework revision changed; rebuilding the app link");
|
|
11738
|
+
const nativeToolset = needsNativeToolset(input, prebuilt);
|
|
11678
11739
|
const preparation = writeSwiftProject(layout, input, frameworkRoot, prebuilt);
|
|
11679
11740
|
writeSwiftAutolinkLinker(root, options.toolchainBin);
|
|
11680
11741
|
const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
|
|
@@ -11709,7 +11770,7 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11709
11770
|
...swiftCompileSdkOptions(frameworkRoot, options.toolchainBin),
|
|
11710
11771
|
"--swift-sdk",
|
|
11711
11772
|
sdk,
|
|
11712
|
-
...
|
|
11773
|
+
...nativeToolset ? ["--toolset", path19.join(root, ".peach-target-toolset.json")] : [],
|
|
11713
11774
|
"-c",
|
|
11714
11775
|
"release",
|
|
11715
11776
|
"-Xswiftc",
|
|
@@ -11721,7 +11782,12 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11721
11782
|
[frameworkRoot, "framework"],
|
|
11722
11783
|
[root, "build"],
|
|
11723
11784
|
...forwarders
|
|
11724
|
-
]),
|
|
11785
|
+
]).flatMap((flag, index, flags) => {
|
|
11786
|
+
if (!nativeToolset || !flag.startsWith("-ffile-prefix-map="))
|
|
11787
|
+
return [flag];
|
|
11788
|
+
const mapped = flag.replaceAll(root, "/peach/build").replaceAll(frameworkRoot, "/peach/framework").replaceAll(path19.dirname(options.toolchainBin), "/peach/toolchain");
|
|
11789
|
+
return flags[index - 1] === "-Xcc" ? [mapped, "-Xswiftc", "-Xcc", "-Xswiftc", flag] : [mapped];
|
|
11790
|
+
}),
|
|
11725
11791
|
...macroPlugins.libraries.flatMap((plugin) => [
|
|
11726
11792
|
"-Xswiftc",
|
|
11727
11793
|
"-load-plugin-library",
|
|
@@ -11774,6 +11840,31 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
11774
11840
|
);
|
|
11775
11841
|
}
|
|
11776
11842
|
}
|
|
11843
|
+
const checkpoints = path19.join(
|
|
11844
|
+
root,
|
|
11845
|
+
".build",
|
|
11846
|
+
"peach-native-targets",
|
|
11847
|
+
createHash8("sha256").update(readFileSync11(path19.join(root, "Package.swift"))).digest("hex")
|
|
11848
|
+
);
|
|
11849
|
+
mkdirSync4(checkpoints, { recursive: true });
|
|
11850
|
+
for (const target of /* @__PURE__ */ new Set([
|
|
11851
|
+
...input.staticClangTargets ?? [],
|
|
11852
|
+
...preparation.nativeBuildTargets
|
|
11853
|
+
])) {
|
|
11854
|
+
const checkpoint = path19.join(
|
|
11855
|
+
checkpoints,
|
|
11856
|
+
createHash8("sha256").update(target).digest("hex")
|
|
11857
|
+
);
|
|
11858
|
+
if (existsSync4(checkpoint)) continue;
|
|
11859
|
+
await runCompiler(
|
|
11860
|
+
swift,
|
|
11861
|
+
[...buildArgs, "--target", target],
|
|
11862
|
+
appOptions,
|
|
11863
|
+
SWIFTPM_PROGRESS,
|
|
11864
|
+
SWIFTPM_NOISE
|
|
11865
|
+
);
|
|
11866
|
+
writeFileSync4(checkpoint, "");
|
|
11867
|
+
}
|
|
11777
11868
|
await runCompiler(
|
|
11778
11869
|
swift,
|
|
11779
11870
|
buildArgs,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1818 | (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.1818 | (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.1818 | (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;
|
|
@@ -39,9 +39,11 @@ __export(swift_toolchain_exports, {
|
|
|
39
39
|
SWIFT_PRIVATE_DISTRIBUTION_ENV: () => SWIFT_PRIVATE_DISTRIBUTION_ENV,
|
|
40
40
|
confineSwiftScratch: () => confineSwiftScratch,
|
|
41
41
|
ensureSwiftLinuxRuntime: () => ensureSwiftLinuxRuntime,
|
|
42
|
+
extractSwiftHostCompiler: () => extractSwiftHostCompiler,
|
|
42
43
|
installSwiftWasmSdk: () => installSwiftWasmSdk,
|
|
43
44
|
peachsimPackageRoot: () => peachsimPackageRoot,
|
|
44
45
|
privateSwiftDistributionRoot: () => privateSwiftDistributionRoot,
|
|
46
|
+
registerSwiftHostCompiler: () => registerSwiftHostCompiler,
|
|
45
47
|
setSwiftLinuxLibraryPath: () => setSwiftLinuxLibraryPath,
|
|
46
48
|
sourceSwiftCheckout: () => sourceSwiftCheckout,
|
|
47
49
|
swiftCacheDir: () => swiftCacheDir,
|
|
@@ -53,6 +55,8 @@ __export(swift_toolchain_exports, {
|
|
|
53
55
|
swiftEnvironment: () => swiftEnvironment,
|
|
54
56
|
swiftFileChecksum: () => swiftFileChecksum,
|
|
55
57
|
swiftHostCompilerArchive: () => swiftHostCompilerArchive,
|
|
58
|
+
swiftHostCompilerPin: () => swiftHostCompilerPin,
|
|
59
|
+
swiftHostCompilerTar: () => swiftHostCompilerTar,
|
|
56
60
|
swiftInstallSteps: () => swiftInstallSteps,
|
|
57
61
|
swiftLinuxRuntimeLib: () => swiftLinuxRuntimeLib,
|
|
58
62
|
swiftLinuxRuntimePlan: () => swiftLinuxRuntimePlan,
|
|
@@ -73,8 +77,10 @@ var import_node_crypto = require("node:crypto");
|
|
|
73
77
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
74
78
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
75
79
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
80
|
+
var import_promises = require("node:stream/promises");
|
|
76
81
|
var import_node_url = require("node:url");
|
|
77
82
|
var import_node_util = require("node:util");
|
|
83
|
+
var import_node_zlib = __toESM(require("node:zlib"), 1);
|
|
78
84
|
function peachsimPackageRoot() {
|
|
79
85
|
let dir = __sootsim_import_meta_dirname;
|
|
80
86
|
while (!import_node_fs.default.existsSync(import_node_path.default.join(dir, "package.json")) && dir !== import_node_path.default.dirname(dir))
|
|
@@ -103,6 +109,7 @@ var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
|
103
109
|
var compilerArchives = {
|
|
104
110
|
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
105
111
|
identity: "0b2d0a9011c88e66",
|
|
112
|
+
archive: "tar.gz",
|
|
106
113
|
hosts: {
|
|
107
114
|
"darwin-arm64": {
|
|
108
115
|
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
@@ -120,6 +127,7 @@ var compilerArchives = {
|
|
|
120
127
|
},
|
|
121
128
|
"swift-6.4.0-RELEASE-custom-f7c03c3f59ec5d83": {
|
|
122
129
|
identity: "f7c03c3f59ec5d83",
|
|
130
|
+
archive: "tar.gz",
|
|
123
131
|
hosts: {
|
|
124
132
|
"darwin-arm64": {
|
|
125
133
|
checksum: "8946a2d4716d3b0784cef7a85a35f66537bd319c4c5a48c63457d607260df5c5",
|
|
@@ -137,6 +145,7 @@ var compilerArchives = {
|
|
|
137
145
|
},
|
|
138
146
|
"swift-6.4.0-RELEASE-custom-3e3dca8fd1d82975": {
|
|
139
147
|
identity: "3e3dca8fd1d82975",
|
|
148
|
+
archive: "tar.gz",
|
|
140
149
|
hosts: {
|
|
141
150
|
"darwin-arm64": {
|
|
142
151
|
checksum: "dfad56454f5e1e465071ff708bf485be65b438cf55d02b04d26d17d26df9f54a",
|
|
@@ -154,6 +163,7 @@ var compilerArchives = {
|
|
|
154
163
|
},
|
|
155
164
|
"swift-6.4.0-RELEASE-custom-b082ac5437336790": {
|
|
156
165
|
identity: "b082ac5437336790",
|
|
166
|
+
archive: "tar.gz",
|
|
157
167
|
hosts: {
|
|
158
168
|
"darwin-arm64": {
|
|
159
169
|
checksum: "85e601982321d3a6f81f05928bc9bbe7a61bc75b27ce24508e79f6b5b537254d",
|
|
@@ -171,6 +181,7 @@ var compilerArchives = {
|
|
|
171
181
|
},
|
|
172
182
|
"swift-6.4.0-RELEASE-custom-9cdaffdb6b37fb47": {
|
|
173
183
|
identity: "9cdaffdb6b37fb47",
|
|
184
|
+
archive: "tar.gz",
|
|
174
185
|
hosts: {
|
|
175
186
|
"darwin-arm64": {
|
|
176
187
|
checksum: "fdd3f88cf76a8dc2083275d4253255030068a25b5ba68acbf59e0407c45677dd",
|
|
@@ -188,6 +199,7 @@ var compilerArchives = {
|
|
|
188
199
|
},
|
|
189
200
|
"swift-6.4.0-RELEASE-custom-bd49e2f77434e7b1": {
|
|
190
201
|
identity: "bd49e2f77434e7b1",
|
|
202
|
+
archive: "tar.gz",
|
|
191
203
|
hosts: {
|
|
192
204
|
"darwin-arm64": {
|
|
193
205
|
checksum: "e815b06394566e8125475afc8f1807f7f465318c845549c5831043cdc28eca64",
|
|
@@ -205,6 +217,7 @@ var compilerArchives = {
|
|
|
205
217
|
},
|
|
206
218
|
"swift-6.4.0-RELEASE-custom-13450179a7e01c81": {
|
|
207
219
|
identity: "13450179a7e01c81",
|
|
220
|
+
archive: "tar.gz",
|
|
208
221
|
hosts: {
|
|
209
222
|
"darwin-arm64": {
|
|
210
223
|
checksum: "a29be6b722f15c7aafac26ba5703a7392f49ce7ea5e1c56548846b7e458290f7",
|
|
@@ -222,6 +235,7 @@ var compilerArchives = {
|
|
|
222
235
|
},
|
|
223
236
|
"swift-6.4.0-RELEASE-custom-f6868fa6054e83d6": {
|
|
224
237
|
identity: "f6868fa6054e83d6",
|
|
238
|
+
archive: "tar.gz",
|
|
225
239
|
hosts: {
|
|
226
240
|
"darwin-arm64": {
|
|
227
241
|
checksum: "bd80c2f35864ec29883dd22001d0165821e80d78002fc12f92406c3c708694a4",
|
|
@@ -239,23 +253,25 @@ var compilerArchives = {
|
|
|
239
253
|
},
|
|
240
254
|
"swift-6.4.0-RELEASE-custom-a560ff35bf882b5c": {
|
|
241
255
|
identity: "a560ff35bf882b5c",
|
|
256
|
+
archive: "tar.zst",
|
|
242
257
|
hosts: {
|
|
243
258
|
"darwin-arm64": {
|
|
244
|
-
checksum: "
|
|
259
|
+
checksum: "36c50bcdfba88a4c0989af0bd60371497eb4403aa7b80644b479fa509a2187a9",
|
|
245
260
|
manifest: "253e891527d2213f54eace768b902de89de5e9495a3c5f4018de1985516bd553"
|
|
246
261
|
},
|
|
247
262
|
"linux-x64": {
|
|
248
|
-
checksum: "
|
|
263
|
+
checksum: "ba25da9182314fc7b7dd2fc041280e1c7b409f80a1fbccdfa5c342669d164c8e",
|
|
249
264
|
manifest: "6f951cc4071dd0d6054d85711a7c5fe272273658847831b477a8b24be7254ca0"
|
|
250
265
|
},
|
|
251
266
|
"linux-arm64": {
|
|
252
|
-
checksum: "
|
|
267
|
+
checksum: "5f0f4456e9fe22b5486025db9f679c865841660797d71761245291c2c6811c20",
|
|
253
268
|
manifest: "b6f62fca2ec37593e274ee5bac474f21ffc5db14cd82f492ccbc774f8e9b75d8"
|
|
254
269
|
}
|
|
255
270
|
}
|
|
256
271
|
},
|
|
257
272
|
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
258
273
|
identity: SWIFT_HOST_COMPILER_ID,
|
|
274
|
+
archive: "tar.gz",
|
|
259
275
|
hosts: {
|
|
260
276
|
"darwin-arm64": {
|
|
261
277
|
checksum: "bc51b83d9e2e01c9873875326544734486d3ff3a868d650379c304045e8838d3",
|
|
@@ -358,17 +374,43 @@ function ensureSwiftLinuxRuntime(release) {
|
|
|
358
374
|
}
|
|
359
375
|
linuxHostSdkRoot = root;
|
|
360
376
|
}
|
|
361
|
-
function
|
|
377
|
+
function swiftHostCompilerPin(release) {
|
|
362
378
|
const compiler = compilerArchives[release];
|
|
363
379
|
if (!compiler) throw new Error(`unqualified host compiler ${release}`);
|
|
380
|
+
return compiler;
|
|
381
|
+
}
|
|
382
|
+
function registerSwiftHostCompiler(release, pin) {
|
|
383
|
+
compilerArchives[release] = pin;
|
|
384
|
+
}
|
|
385
|
+
function swiftHostCompilerArchive(release, host = `${process.platform}-${process.arch}`) {
|
|
386
|
+
const compiler = swiftHostCompilerPin(release);
|
|
364
387
|
const archive = compiler.hosts[host];
|
|
365
388
|
if (!archive) throw new Error(`unsupported Swift compiler host ${host}`);
|
|
366
389
|
return {
|
|
367
390
|
...archive,
|
|
368
391
|
identity: compiler.identity,
|
|
369
|
-
|
|
392
|
+
archive: compiler.archive,
|
|
393
|
+
url: `https://r2.sootsim.com/swift-host-compiler/${compiler.identity}/${archive.checksum}.${compiler.archive}`
|
|
370
394
|
};
|
|
371
395
|
}
|
|
396
|
+
function swiftHostCompilerTar(archive, url) {
|
|
397
|
+
const file = import_node_fs.default.createReadStream(archive);
|
|
398
|
+
const decoder = url.endsWith(".tar.zst") ? import_node_zlib.default.createZstdDecompress({ params: { [import_node_zlib.default.constants.ZSTD_d_windowLogMax]: 30 } }) : import_node_zlib.default.createGunzip();
|
|
399
|
+
file.on("error", (error) => decoder.destroy(error));
|
|
400
|
+
return file.pipe(decoder);
|
|
401
|
+
}
|
|
402
|
+
async function extractSwiftHostCompiler(archive, url, destination) {
|
|
403
|
+
const tar = (0, import_node_child_process.spawn)("tar", ["-xf", "-", "--strip-components=1", "-C", destination], {
|
|
404
|
+
stdio: ["pipe", "inherit", "inherit"]
|
|
405
|
+
});
|
|
406
|
+
const exited = new Promise((resolve, reject) => {
|
|
407
|
+
tar.on("error", reject);
|
|
408
|
+
tar.on("close", resolve);
|
|
409
|
+
});
|
|
410
|
+
await (0, import_promises.pipeline)(swiftHostCompilerTar(archive, url), tar.stdin);
|
|
411
|
+
const code = await exited;
|
|
412
|
+
if (code !== 0) throw new Error(`tar exited with ${code} unpacking ${archive}`);
|
|
413
|
+
}
|
|
372
414
|
function swiftUpstreamRelease(release) {
|
|
373
415
|
return release.replace(/-custom-[a-f0-9]{16}$/, "");
|
|
374
416
|
}
|
|
@@ -878,9 +920,11 @@ function swiftCompilerInstall(release) {
|
|
|
878
920
|
SWIFT_PRIVATE_DISTRIBUTION_ENV,
|
|
879
921
|
confineSwiftScratch,
|
|
880
922
|
ensureSwiftLinuxRuntime,
|
|
923
|
+
extractSwiftHostCompiler,
|
|
881
924
|
installSwiftWasmSdk,
|
|
882
925
|
peachsimPackageRoot,
|
|
883
926
|
privateSwiftDistributionRoot,
|
|
927
|
+
registerSwiftHostCompiler,
|
|
884
928
|
setSwiftLinuxLibraryPath,
|
|
885
929
|
sourceSwiftCheckout,
|
|
886
930
|
swiftCacheDir,
|
|
@@ -892,6 +936,8 @@ function swiftCompilerInstall(release) {
|
|
|
892
936
|
swiftEnvironment,
|
|
893
937
|
swiftFileChecksum,
|
|
894
938
|
swiftHostCompilerArchive,
|
|
939
|
+
swiftHostCompilerPin,
|
|
940
|
+
swiftHostCompilerTar,
|
|
895
941
|
swiftInstallSteps,
|
|
896
942
|
swiftLinuxRuntimeLib,
|
|
897
943
|
swiftLinuxRuntimePlan,
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1818 | (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;
|