peachsim 0.1.2778 → 0.1.2779
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 +294 -480
- 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-RWBIRNWO.mjs → acorn-SCZ56W4Q.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-GSTHJQMW.mjs → chunk-6BNEOOBT.mjs} +114 -18
- package/dist-lib/esm-chunks/{chunk-KX7LV722.mjs → chunk-7VWBLM73.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IQSFMB4R.mjs → chunk-DX5V3733.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-KBYVKTVK.mjs → chunk-E56EZ3QT.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-EXU474NE.mjs → chunk-FNQXQNQK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3WQANOYY.mjs → chunk-H2V3ZZTO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5WASPTSS.mjs → chunk-H6JAFCAZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VZ3NXXUC.mjs → chunk-HMFIO57I.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6YHF4VYF.mjs → chunk-HWK2V6R4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LQVLXDRN.mjs → chunk-KAMO4C4X.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5TIUTQ55.mjs → chunk-KFDP4372.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-F3OPIKJC.mjs → chunk-KOULWLTF.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-DLBUPWTI.mjs → chunk-LVEDBGWX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-X25PQNNH.mjs → chunk-MJXJYVF5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QKTKE4OX.mjs → chunk-MK4VAM4G.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZWOS2EDN.mjs → chunk-Q6XMYYNV.mjs} +118 -361
- package/dist-lib/esm-chunks/{chunk-K3ULPN2R.mjs → chunk-SFTGQN5D.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KLA74B7J.mjs → chunk-SM5MJSQP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-G7UJ4BAC.mjs → chunk-SNMGOZXQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MRIDS3GE.mjs → chunk-SZI5IZ76.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-N2PEXZGL.mjs → chunk-T7DTXCV5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZDWMPXYI.mjs → chunk-UBM772FD.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QUVLFF6I.mjs → chunk-VJSHIZ7J.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3RPELUA2.mjs → chunk-Z42YJEC4.mjs} +6 -6
- package/dist-lib/esm-chunks/{metro-layout-parser-RRIZOLBE.mjs → metro-layout-parser-7S5M3EG6.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-EIZ7MCKR.mjs → swift-package-prebuilt-MJSFHIOP.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-S2LQ4OXD.mjs → swift-sdk-app-module-ZIN3LFLS.mjs} +47 -69
- package/dist-lib/esm-chunks/{swift-sdk-image-77FFUGXI.mjs → swift-sdk-image-MIWPBZEN.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-XFSFUXQJ.mjs → swift-sdk-image-producer-OTH543HF.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +294 -480
- 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 +300 -486
- package/dist-lib/host/fetch-proxy-handler.cjs +22 -11
- 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 +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- 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 +86 -86
- package/dist-lib/public-origins-lib.json +70 -70
- 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 +300 -486
- package/dist-lib/swift-compile.cjs +287 -465
- 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/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +15 -2
- package/dist-types/packages/peach-engine/src/render-worker/worklet-wire.d.ts +10 -1
- package/package.json +1 -1
- package/src/swift-compiler-digest.ts +1 -0
- package/src/swift-guest-dyld-functions.ts +1 -11
- package/src/swift-guest-dyld-table.ts +2 -9
- package/src/swift-guest-image-ledger.ts +9 -35
- package/src/swift-guest-source-inputs.ts +5 -22
- package/src/swift-icu.ts +15 -28
- package/src/swift-link-roots.ts +4 -8
- package/src/swift-sdk-app-module.ts +5 -27
- package/src/swift-sdk-image-wasm.ts +12 -41
- package/src/swift-shared-sdk.ts +1 -13
- package/src/swift-wasm-archive.ts +6 -11
- package/src/swift-wasm-prune.ts +22 -100
- package/src/wasm-binary-sections.ts +61 -7
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
LAUNCH_METADATA_KEYS,
|
|
4
4
|
LAUNCH_METADATA_KEYS_PATH
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MJXJYVF5.mjs";
|
|
6
6
|
import {
|
|
7
7
|
cacheDir,
|
|
8
8
|
parseSwiftDistributionLock,
|
|
9
9
|
readActiveRuntime,
|
|
10
10
|
runtimeDir
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6BNEOOBT.mjs";
|
|
12
12
|
import {
|
|
13
13
|
SWIFT_WASM_TRIPLE,
|
|
14
14
|
registerSwiftHostCompiler
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HWK2V6R4.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VJSHIZ7J.mjs";
|
|
19
19
|
|
|
20
20
|
// src/swift-distribution.ts
|
|
21
21
|
import { execFile as execFile2 } from "node:child_process";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
DARWIN_RECORDS_PREFIX,
|
|
4
4
|
KEEP_WASM_NAMES,
|
|
@@ -31,23 +31,23 @@ import {
|
|
|
31
31
|
swiftSdkImageScope,
|
|
32
32
|
unslottedFunctions,
|
|
33
33
|
wasmSections
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Q6XMYYNV.mjs";
|
|
35
35
|
import {
|
|
36
36
|
withSwiftRootLock,
|
|
37
37
|
withSwiftRootReadHolds
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-KOULWLTF.mjs";
|
|
39
39
|
import {
|
|
40
40
|
swiftDistributionAt,
|
|
41
41
|
swiftModuleDigest,
|
|
42
42
|
swiftModuleToolchain,
|
|
43
43
|
swiftSdkPaths
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6BNEOOBT.mjs";
|
|
45
45
|
import {
|
|
46
46
|
SWIFT_WASM_TRIPLE,
|
|
47
47
|
refreshSwiftCacheHold,
|
|
48
48
|
sourceSwiftCheckout,
|
|
49
49
|
swiftCacheDir
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-HWK2V6R4.mjs";
|
|
51
51
|
|
|
52
52
|
// src/swift-sdk-image.ts
|
|
53
53
|
import { execFile } from "node:child_process";
|
|
@@ -250,7 +250,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
|
|
|
250
250
|
if (existing) return existing;
|
|
251
251
|
const distribution = swiftDistributionAt(moduleRoot);
|
|
252
252
|
if (!options?.producer && !required.length && !distribution && path.resolve(moduleRoot) === sourceSwiftCheckout() && process.platform === "linux" && process.env.TM_SESSION) {
|
|
253
|
-
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-
|
|
253
|
+
const { produceSwiftSdkImage } = await import("./swift-sdk-image-producer-OTH543HF.mjs");
|
|
254
254
|
await produceSwiftSdkImage({
|
|
255
255
|
moduleRoot,
|
|
256
256
|
key,
|
package/dist-lib/esm-chunks/{metro-layout-parser-RRIZOLBE.mjs → metro-layout-parser-7S5M3EG6.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
2
|
-
import "./chunk-
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
import "./chunk-LVEDBGWX.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-SCZ56W4Q.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.2779 | (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-Q6XMYYNV.mjs";
|
|
8
|
+
import "./chunk-KOULWLTF.mjs";
|
|
9
9
|
import {
|
|
10
10
|
swiftDistributionAt,
|
|
11
11
|
swiftImportNames
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-6BNEOOBT.mjs";
|
|
13
|
+
import "./chunk-HWK2V6R4.mjs";
|
|
14
14
|
import {
|
|
15
15
|
SWIFT_REMOTE_PACKAGES_DIR
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UBM772FD.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-T7DTXCV5.mjs";
|
|
20
|
+
import "./chunk-H2V3ZZTO.mjs";
|
|
21
|
+
import "./chunk-SNMGOZXQ.mjs";
|
|
22
|
+
import "./chunk-HMFIO57I.mjs";
|
|
23
|
+
import "./chunk-VJSHIZ7J.mjs";
|
|
24
|
+
import "./chunk-LVEDBGWX.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-S2LQ4OXD.mjs → swift-sdk-app-module-ZIN3LFLS.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
4
4
|
SWIFT_SDK_MEMORY_BASE,
|
|
5
5
|
SWIFT_SDK_PIECE_FIELDS,
|
|
6
6
|
readSwiftSdkManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z42YJEC4.mjs";
|
|
8
8
|
import {
|
|
9
9
|
ADDEND_RELOCATIONS,
|
|
10
10
|
KEEP_WASM_NAMES,
|
|
@@ -36,22 +36,26 @@ import {
|
|
|
36
36
|
wasmReader,
|
|
37
37
|
wasmSections,
|
|
38
38
|
writeWasmCustomSection
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import
|
|
39
|
+
} from "./chunk-Q6XMYYNV.mjs";
|
|
40
|
+
import "./chunk-KOULWLTF.mjs";
|
|
41
|
+
import "./chunk-SZI5IZ76.mjs";
|
|
42
|
+
import "./chunk-MJXJYVF5.mjs";
|
|
43
|
+
import "./chunk-H6JAFCAZ.mjs";
|
|
44
|
+
import {
|
|
45
|
+
encodeWasmName,
|
|
46
|
+
encodeWasmNumber,
|
|
47
|
+
encodeWasmSigned
|
|
48
|
+
} from "./chunk-6BNEOOBT.mjs";
|
|
45
49
|
import {
|
|
46
50
|
SWIFT_WASM_TRIPLE
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-HWK2V6R4.mjs";
|
|
52
|
+
import "./chunk-UBM772FD.mjs";
|
|
53
|
+
import "./chunk-T7DTXCV5.mjs";
|
|
54
|
+
import "./chunk-H2V3ZZTO.mjs";
|
|
55
|
+
import "./chunk-SNMGOZXQ.mjs";
|
|
56
|
+
import "./chunk-HMFIO57I.mjs";
|
|
57
|
+
import "./chunk-VJSHIZ7J.mjs";
|
|
58
|
+
import "./chunk-LVEDBGWX.mjs";
|
|
55
59
|
|
|
56
60
|
// src/swift-sdk-app-module.ts
|
|
57
61
|
import { execFile } from "node:child_process";
|
|
@@ -232,8 +236,8 @@ function finishSwiftAppModuleFile(file) {
|
|
|
232
236
|
return;
|
|
233
237
|
}
|
|
234
238
|
const thunks = sdkImportThunks(prefix);
|
|
235
|
-
const nameBytes = Buffer.from(
|
|
236
|
-
const header = Buffer.from([0, ...
|
|
239
|
+
const nameBytes = Buffer.from(encodeWasmName(NATIVE_SDK_THUNK_SECTION));
|
|
240
|
+
const header = Buffer.from([0, ...encodeWasmNumber(nameBytes.length + thunks.length)]);
|
|
237
241
|
appendFileSync(file, Buffer.concat([header, nameBytes, thunks]));
|
|
238
242
|
}
|
|
239
243
|
function swiftAppModuleInputs(tokens, buildRoot, sdkLibraries) {
|
|
@@ -585,17 +589,17 @@ function sdkImportThunks(bytes) {
|
|
|
585
589
|
for (const { type } of imports)
|
|
586
590
|
if (!typeIndex.has(type)) typeIndex.set(type, typeIndex.size + 1);
|
|
587
591
|
const loaderType = [96, 1, 127, 0];
|
|
588
|
-
const vector = (items) => [...
|
|
589
|
-
const sectionBytes = (id, body) => [id, ...
|
|
592
|
+
const vector = (items) => [...encodeWasmNumber(items.length), ...items.flat()];
|
|
593
|
+
const sectionBytes = (id, body) => [id, ...encodeWasmNumber(body.length), ...body];
|
|
590
594
|
const slotGlobals = imports.map(({ slot }) => [
|
|
591
|
-
...
|
|
592
|
-
...
|
|
595
|
+
...encodeWasmName(NATIVE_SDK_IMPORT_MODULE),
|
|
596
|
+
...encodeWasmName(String(slot)),
|
|
593
597
|
3,
|
|
594
598
|
127,
|
|
595
599
|
0
|
|
596
600
|
]);
|
|
597
601
|
const bodies = imports.map(({ type }, index) => {
|
|
598
|
-
const slotValue = [35, ...
|
|
602
|
+
const slotValue = [35, ...encodeWasmNumber(index)];
|
|
599
603
|
const code = [
|
|
600
604
|
0,
|
|
601
605
|
...slotValue,
|
|
@@ -608,14 +612,14 @@ function sdkImportThunks(bytes) {
|
|
|
608
612
|
16,
|
|
609
613
|
0,
|
|
610
614
|
11,
|
|
611
|
-
...Array.from({ length: params[type] }, (_, i) => [32, ...
|
|
615
|
+
...Array.from({ length: params[type] }, (_, i) => [32, ...encodeWasmNumber(i)]).flat(),
|
|
612
616
|
...slotValue,
|
|
613
617
|
17,
|
|
614
|
-
...
|
|
618
|
+
...encodeWasmNumber(typeIndex.get(type)),
|
|
615
619
|
0,
|
|
616
620
|
11
|
|
617
621
|
];
|
|
618
|
-
return [...
|
|
622
|
+
return [...encodeWasmNumber(code.length), ...code];
|
|
619
623
|
});
|
|
620
624
|
return Uint8Array.from([
|
|
621
625
|
0,
|
|
@@ -633,21 +637,21 @@ function sdkImportThunks(bytes) {
|
|
|
633
637
|
...sectionBytes(
|
|
634
638
|
2,
|
|
635
639
|
vector([
|
|
636
|
-
[...
|
|
640
|
+
[...encodeWasmName("env"), ...encodeWasmName("__indirect_function_table"), 1, ...table],
|
|
637
641
|
[
|
|
638
|
-
...
|
|
639
|
-
...
|
|
642
|
+
...encodeWasmName(NATIVE_LAZY_IMPORT_MODULE),
|
|
643
|
+
...encodeWasmName(NATIVE_LAZY_SLOT_IMPORT),
|
|
640
644
|
0,
|
|
641
645
|
0
|
|
642
646
|
],
|
|
643
647
|
...slotGlobals
|
|
644
648
|
])
|
|
645
649
|
),
|
|
646
|
-
...sectionBytes(3, vector(imports.map(({ type }) =>
|
|
650
|
+
...sectionBytes(3, vector(imports.map(({ type }) => encodeWasmNumber(typeIndex.get(type))))),
|
|
647
651
|
...sectionBytes(
|
|
648
652
|
7,
|
|
649
653
|
vector(
|
|
650
|
-
imports.map(({ slot }, i) => [...
|
|
654
|
+
imports.map(({ slot }, i) => [...encodeWasmName(String(slot)), 0, ...encodeWasmNumber(i + 1)])
|
|
651
655
|
)
|
|
652
656
|
),
|
|
653
657
|
...sectionBytes(10, vector(bodies))
|
|
@@ -670,32 +674,6 @@ var TLS_SLEB64 = 25;
|
|
|
670
674
|
var SDK_TLS_HELPER = "__peach_sdk_tls.";
|
|
671
675
|
var SDK_TLS_DELTA = "__peach_sdk_tls_delta.";
|
|
672
676
|
var OBJC_SECTION_BOUNDARY = /^__(?:start|stop)_(__objc_(?:selectors|classes|class_refs|cats|protocols|protocol_refs|class_aliases|constant_string))$/;
|
|
673
|
-
var uleb = (value) => {
|
|
674
|
-
const out = [];
|
|
675
|
-
do {
|
|
676
|
-
let byte = value % 128;
|
|
677
|
-
value = Math.floor(value / 128);
|
|
678
|
-
if (value) byte |= 128;
|
|
679
|
-
out.push(byte);
|
|
680
|
-
} while (value);
|
|
681
|
-
return out;
|
|
682
|
-
};
|
|
683
|
-
var sleb = (value) => {
|
|
684
|
-
const out = [];
|
|
685
|
-
for (; ; ) {
|
|
686
|
-
const byte = Number(value & 127n);
|
|
687
|
-
value >>= 7n;
|
|
688
|
-
if (value === 0n && !(byte & 64) || value === -1n && byte & 64) {
|
|
689
|
-
out.push(byte);
|
|
690
|
-
return out;
|
|
691
|
-
}
|
|
692
|
-
out.push(byte | 128);
|
|
693
|
-
}
|
|
694
|
-
};
|
|
695
|
-
var encodedName = (name) => {
|
|
696
|
-
const bytes = [...Buffer.from(name)];
|
|
697
|
-
return [...uleb(bytes.length), ...bytes];
|
|
698
|
-
};
|
|
699
677
|
function resolveSdkReferences(source, sdk, forwarders) {
|
|
700
678
|
const bytes = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
701
679
|
const { data: sdkData, signatures } = sdk.sdkInterface;
|
|
@@ -810,7 +788,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
810
788
|
syntheticGlobals.push(type);
|
|
811
789
|
got.set(index, value);
|
|
812
790
|
}
|
|
813
|
-
return [35, ...
|
|
791
|
+
return [35, ...encodeWasmNumber(index)];
|
|
814
792
|
};
|
|
815
793
|
const tlsHelpers = new Map(
|
|
816
794
|
symbols.filter((symbol) => symbol.kind === 0 && symbol.name.startsWith(SDK_TLS_HELPER)).map((symbol) => [symbol.name.slice(SDK_TLS_HELPER.length), symbol.index])
|
|
@@ -862,7 +840,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
862
840
|
const code = [16];
|
|
863
841
|
for (let i = 0, rest = helper; i < 5; i++, rest >>>= 7)
|
|
864
842
|
code.push(i < 4 ? rest & 127 | 128 : rest & 127);
|
|
865
|
-
if (addend) code.push(66, ...
|
|
843
|
+
if (addend) code.push(66, ...encodeWasmSigned(addend), 124);
|
|
866
844
|
patchCode(at2, 11, code);
|
|
867
845
|
continue;
|
|
868
846
|
}
|
|
@@ -936,7 +914,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
936
914
|
syntheticGlobals.push(valueType);
|
|
937
915
|
scratchGlobals.set(valueType, scratch);
|
|
938
916
|
}
|
|
939
|
-
const index =
|
|
917
|
+
const index = encodeWasmNumber(scratch);
|
|
940
918
|
patchCode(at - 2, 12, [
|
|
941
919
|
36,
|
|
942
920
|
...index,
|
|
@@ -952,7 +930,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
952
930
|
}
|
|
953
931
|
const encodedNameBuf = (name) => {
|
|
954
932
|
const raw = Buffer.from(name, "utf8");
|
|
955
|
-
const len =
|
|
933
|
+
const len = encodeWasmNumber(raw.length);
|
|
956
934
|
const out = Buffer.allocUnsafe(len.length + raw.length);
|
|
957
935
|
for (let i = 0; i < len.length; i++) out[i] = len[i];
|
|
958
936
|
raw.copy(out, len.length);
|
|
@@ -997,7 +975,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
997
975
|
}
|
|
998
976
|
}
|
|
999
977
|
const globalParts = [
|
|
1000
|
-
Buffer.from(
|
|
978
|
+
Buffer.from(encodeWasmNumber(globalCount - 1 + syntheticGlobals.length))
|
|
1001
979
|
];
|
|
1002
980
|
for (let index = 0; index < globalCount; index++) {
|
|
1003
981
|
const start = gr.at;
|
|
@@ -1042,18 +1020,18 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
1042
1020
|
}
|
|
1043
1021
|
}
|
|
1044
1022
|
const exportParts = [
|
|
1045
|
-
Buffer.from(
|
|
1023
|
+
Buffer.from(encodeWasmNumber(exportCount + 1 + got.size)),
|
|
1046
1024
|
bytes.subarray(originalExportsStart, exportSection.end)
|
|
1047
1025
|
];
|
|
1048
1026
|
for (const [index, value] of got) {
|
|
1049
1027
|
exportParts.push(
|
|
1050
1028
|
encodedNameBuf(`${NATIVE_SDK_GLOBAL_PREFIX}${value}.${index}`),
|
|
1051
|
-
Buffer.from([3, ...
|
|
1029
|
+
Buffer.from([3, ...encodeWasmNumber(index)])
|
|
1052
1030
|
);
|
|
1053
1031
|
}
|
|
1054
1032
|
exportParts.push(encodedNameBuf("__indirect_function_table"), Buffer.from([1, 0]));
|
|
1055
1033
|
const replaced = /* @__PURE__ */ new Map([
|
|
1056
|
-
[2, Buffer.concat([Buffer.from(
|
|
1034
|
+
[2, Buffer.concat([Buffer.from(encodeWasmNumber(importEntryCount)), ...importParts])],
|
|
1057
1035
|
[6, Buffer.concat(globalParts)],
|
|
1058
1036
|
[7, Buffer.concat(exportParts)]
|
|
1059
1037
|
]);
|
|
@@ -1070,7 +1048,7 @@ function resolveSdkReferences(source, sdk, forwarders) {
|
|
|
1070
1048
|
if (s.id === 10 && rebuiltCode) {
|
|
1071
1049
|
parts.push(rebuiltCode);
|
|
1072
1050
|
} else if (payload) {
|
|
1073
|
-
parts.push(Buffer.from([s.id, ...
|
|
1051
|
+
parts.push(Buffer.from([s.id, ...encodeWasmNumber(payload.length)]), payload);
|
|
1074
1052
|
} else {
|
|
1075
1053
|
parts.push(bytes.subarray(s.offset, s.end));
|
|
1076
1054
|
}
|
|
@@ -1086,7 +1064,7 @@ function expandSdkRelocations(bytes, section, patches) {
|
|
|
1086
1064
|
patches.sort((a, b) => a.at - b.at);
|
|
1087
1065
|
const r = wasmReader(bytes, section.start);
|
|
1088
1066
|
const count = r.u();
|
|
1089
|
-
const payload = [Uint8Array.from(
|
|
1067
|
+
const payload = [Uint8Array.from(encodeWasmNumber(count))];
|
|
1090
1068
|
let next = 0;
|
|
1091
1069
|
for (let i = 0; i < count; i++) {
|
|
1092
1070
|
const start = r.at;
|
|
@@ -1106,7 +1084,7 @@ function expandSdkRelocations(bytes, section, patches) {
|
|
|
1106
1084
|
}
|
|
1107
1085
|
parts.push(bytes.subarray(at, end));
|
|
1108
1086
|
payload.push(
|
|
1109
|
-
Uint8Array.from(
|
|
1087
|
+
Uint8Array.from(encodeWasmNumber(parts.reduce((size2, part) => size2 + part.length, 0))),
|
|
1110
1088
|
...parts
|
|
1111
1089
|
);
|
|
1112
1090
|
}
|
|
@@ -1115,7 +1093,7 @@ function expandSdkRelocations(bytes, section, patches) {
|
|
|
1115
1093
|
if (next !== patches.length || r.at !== section.end)
|
|
1116
1094
|
throw new Error("Swift SDK code relocations exceed the code section");
|
|
1117
1095
|
return Buffer.concat([
|
|
1118
|
-
Uint8Array.from([10, ...
|
|
1096
|
+
Uint8Array.from([10, ...encodeWasmNumber(payload.reduce((size, part) => size + part.length, 0))]),
|
|
1119
1097
|
...payload
|
|
1120
1098
|
]);
|
|
1121
1099
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
4
4
|
SWIFT_SDK_IMAGE_BUNDLE,
|
|
@@ -13,21 +13,21 @@ import {
|
|
|
13
13
|
swiftSdkImageFile,
|
|
14
14
|
swiftSdkImageKey,
|
|
15
15
|
swiftSdkImageProducts
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./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-
|
|
16
|
+
} from "./chunk-Z42YJEC4.mjs";
|
|
17
|
+
import "./chunk-Q6XMYYNV.mjs";
|
|
18
|
+
import "./chunk-KOULWLTF.mjs";
|
|
19
|
+
import "./chunk-SZI5IZ76.mjs";
|
|
20
|
+
import "./chunk-MJXJYVF5.mjs";
|
|
21
|
+
import "./chunk-H6JAFCAZ.mjs";
|
|
22
|
+
import "./chunk-6BNEOOBT.mjs";
|
|
23
|
+
import "./chunk-HWK2V6R4.mjs";
|
|
24
|
+
import "./chunk-UBM772FD.mjs";
|
|
25
|
+
import "./chunk-T7DTXCV5.mjs";
|
|
26
|
+
import "./chunk-H2V3ZZTO.mjs";
|
|
27
|
+
import "./chunk-SNMGOZXQ.mjs";
|
|
28
|
+
import "./chunk-HMFIO57I.mjs";
|
|
29
|
+
import "./chunk-VJSHIZ7J.mjs";
|
|
30
|
+
import "./chunk-LVEDBGWX.mjs";
|
|
31
31
|
export {
|
|
32
32
|
SWIFT_SDK_APP_MEMORY_BASE,
|
|
33
33
|
SWIFT_SDK_IMAGE_BUNDLE,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2779 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
withSwiftRootLock
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KOULWLTF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
swiftCacheDir,
|
|
7
7
|
windowAdmission
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HWK2V6R4.mjs";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-VJSHIZ7J.mjs";
|
|
12
|
+
import "./chunk-LVEDBGWX.mjs";
|
|
13
13
|
|
|
14
14
|
// src/swift-sdk-image-producer.ts
|
|
15
15
|
import { execFile, execFileSync } from "node:child_process";
|