peachsim 0.1.2622 → 0.1.2624
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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +693 -306
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-FYCW5KQE.mjs → acorn-DH6VFUJ3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UQ3ACQY7.mjs → chunk-265THLTP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5SDBXLYL.mjs → chunk-2YHIYKY2.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-SKVUSWJU.mjs → chunk-3XA5HYI5.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-W7AGZLTK.mjs → chunk-A2WMBGJO.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-HY7D6BBU.mjs → chunk-AV7G5PTE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HMWCDFVQ.mjs → chunk-CM2NU5MS.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-C2QXEBC5.mjs → chunk-EFQFJ7M6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7Z4ESZI7.mjs → chunk-HKPKCJI5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N3LFPMVM.mjs → chunk-IMI2NE4A.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-G7NMIYJW.mjs → chunk-JHMD4G4V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-67RCWRPX.mjs → chunk-LCO2EXKF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DOCJYFRP.mjs → chunk-LD7Z3NDO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7DFBTAWA.mjs → chunk-LMWSFXYN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IEVIGGKG.mjs → chunk-LOQBWIPM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-X62EBL6H.mjs → chunk-LT533AHJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-P64OR3XD.mjs → chunk-N4ZJZUCO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UR2EIB2I.mjs → chunk-OLAYY7SG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-G4CIR7M6.mjs → chunk-QNXV766K.mjs} +565 -290
- package/dist-lib/esm-chunks/{chunk-3XZWIVAA.mjs → chunk-QZ5HTMWV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V7CGV5XO.mjs → chunk-T7C6Z5UH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Y2RPOAEE.mjs → chunk-UJORQHAE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IRUQ2NMF.mjs → chunk-VH4BJS5V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5UDR743S.mjs → chunk-XONCLAVA.mjs} +8 -7
- package/dist-lib/esm-chunks/{chunk-WRQCYESG.mjs → chunk-YOD53JTM.mjs} +2 -2
- package/dist-lib/esm-chunks/{metro-layout-parser-GR4EJUCZ.mjs → metro-layout-parser-MDVTDJ65.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-CW6VQ6A5.mjs → swift-package-prebuilt-ZN7I4FYC.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-NULACNZJ.mjs → swift-sdk-app-module-DUVE2OXH.mjs} +107 -20
- package/dist-lib/esm-chunks/{swift-sdk-image-ZFATI6XZ.mjs → swift-sdk-image-YSWQBCYV.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-WKVRKIRF.mjs → swift-sdk-image-producer-MZ235WSK.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +686 -299
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +691 -304
- package/dist-lib/host/fetch-proxy-handler.cjs +7 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +30 -15
- package/dist-lib/native-app-identity-project.mjs +44 -29
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +691 -304
- package/dist-lib/swift-compile.cjs +638 -280
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/package.json +1 -1
- package/src/bazel-project.ts +34 -18
- package/src/binaryen.lock.json +3 -3
- package/src/swift-compile.ts +8 -0
- package/src/swift-distribution.lock.json +8 -3
- package/src/swift-guest-compile.ts +170 -160
- package/src/swift-guest-dyld-table.ts +22 -9
- package/src/swift-guest-link.ts +116 -42
- package/src/swift-guest-linked-spans.ts +63 -14
- package/src/swift-guest-projection-storage.ts +7 -6
- package/src/swift-guest-source-inputs.ts +35 -21
- package/src/swift-objc-compile.ts +1 -0
- package/src/swift-sdk-app-module.ts +118 -15
- package/src/swift-sdk-image-wasm.ts +119 -17
- package/src/swift-sdk-image.ts +4 -1
- package/src/swift-wasm-prune.ts +71 -41
- package/src/wasm-narrow-boundary.ts +31 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
DARWIN_RECORDS_PREFIX,
|
|
4
4
|
KEEP_WASM_NAMES,
|
|
@@ -25,21 +25,21 @@ import {
|
|
|
25
25
|
swiftSdkGuestLookups,
|
|
26
26
|
unslottedFunctions,
|
|
27
27
|
wasmSections
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QNXV766K.mjs";
|
|
29
29
|
import {
|
|
30
30
|
withSwiftRootLock
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YOD53JTM.mjs";
|
|
32
32
|
import {
|
|
33
33
|
swiftDistributionAt,
|
|
34
34
|
swiftModuleDigest,
|
|
35
35
|
swiftModuleToolchain,
|
|
36
36
|
swiftSdkPaths
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3XA5HYI5.mjs";
|
|
38
38
|
import {
|
|
39
39
|
SWIFT_WASM_TRIPLE,
|
|
40
40
|
sourceSwiftCheckout,
|
|
41
41
|
swiftCacheDir
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-IMI2NE4A.mjs";
|
|
43
43
|
|
|
44
44
|
// src/swift-sdk-image.ts
|
|
45
45
|
import { execFile } from "node:child_process";
|
|
@@ -219,7 +219,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
219
219
|
const existing = cached(directory, key);
|
|
220
220
|
if (existing) return existing;
|
|
221
221
|
if (!options?.producer && !swiftDistributionAt(moduleRoot) && path.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
|
|
222
|
-
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-
|
|
222
|
+
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-MZ235WSK.mjs");
|
|
223
223
|
await produceSwiftSdkImage({
|
|
224
224
|
moduleRoot,
|
|
225
225
|
key,
|
|
@@ -465,6 +465,7 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, scopedLookups
|
|
|
465
465
|
].map((name) => `--export=${name}`),
|
|
466
466
|
`@${path.join(work, "exports.rsp")}`,
|
|
467
467
|
"--gc-sections",
|
|
468
|
+
"--strip-debug",
|
|
468
469
|
// strings stay with their objects, so an app loads only the ones its pieces reference
|
|
469
470
|
"-O0"
|
|
470
471
|
];
|
|
@@ -525,7 +526,7 @@ async function linkSwiftSdkImage(moduleRoot, key, directory, work, scopedLookups
|
|
|
525
526
|
writeFileSync(path.join(work, INTERFACE_FILE), JSON.stringify(sdkInterface));
|
|
526
527
|
writeFileSync(
|
|
527
528
|
path.join(work, IMAGE_DIGEST),
|
|
528
|
-
createHash("sha256").update(image).digest("hex")
|
|
529
|
+
typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : createHash("sha256").update(image).digest("hex")
|
|
529
530
|
);
|
|
530
531
|
if (swiftSdkImageKey(
|
|
531
532
|
moduleRoot,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
killOrphanedProcessGroup,
|
|
4
4
|
readProcessTable,
|
|
5
5
|
terminateProcessGroup
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IMI2NE4A.mjs";
|
|
7
7
|
|
|
8
8
|
// src/swift-root-lock.ts
|
|
9
9
|
import {
|
package/dist-lib/esm-chunks/{metro-layout-parser-GR4EJUCZ.mjs → metro-layout-parser-MDVTDJ65.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
2
|
-
import "./chunk-
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
import "./chunk-LD7Z3NDO.mjs";
|
|
3
3
|
|
|
4
4
|
// src/metro-layout-parser.ts
|
|
5
5
|
var whitespace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/y;
|
|
@@ -8,7 +8,7 @@ var lineBreak = /[\r\n\u2028\u2029]/;
|
|
|
8
8
|
var metroLayoutParser;
|
|
9
9
|
async function loadMetroLayoutParser() {
|
|
10
10
|
if (metroLayoutParser) return metroLayoutParser;
|
|
11
|
-
const { Parser } = await import("./acorn-
|
|
11
|
+
const { Parser } = await import("./acorn-DH6VFUJ3.mjs");
|
|
12
12
|
metroLayoutParser = Parser.extend(
|
|
13
13
|
(Base) => {
|
|
14
14
|
const parseFunctionBody = Reflect.get(Base.prototype, "parseFunctionBody");
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
compileTargets,
|
|
4
4
|
fetchNativeEntry,
|
|
5
5
|
nativeEntryKey,
|
|
6
6
|
swiftAvailableModules
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-QNXV766K.mjs";
|
|
8
|
+
import "./chunk-YOD53JTM.mjs";
|
|
9
9
|
import {
|
|
10
10
|
swiftDistributionAt,
|
|
11
11
|
swiftImportNames
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-3XA5HYI5.mjs";
|
|
13
|
+
import "./chunk-IMI2NE4A.mjs";
|
|
14
14
|
import {
|
|
15
15
|
SWIFT_REMOTE_PACKAGES_DIR
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OLAYY7SG.mjs";
|
|
17
17
|
import {
|
|
18
18
|
manifestCalls
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-N4ZJZUCO.mjs";
|
|
20
|
+
import "./chunk-QZ5HTMWV.mjs";
|
|
21
|
+
import "./chunk-265THLTP.mjs";
|
|
22
|
+
import "./chunk-LT533AHJ.mjs";
|
|
23
|
+
import "./chunk-AV7G5PTE.mjs";
|
|
24
|
+
import "./chunk-LD7Z3NDO.mjs";
|
|
25
25
|
|
|
26
26
|
// src/swift-package-prebuilt.ts
|
|
27
27
|
import { createHash } from "node:crypto";
|
package/dist-lib/esm-chunks/{swift-sdk-app-module-NULACNZJ.mjs → swift-sdk-app-module-DUVE2OXH.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
4
4
|
SWIFT_SDK_APP_TABLE_BASE,
|
|
5
5
|
SWIFT_SDK_MEMORY_BASE,
|
|
6
6
|
SWIFT_SDK_PIECE_FIELDS,
|
|
7
7
|
readSwiftSdkManifest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XONCLAVA.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ADDEND_RELOCATIONS,
|
|
11
11
|
KEEP_WASM_NAMES,
|
|
@@ -33,34 +33,39 @@ import {
|
|
|
33
33
|
wasmReader,
|
|
34
34
|
wasmSections,
|
|
35
35
|
writeWasmCustomSection
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-QNXV766K.mjs";
|
|
37
|
+
import "./chunk-YOD53JTM.mjs";
|
|
38
|
+
import "./chunk-CM2NU5MS.mjs";
|
|
39
|
+
import "./chunk-LCO2EXKF.mjs";
|
|
40
|
+
import "./chunk-HKPKCJI5.mjs";
|
|
41
|
+
import "./chunk-3XA5HYI5.mjs";
|
|
42
42
|
import {
|
|
43
43
|
SWIFT_WASM_TRIPLE
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-IMI2NE4A.mjs";
|
|
45
|
+
import "./chunk-OLAYY7SG.mjs";
|
|
46
|
+
import "./chunk-N4ZJZUCO.mjs";
|
|
47
|
+
import "./chunk-QZ5HTMWV.mjs";
|
|
48
|
+
import "./chunk-265THLTP.mjs";
|
|
49
|
+
import "./chunk-LT533AHJ.mjs";
|
|
50
|
+
import "./chunk-AV7G5PTE.mjs";
|
|
51
|
+
import "./chunk-LD7Z3NDO.mjs";
|
|
52
52
|
|
|
53
53
|
// src/swift-sdk-app-module.ts
|
|
54
54
|
import { execFile } from "node:child_process";
|
|
55
55
|
import { createHash } from "node:crypto";
|
|
56
56
|
import {
|
|
57
|
+
appendFileSync,
|
|
57
58
|
chownSync,
|
|
59
|
+
closeSync,
|
|
58
60
|
constants,
|
|
59
61
|
copyFileSync,
|
|
60
62
|
existsSync,
|
|
63
|
+
fstatSync,
|
|
61
64
|
mkdirSync,
|
|
62
65
|
mkdtempSync,
|
|
66
|
+
openSync,
|
|
63
67
|
readFileSync,
|
|
68
|
+
readSync,
|
|
64
69
|
realpathSync,
|
|
65
70
|
rmSync,
|
|
66
71
|
statSync,
|
|
@@ -148,9 +153,12 @@ async function buildSwiftAppModule(options) {
|
|
|
148
153
|
linkage: link.linkage,
|
|
149
154
|
usage
|
|
150
155
|
});
|
|
151
|
-
|
|
156
|
+
finishSwiftAppModuleFile(options.output);
|
|
152
157
|
return binding;
|
|
153
158
|
}
|
|
159
|
+
function swiftAppModuleThunkSection(lowered) {
|
|
160
|
+
return [NATIVE_SDK_THUNK_SECTION, sdkImportThunks(lowered)];
|
|
161
|
+
}
|
|
154
162
|
function finishSwiftAppModule(lowered) {
|
|
155
163
|
return writeWasmCustomSection(
|
|
156
164
|
lowered,
|
|
@@ -158,6 +166,73 @@ function finishSwiftAppModule(lowered) {
|
|
|
158
166
|
sdkImportThunks(lowered)
|
|
159
167
|
);
|
|
160
168
|
}
|
|
169
|
+
function finishSwiftAppModuleFile(file) {
|
|
170
|
+
const fd = openSync(file, "r");
|
|
171
|
+
let prefixEnd = 8;
|
|
172
|
+
let hasExistingThunk = false;
|
|
173
|
+
let prefix;
|
|
174
|
+
try {
|
|
175
|
+
const total = fstatSync(fd).size;
|
|
176
|
+
const probe = Buffer.allocUnsafe(16);
|
|
177
|
+
let offset = 8;
|
|
178
|
+
while (offset < total) {
|
|
179
|
+
const read = readSync(fd, probe, 0, Math.min(16, total - offset), offset);
|
|
180
|
+
if (read < 2) break;
|
|
181
|
+
const id = probe[0];
|
|
182
|
+
let size = 0;
|
|
183
|
+
let shift = 0;
|
|
184
|
+
let at = 1;
|
|
185
|
+
for (; ; ) {
|
|
186
|
+
const byte = probe[at++];
|
|
187
|
+
size += (byte & 127) * 2 ** shift;
|
|
188
|
+
if (!(byte & 128)) break;
|
|
189
|
+
shift += 7;
|
|
190
|
+
}
|
|
191
|
+
const start = offset + at;
|
|
192
|
+
const next = start + size;
|
|
193
|
+
if (id === 1 || id === 2) prefixEnd = next;
|
|
194
|
+
else if (id === 0) {
|
|
195
|
+
const nameBuf = Buffer.allocUnsafe(Math.min(128, size));
|
|
196
|
+
const nRead = readSync(fd, nameBuf, 0, nameBuf.length, start);
|
|
197
|
+
let nLen = 0;
|
|
198
|
+
let nShift = 0;
|
|
199
|
+
let nAt = 0;
|
|
200
|
+
for (; ; ) {
|
|
201
|
+
if (nAt >= nRead) break;
|
|
202
|
+
const byte = nameBuf[nAt++];
|
|
203
|
+
nLen += (byte & 127) * 2 ** nShift;
|
|
204
|
+
if (!(byte & 128)) break;
|
|
205
|
+
nShift += 7;
|
|
206
|
+
}
|
|
207
|
+
if (nAt + nLen <= nRead && nameBuf.toString("utf8", nAt, nAt + nLen) === NATIVE_SDK_THUNK_SECTION) {
|
|
208
|
+
hasExistingThunk = true;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
offset = next;
|
|
213
|
+
}
|
|
214
|
+
if (!hasExistingThunk) {
|
|
215
|
+
prefix = Buffer.allocUnsafe(prefixEnd);
|
|
216
|
+
let filled = 0;
|
|
217
|
+
while (filled < prefixEnd) {
|
|
218
|
+
const n = readSync(fd, prefix, filled, prefixEnd - filled, filled);
|
|
219
|
+
if (n <= 0) break;
|
|
220
|
+
filled += n;
|
|
221
|
+
}
|
|
222
|
+
prefix = prefix.subarray(0, filled);
|
|
223
|
+
}
|
|
224
|
+
} finally {
|
|
225
|
+
closeSync(fd);
|
|
226
|
+
}
|
|
227
|
+
if (hasExistingThunk || !prefix) {
|
|
228
|
+
writeFileSync(file, finishSwiftAppModule(readFileSync(file)));
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const thunks = sdkImportThunks(prefix);
|
|
232
|
+
const nameBytes = Buffer.from(encodedName(NATIVE_SDK_THUNK_SECTION));
|
|
233
|
+
const header = Buffer.from([0, ...uleb(nameBytes.length + thunks.length)]);
|
|
234
|
+
appendFileSync(file, Buffer.concat([header, nameBytes, thunks]));
|
|
235
|
+
}
|
|
161
236
|
function swiftAppModuleInputs(tokens, buildRoot, sdkLibraries) {
|
|
162
237
|
const owned = (token) => path.resolve(token).startsWith(`${buildRoot}/`) && (!token.includes("/.peach-pruned-objs/") || token.endsWith("/swiftrt-patched.o"));
|
|
163
238
|
const inputs = [];
|
|
@@ -372,6 +447,7 @@ async function linkSwiftAppModule(options) {
|
|
|
372
447
|
"--unresolved-symbols=ignore-all",
|
|
373
448
|
"--import-undefined",
|
|
374
449
|
"--emit-relocs",
|
|
450
|
+
"--strip-debug",
|
|
375
451
|
"--gc-sections",
|
|
376
452
|
"--keep-section=target_features",
|
|
377
453
|
"--error-limit=0",
|
|
@@ -394,7 +470,16 @@ async function linkSwiftAppModule(options) {
|
|
|
394
470
|
const skipPasses = options.layoutMap ? ["duplicate-function-elimination"] : void 0;
|
|
395
471
|
const sdkTableEnd = sdk.sdkInterface.layout.tableEnd;
|
|
396
472
|
const { loweringCache } = options;
|
|
397
|
-
const loweringKey = loweringCache &&
|
|
473
|
+
const loweringKey = loweringCache && (typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(
|
|
474
|
+
JSON.stringify([
|
|
475
|
+
loweringCache.compilerDigest,
|
|
476
|
+
optimize,
|
|
477
|
+
skipPasses,
|
|
478
|
+
sdkTableEnd,
|
|
479
|
+
lazy,
|
|
480
|
+
KEEP_WASM_NAMES
|
|
481
|
+
])
|
|
482
|
+
).update(bytes).digest("hex") : createHash("sha256").update(
|
|
398
483
|
JSON.stringify([
|
|
399
484
|
loweringCache.compilerDigest,
|
|
400
485
|
optimize,
|
|
@@ -403,7 +488,7 @@ async function linkSwiftAppModule(options) {
|
|
|
403
488
|
lazy,
|
|
404
489
|
KEEP_WASM_NAMES
|
|
405
490
|
])
|
|
406
|
-
).update(bytes).digest("hex");
|
|
491
|
+
).update(bytes).digest("hex"));
|
|
407
492
|
return {
|
|
408
493
|
linkage,
|
|
409
494
|
async lower() {
|
|
@@ -1066,7 +1151,8 @@ function createSwiftSdkBinding(linkage, sdk, usage, projection) {
|
|
|
1066
1151
|
bindSwiftAppModule(linkage, sdk),
|
|
1067
1152
|
selectSwiftSdkData(sdk, usage, linkage, projection)
|
|
1068
1153
|
]);
|
|
1069
|
-
|
|
1154
|
+
const sha256 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : createHash("sha256").update(bytes).digest("hex");
|
|
1155
|
+
return { bytes, sha256 };
|
|
1070
1156
|
}
|
|
1071
1157
|
function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
|
|
1072
1158
|
const map = readWasmLinkMap(mapFile, false);
|
|
@@ -1622,6 +1708,7 @@ export {
|
|
|
1622
1708
|
readSwiftSdkUsage,
|
|
1623
1709
|
selectSwiftSdkData,
|
|
1624
1710
|
swiftAppModuleInputs,
|
|
1711
|
+
swiftAppModuleThunkSection,
|
|
1625
1712
|
swiftSdkProjectionSpans,
|
|
1626
1713
|
writeSwiftSdkAppLink
|
|
1627
1714
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
4
4
|
SWIFT_SDK_APP_TABLE_BASE,
|
|
@@ -15,21 +15,21 @@ import {
|
|
|
15
15
|
swiftSdkImageFile,
|
|
16
16
|
swiftSdkImageKey,
|
|
17
17
|
swiftSdkImageProducts
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-XONCLAVA.mjs";
|
|
19
|
+
import "./chunk-QNXV766K.mjs";
|
|
20
|
+
import "./chunk-YOD53JTM.mjs";
|
|
21
|
+
import "./chunk-CM2NU5MS.mjs";
|
|
22
|
+
import "./chunk-LCO2EXKF.mjs";
|
|
23
|
+
import "./chunk-HKPKCJI5.mjs";
|
|
24
|
+
import "./chunk-3XA5HYI5.mjs";
|
|
25
|
+
import "./chunk-IMI2NE4A.mjs";
|
|
26
|
+
import "./chunk-OLAYY7SG.mjs";
|
|
27
|
+
import "./chunk-N4ZJZUCO.mjs";
|
|
28
|
+
import "./chunk-QZ5HTMWV.mjs";
|
|
29
|
+
import "./chunk-265THLTP.mjs";
|
|
30
|
+
import "./chunk-LT533AHJ.mjs";
|
|
31
|
+
import "./chunk-AV7G5PTE.mjs";
|
|
32
|
+
import "./chunk-LD7Z3NDO.mjs";
|
|
33
33
|
export {
|
|
34
34
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
35
35
|
SWIFT_SDK_APP_TABLE_BASE,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2624 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
withSwiftRootLock
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YOD53JTM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
swiftCacheDir,
|
|
7
7
|
windowAdmission
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IMI2NE4A.mjs";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-AV7G5PTE.mjs";
|
|
12
|
+
import "./chunk-LD7Z3NDO.mjs";
|
|
13
13
|
|
|
14
14
|
// src/swift-sdk-image-producer.ts
|
|
15
15
|
import { execFile, execFileSync } from "node:child_process";
|