peachsim 0.1.1900 → 0.1.1901
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +73 -56
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +49 -33
- 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 +80 -64
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +31 -30
- 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 +29 -28
- package/dist-lib/native-app-identity-project.cjs +21 -20
- package/dist-lib/native-app-identity-project.mjs +21 -20
- 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 +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +97 -80
- package/dist-lib/swift-compile.cjs +25 -9
- package/dist-lib/swift-compile.mjs +25 -9
- 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 +3 -3
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +35 -19
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/swift-compile.ts +20 -1
- package/src/swift-guest-compile.ts +7 -1
- package/src/swift-guest-link.ts +3 -2
- package/src/swift-toolchain.ts +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from "node:fs";
|
|
27
27
|
import os5 from "node:os";
|
|
28
28
|
import path25 from "node:path";
|
|
29
|
+
import * as v5 from "valibot";
|
|
29
30
|
|
|
30
31
|
// src/admitted-mac-build.ts
|
|
31
32
|
import { spawnSync } from "node:child_process";
|
|
@@ -2880,7 +2881,7 @@ function swiftToolchainBin(release) {
|
|
|
2880
2881
|
return (process.env.PATH ?? "").split(path4.delimiter).find((dir) => dir && fs.existsSync(path4.join(dir, "swift"))) ?? image;
|
|
2881
2882
|
}
|
|
2882
2883
|
var SWIFT_AUTOLINK_LINKER = ".peach-wasm-ld";
|
|
2883
|
-
function writeSwiftAutolinkLinker(directory, toolchainBin) {
|
|
2884
|
+
function writeSwiftAutolinkLinker(directory, toolchainBin, omitLibraries = []) {
|
|
2884
2885
|
const linker = path4.join(directory, SWIFT_AUTOLINK_LINKER);
|
|
2885
2886
|
const script = `#!/bin/sh
|
|
2886
2887
|
set -eu
|
|
@@ -2888,7 +2889,7 @@ for arg in "$@"; do
|
|
|
2888
2889
|
case $arg in
|
|
2889
2890
|
@*)
|
|
2890
2891
|
rsp=\${arg#@}
|
|
2891
|
-
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next } { print }' "$rsp" > "$rsp.dedup"
|
|
2892
|
+
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name2) => ` $0 == "\\"-l${name2}\\"" { next }`).join("")} { print }' "$rsp" > "$rsp.dedup"
|
|
2892
2893
|
mv "$rsp.dedup" "$rsp"
|
|
2893
2894
|
if [ "\${PEACH_DEFER_WASM_LINK:-}" = "1" ] && grep -q '"--start-lib"' "$rsp"; then
|
|
2894
2895
|
cp "$rsp" ${JSON.stringify(path4.join(directory, ".peach-link.rsp"))}
|
|
@@ -7528,7 +7529,7 @@ function emitGuestImageProjection(images) {
|
|
|
7528
7529
|
lines.push("const struct peach_guest_image __peach_guest_images[] = {");
|
|
7529
7530
|
for (const [i, image] of images.entries()) {
|
|
7530
7531
|
const uuid = image.uuid.match(/../g).map((byte) => `0x${byte}`).join(", ");
|
|
7531
|
-
const version2 = (
|
|
7532
|
+
const version2 = (v6) => (v6.major * 65536 + v6.minor * 256 + v6.patch).toString();
|
|
7532
7533
|
lines.push(
|
|
7533
7534
|
` {${cString(image.installName)}, ${image.fileType === "executable" ? 2 : 6}u, {${uuid}}, ${image.buildVersion.platform}u, ${version2(image.buildVersion.minimum)}u, ${version2(image.buildVersion.sdk)}u, ${image.regions.length}u, ${image.regions.length ? `regions_${i}` : "0"}},`
|
|
7534
7535
|
);
|
|
@@ -9231,8 +9232,8 @@ function verifyGuestSymbolScopes(options) {
|
|
|
9231
9232
|
providers: /* @__PURE__ */ new Map(),
|
|
9232
9233
|
physicalModule: false
|
|
9233
9234
|
};
|
|
9234
|
-
if (object3 === "<internal>"
|
|
9235
|
-
record.physicalModule = true;
|
|
9235
|
+
if (object3 === "<internal>") {
|
|
9236
|
+
if (kind === "definition of") record.physicalModule = true;
|
|
9236
9237
|
} else {
|
|
9237
9238
|
const image = options.owners.get(object3);
|
|
9238
9239
|
if (image === void 0)
|
|
@@ -10172,9 +10173,14 @@ async function compileGuestLink(options) {
|
|
|
10172
10173
|
systemProviders,
|
|
10173
10174
|
hostImports: scope.hostImports
|
|
10174
10175
|
});
|
|
10176
|
+
const wrapped = new Set(
|
|
10177
|
+
prepared.args.flatMap(
|
|
10178
|
+
(arg) => arg.startsWith("--wrap=") ? [arg.slice(7), `__wrap_${arg.slice(7)}`] : []
|
|
10179
|
+
)
|
|
10180
|
+
);
|
|
10175
10181
|
return {
|
|
10176
10182
|
...plan,
|
|
10177
|
-
symbols: scope.definitions,
|
|
10183
|
+
symbols: scope.definitions.filter((symbol) => !wrapped.has(symbol)),
|
|
10178
10184
|
directBindings: verified.directBindings
|
|
10179
10185
|
};
|
|
10180
10186
|
}
|
|
@@ -12057,7 +12063,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12057
12063
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12058
12064
|
var MULTI_MANIFEST_VERSION = 66;
|
|
12059
12065
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12060
|
-
var compilerSourceDigest = true ? "
|
|
12066
|
+
var compilerSourceDigest = true ? "8768dadacf2e909cf808df3a31fe261832d51fb29d48f2b45bd4df5c117c6f69" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12061
12067
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12062
12068
|
const hash = createHash13("sha256");
|
|
12063
12069
|
hash.update(`swift-compile
|
|
@@ -16175,7 +16181,17 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16175
16181
|
report("framework revision changed; rebuilding the app link");
|
|
16176
16182
|
const nativeToolset = needsNativeToolset(input, prebuilt);
|
|
16177
16183
|
const preparation = writeSwiftProject(layout2, input, frameworkRoot, prebuilt);
|
|
16178
|
-
|
|
16184
|
+
const productFile = path25.join(frameworkRoot, SWIFT_FRAMEWORK_PRODUCT_FILE);
|
|
16185
|
+
writeSwiftAutolinkLinker(
|
|
16186
|
+
root,
|
|
16187
|
+
options.toolchainBin,
|
|
16188
|
+
existsSync4(productFile) ? [
|
|
16189
|
+
v5.parse(
|
|
16190
|
+
swiftFrameworkProductSchema,
|
|
16191
|
+
JSON.parse(readFileSync16(productFile, "utf8"))
|
|
16192
|
+
).product.name
|
|
16193
|
+
] : []
|
|
16194
|
+
);
|
|
16179
16195
|
const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
|
|
16180
16196
|
const appOptions = projectProcess ? {
|
|
16181
16197
|
...buildOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (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.1901 | (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.1901 | (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;
|
|
@@ -455,7 +455,7 @@ function swiftToolchainBin(release) {
|
|
|
455
455
|
return (process.env.PATH ?? "").split(import_node_path.default.delimiter).find((dir) => dir && import_node_fs.default.existsSync(import_node_path.default.join(dir, "swift"))) ?? image;
|
|
456
456
|
}
|
|
457
457
|
var SWIFT_AUTOLINK_LINKER = ".peach-wasm-ld";
|
|
458
|
-
function writeSwiftAutolinkLinker(directory, toolchainBin) {
|
|
458
|
+
function writeSwiftAutolinkLinker(directory, toolchainBin, omitLibraries = []) {
|
|
459
459
|
const linker = import_node_path.default.join(directory, SWIFT_AUTOLINK_LINKER);
|
|
460
460
|
const script = `#!/bin/sh
|
|
461
461
|
set -eu
|
|
@@ -463,7 +463,7 @@ for arg in "$@"; do
|
|
|
463
463
|
case $arg in
|
|
464
464
|
@*)
|
|
465
465
|
rsp=\${arg#@}
|
|
466
|
-
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next } { print }' "$rsp" > "$rsp.dedup"
|
|
466
|
+
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name) => ` $0 == "\\"-l${name}\\"" { next }`).join("")} { print }' "$rsp" > "$rsp.dedup"
|
|
467
467
|
mv "$rsp.dedup" "$rsp"
|
|
468
468
|
if [ "\${PEACH_DEFER_WASM_LINK:-}" = "1" ] && grep -q '"--start-lib"' "$rsp"; then
|
|
469
469
|
cp "$rsp" ${JSON.stringify(import_node_path.default.join(directory, ".peach-link.rsp"))}
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (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;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (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,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "e66452b430a7dc749e0db64e21a2f3cd969ba48fa1ae31cd5de5c366c3783bf7", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "e66452b430a7dc749e0db64e21a2f3cd969ba48fa1ae31cd5de5c366c3783bf7", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "450ee02b48bcdbbacbb4e94cd161308f1dac1bdb540ed5033c2433f717f738d2", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "0669e4cca53dc8db00059018d7f93ff9139915fc0f4fb0c82a938febb7862dfe", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -92,7 +92,7 @@ var require_parse = __commonJS({
|
|
|
92
92
|
var token;
|
|
93
93
|
var key2;
|
|
94
94
|
var root;
|
|
95
|
-
module2.exports = function
|
|
95
|
+
module2.exports = function parse6(text5, reviver) {
|
|
96
96
|
source = String(text5);
|
|
97
97
|
parseState = "start";
|
|
98
98
|
stack = [];
|
|
@@ -947,12 +947,12 @@ var require_stringify = __commonJS({
|
|
|
947
947
|
replacerFunc = replacer;
|
|
948
948
|
} else if (Array.isArray(replacer)) {
|
|
949
949
|
propertyList = [];
|
|
950
|
-
for (const
|
|
950
|
+
for (const v6 of replacer) {
|
|
951
951
|
let item;
|
|
952
|
-
if (typeof
|
|
953
|
-
item =
|
|
954
|
-
} else if (typeof
|
|
955
|
-
item = String(
|
|
952
|
+
if (typeof v6 === "string") {
|
|
953
|
+
item = v6;
|
|
954
|
+
} else if (typeof v6 === "number" || v6 instanceof String || v6 instanceof Number) {
|
|
955
|
+
item = String(v6);
|
|
956
956
|
}
|
|
957
957
|
if (item !== void 0 && propertyList.indexOf(item) < 0) {
|
|
958
958
|
propertyList.push(item);
|
|
@@ -1150,10 +1150,10 @@ var require_stringify = __commonJS({
|
|
|
1150
1150
|
var require_lib = __commonJS({
|
|
1151
1151
|
"../../node_modules/json5/lib/index.js"(exports2, module2) {
|
|
1152
1152
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1153
|
-
var
|
|
1153
|
+
var parse6 = require_parse();
|
|
1154
1154
|
var stringify = require_stringify();
|
|
1155
1155
|
var JSON52 = {
|
|
1156
|
-
parse:
|
|
1156
|
+
parse: parse6,
|
|
1157
1157
|
stringify
|
|
1158
1158
|
};
|
|
1159
1159
|
module2.exports = JSON52;
|
|
@@ -1790,6 +1790,7 @@ var import_node_crypto12 = require("node:crypto");
|
|
|
1790
1790
|
var import_node_fs25 = require("node:fs");
|
|
1791
1791
|
var import_node_os9 = __toESM(require("node:os"), 1);
|
|
1792
1792
|
var import_node_path25 = __toESM(require("node:path"), 1);
|
|
1793
|
+
var v5 = __toESM(require("valibot"), 1);
|
|
1793
1794
|
|
|
1794
1795
|
// src/admitted-mac-build.ts
|
|
1795
1796
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -4715,7 +4716,7 @@ function swiftToolchainBin(release) {
|
|
|
4715
4716
|
return (process.env.PATH ?? "").split(import_node_path4.default.delimiter).find((dir) => dir && import_node_fs6.default.existsSync(import_node_path4.default.join(dir, "swift"))) ?? image;
|
|
4716
4717
|
}
|
|
4717
4718
|
var SWIFT_AUTOLINK_LINKER = ".peach-wasm-ld";
|
|
4718
|
-
function writeSwiftAutolinkLinker(directory, toolchainBin) {
|
|
4719
|
+
function writeSwiftAutolinkLinker(directory, toolchainBin, omitLibraries = []) {
|
|
4719
4720
|
const linker = import_node_path4.default.join(directory, SWIFT_AUTOLINK_LINKER);
|
|
4720
4721
|
const script = `#!/bin/sh
|
|
4721
4722
|
set -eu
|
|
@@ -4723,7 +4724,7 @@ for arg in "$@"; do
|
|
|
4723
4724
|
case $arg in
|
|
4724
4725
|
@*)
|
|
4725
4726
|
rsp=\${arg#@}
|
|
4726
|
-
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next } { print }' "$rsp" > "$rsp.dedup"
|
|
4727
|
+
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name3) => ` $0 == "\\"-l${name3}\\"" { next }`).join("")} { print }' "$rsp" > "$rsp.dedup"
|
|
4727
4728
|
mv "$rsp.dedup" "$rsp"
|
|
4728
4729
|
if [ "\${PEACH_DEFER_WASM_LINK:-}" = "1" ] && grep -q '"--start-lib"' "$rsp"; then
|
|
4729
4730
|
cp "$rsp" ${JSON.stringify(import_node_path4.default.join(directory, ".peach-link.rsp"))}
|
|
@@ -12024,7 +12025,7 @@ function emitGuestImageProjection(images) {
|
|
|
12024
12025
|
lines.push("const struct peach_guest_image __peach_guest_images[] = {");
|
|
12025
12026
|
for (const [i, image] of images.entries()) {
|
|
12026
12027
|
const uuid = image.uuid.match(/../g).map((byte) => `0x${byte}`).join(", ");
|
|
12027
|
-
const version2 = (
|
|
12028
|
+
const version2 = (v6) => (v6.major * 65536 + v6.minor * 256 + v6.patch).toString();
|
|
12028
12029
|
lines.push(
|
|
12029
12030
|
` {${cString(image.installName)}, ${image.fileType === "executable" ? 2 : 6}u, {${uuid}}, ${image.buildVersion.platform}u, ${version2(image.buildVersion.minimum)}u, ${version2(image.buildVersion.sdk)}u, ${image.regions.length}u, ${image.regions.length ? `regions_${i}` : "0"}},`
|
|
12030
12031
|
);
|
|
@@ -13729,8 +13730,8 @@ function verifyGuestSymbolScopes(options) {
|
|
|
13729
13730
|
providers: /* @__PURE__ */ new Map(),
|
|
13730
13731
|
physicalModule: false
|
|
13731
13732
|
};
|
|
13732
|
-
if (object4 === "<internal>"
|
|
13733
|
-
record2.physicalModule = true;
|
|
13733
|
+
if (object4 === "<internal>") {
|
|
13734
|
+
if (kind === "definition of") record2.physicalModule = true;
|
|
13734
13735
|
} else {
|
|
13735
13736
|
const image = options.owners.get(object4);
|
|
13736
13737
|
if (image === void 0)
|
|
@@ -14672,9 +14673,14 @@ async function compileGuestLink(options) {
|
|
|
14672
14673
|
systemProviders,
|
|
14673
14674
|
hostImports: scope2.hostImports
|
|
14674
14675
|
});
|
|
14676
|
+
const wrapped = new Set(
|
|
14677
|
+
prepared.args.flatMap(
|
|
14678
|
+
(arg) => arg.startsWith("--wrap=") ? [arg.slice(7), `__wrap_${arg.slice(7)}`] : []
|
|
14679
|
+
)
|
|
14680
|
+
);
|
|
14675
14681
|
return {
|
|
14676
14682
|
...plan,
|
|
14677
|
-
symbols: scope2.definitions,
|
|
14683
|
+
symbols: scope2.definitions.filter((symbol2) => !wrapped.has(symbol2)),
|
|
14678
14684
|
directBindings: verified2.directBindings
|
|
14679
14685
|
};
|
|
14680
14686
|
}
|
|
@@ -16394,7 +16400,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
16394
16400
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
16395
16401
|
var MULTI_MANIFEST_VERSION = 66;
|
|
16396
16402
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
16397
|
-
var compilerSourceDigest = true ? "
|
|
16403
|
+
var compilerSourceDigest = true ? "8768dadacf2e909cf808df3a31fe261832d51fb29d48f2b45bd4df5c117c6f69" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
16398
16404
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
16399
16405
|
const hash = (0, import_node_crypto12.createHash)("sha256");
|
|
16400
16406
|
hash.update(`swift-compile
|
|
@@ -20419,7 +20425,17 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
20419
20425
|
report("framework revision changed; rebuilding the app link");
|
|
20420
20426
|
const nativeToolset = needsNativeToolset(input, prebuilt);
|
|
20421
20427
|
const preparation = writeSwiftProject(layout2, input, frameworkRoot, prebuilt);
|
|
20422
|
-
|
|
20428
|
+
const productFile = import_node_path25.default.join(frameworkRoot, SWIFT_FRAMEWORK_PRODUCT_FILE);
|
|
20429
|
+
writeSwiftAutolinkLinker(
|
|
20430
|
+
root,
|
|
20431
|
+
options.toolchainBin,
|
|
20432
|
+
(0, import_node_fs25.existsSync)(productFile) ? [
|
|
20433
|
+
v5.parse(
|
|
20434
|
+
swiftFrameworkProductSchema,
|
|
20435
|
+
JSON.parse((0, import_node_fs25.readFileSync)(productFile, "utf8"))
|
|
20436
|
+
).product.name
|
|
20437
|
+
] : []
|
|
20438
|
+
);
|
|
20423
20439
|
const projectProcess = options.project ? prepareSwiftProjectProcess(root, options.project) : void 0;
|
|
20424
20440
|
const appOptions = projectProcess ? {
|
|
20425
20441
|
...buildOptions,
|
|
@@ -29527,7 +29543,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
29527
29543
|
return hash.digest("hex");
|
|
29528
29544
|
}
|
|
29529
29545
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
29530
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
29546
|
+
var STANDIN_SOURCE_DIGEST = true ? "ae26db314b6d3703c6fc172d019e3cb0fe28a018e5f614bb804fae720ab78ff8" : standinSourceDigest();
|
|
29531
29547
|
|
|
29532
29548
|
// src/swift-standins.ts
|
|
29533
29549
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1901 | (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;
|
package/package.json
CHANGED
package/src/swift-compile.ts
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
} from 'node:fs'
|
|
26
26
|
import os from 'node:os'
|
|
27
27
|
import path from 'node:path'
|
|
28
|
+
import * as v from 'valibot'
|
|
28
29
|
import { windowAdmission } from './admitted-mac-build'
|
|
29
30
|
import cPredefinesJson from './generated/swift-c-predefines.json' with { type: 'json' }
|
|
30
31
|
import { terminateProcessGroup } from './process-group'
|
|
@@ -133,6 +134,10 @@ import {
|
|
|
133
134
|
type SwiftHeaderAliases,
|
|
134
135
|
type SwiftProjectPreparation,
|
|
135
136
|
} from './swiftContract'
|
|
137
|
+
import {
|
|
138
|
+
SWIFT_FRAMEWORK_PRODUCT_FILE,
|
|
139
|
+
swiftFrameworkProductSchema,
|
|
140
|
+
} from './swiftRuntimeProductContract'
|
|
136
141
|
import { optimizeWasm, WASM_OPTIMIZE_IDENTITY } from './wasm-optimize'
|
|
137
142
|
import { writeBuildFile } from './write-build-file'
|
|
138
143
|
import { writeXcodeHeaderSearch } from './xcode-header-search'
|
|
@@ -6956,7 +6961,21 @@ function compileSwiftProjectOnce(
|
|
|
6956
6961
|
report('framework revision changed; rebuilding the app link')
|
|
6957
6962
|
const nativeToolset = needsNativeToolset(input, prebuilt)
|
|
6958
6963
|
const preparation = writeSwiftProject(layout, input, frameworkRoot, prebuilt)
|
|
6959
|
-
|
|
6964
|
+
// the framework objects link as inputs, so the product name its
|
|
6965
|
+
// modules autolink has no archive to load
|
|
6966
|
+
const productFile = path.join(frameworkRoot, SWIFT_FRAMEWORK_PRODUCT_FILE)
|
|
6967
|
+
writeSwiftAutolinkLinker(
|
|
6968
|
+
root,
|
|
6969
|
+
options.toolchainBin,
|
|
6970
|
+
existsSync(productFile)
|
|
6971
|
+
? [
|
|
6972
|
+
v.parse(
|
|
6973
|
+
swiftFrameworkProductSchema,
|
|
6974
|
+
JSON.parse(readFileSync(productFile, 'utf8')),
|
|
6975
|
+
).product.name,
|
|
6976
|
+
]
|
|
6977
|
+
: [],
|
|
6978
|
+
)
|
|
6960
6979
|
const projectProcess = options.project
|
|
6961
6980
|
? prepareSwiftProjectProcess(root, options.project)
|
|
6962
6981
|
: undefined
|
|
@@ -421,9 +421,15 @@ export async function compileGuestLink(options: {
|
|
|
421
421
|
systemProviders,
|
|
422
422
|
hostImports: scope.hostImports,
|
|
423
423
|
})
|
|
424
|
+
// wasm-ld applies a --wrap by name, so the wrapped symbol and its wrapper keep theirs
|
|
425
|
+
const wrapped = new Set(
|
|
426
|
+
prepared.args.flatMap((arg) =>
|
|
427
|
+
arg.startsWith('--wrap=') ? [arg.slice(7), `__wrap_${arg.slice(7)}`] : [],
|
|
428
|
+
),
|
|
429
|
+
)
|
|
424
430
|
return {
|
|
425
431
|
...plan,
|
|
426
|
-
symbols: scope.definitions,
|
|
432
|
+
symbols: scope.definitions.filter((symbol) => !wrapped.has(symbol)),
|
|
427
433
|
directBindings: verified.directBindings,
|
|
428
434
|
}
|
|
429
435
|
},
|
package/src/swift-guest-link.ts
CHANGED
|
@@ -1012,8 +1012,9 @@ export function verifyGuestSymbolScopes(options: {
|
|
|
1012
1012
|
providers: new Map<string, number>(),
|
|
1013
1013
|
physicalModule: false,
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1015
|
+
// an internal reference is wasm-ld's own, such as the real half of a --wrap, with no object to scope
|
|
1016
|
+
if (object === '<internal>') {
|
|
1017
|
+
if (kind === 'definition of') record.physicalModule = true
|
|
1017
1018
|
} else {
|
|
1018
1019
|
const image = options.owners.get(object!)
|
|
1019
1020
|
if (image === undefined)
|
package/src/swift-toolchain.ts
CHANGED
|
@@ -510,6 +510,7 @@ export const SWIFT_AUTOLINK_LINKER = '.peach-wasm-ld'
|
|
|
510
510
|
export function writeSwiftAutolinkLinker(
|
|
511
511
|
directory: string,
|
|
512
512
|
toolchainBin: string,
|
|
513
|
+
omitLibraries: readonly string[] = [],
|
|
513
514
|
): string {
|
|
514
515
|
const linker = path.join(directory, SWIFT_AUTOLINK_LINKER)
|
|
515
516
|
const script = `#!/bin/sh
|
|
@@ -518,7 +519,7 @@ for arg in "$@"; do
|
|
|
518
519
|
case $arg in
|
|
519
520
|
@*)
|
|
520
521
|
rsp=\${arg#@}
|
|
521
|
-
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next } { print }' "$rsp" > "$rsp.dedup"
|
|
522
|
+
awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name) => ` $0 == "\\"-l${name}\\"" { next }`).join('')} { print }' "$rsp" > "$rsp.dedup"
|
|
522
523
|
mv "$rsp.dedup" "$rsp"
|
|
523
524
|
if [ "\${PEACH_DEFER_WASM_LINK:-}" = "1" ] && grep -q '"--start-lib"' "$rsp"; then
|
|
524
525
|
cp "$rsp" ${JSON.stringify(path.join(directory, '.peach-link.rsp'))}
|