peachsim 0.1.2738 → 0.1.2743
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 +310 -185
- 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-Q6ATHJ5Q.mjs → acorn-4LW63VJO.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-WCK2HANP.mjs → chunk-23OQSLRP.mjs} +289 -182
- package/dist-lib/esm-chunks/{chunk-PKLW5P4C.mjs → chunk-2HP5FPCA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V3CW4EN6.mjs → chunk-6FHNPTCA.mjs} +13 -7
- package/dist-lib/esm-chunks/{chunk-7JFDXIZQ.mjs → chunk-7NBU6OXB.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-5NOBLXKV.mjs → chunk-B3F4HKM6.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-3FBJGWPT.mjs → chunk-BJSA6VP6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YMCYBEB7.mjs → chunk-BNJ5YG7V.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-BQW3EWAQ.mjs → chunk-BQUYNIMY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-EU6UNSUW.mjs → chunk-BW3KZJV5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YU4ISPGO.mjs → chunk-EAAYQS4L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZXORDMAT.mjs → chunk-EES2SLJK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XJDM6LFX.mjs → chunk-GIZQHA6L.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-ONFP5RP7.mjs → chunk-HOUFNDEV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3CPES2EZ.mjs → chunk-JHOZWSFF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NMGEJJ2J.mjs → chunk-LVCSLWR2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GI5VVEKN.mjs → chunk-OEQBNK6V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-P72RUOTY.mjs → chunk-SG7MN2KW.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-6Q3JLKPD.mjs → chunk-THJMTM3L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KDIDYS42.mjs → chunk-THSR72MV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HLWFKLLD.mjs → chunk-V3SRJIBE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TBX7JBPC.mjs → chunk-VJKLZAU2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JDLZMI2L.mjs → chunk-WKGJ6LAU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2FSMFZ42.mjs → chunk-XP5F6PNN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2EW5XIGF.mjs → chunk-ZLQX4SVV.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-R2UJPOJL.mjs → metro-layout-parser-L57PU3TD.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-W34QYBXU.mjs → swift-package-prebuilt-UNXWJN7B.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-RO5AZPWM.mjs → swift-sdk-app-module-DZV3XYCP.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-CWTI76JI.mjs → swift-sdk-image-WRYMP64Z.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-JGTU2ZCE.mjs → swift-sdk-image-producer-D6DOCCCR.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +310 -185
- 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 +3782 -1684
- package/dist-lib/host/fetch-proxy-handler.cjs +41 -10
- 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 +88 -86
- package/dist-lib/public-origins-lib.json +86 -72
- 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 +4213 -2115
- package/dist-lib/swift-compile.cjs +303 -178
- 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/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/effects-shader-registry.d.ts +2 -12
- package/dist-types/packages/peach-engine/src/engine/native-font-dataContract.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/native-style-store.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-native-binding.d.ts +0 -1
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +17 -1
- package/package.json +1 -1
- package/src/one-direct-host-source.ts +254 -0
- package/src/one-native-controls-package.ts +99 -21
- package/src/swift-compile.ts +145 -120
- package/src/swift-sdk-image-map.ts +35 -0
- package/src/swift-sdk-image.ts +12 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2743 | (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;
|
|
@@ -19556,7 +19556,7 @@ var init_react_native_core_digest = __esm({
|
|
|
19556
19556
|
|
|
19557
19557
|
// src/swift-compiler-digest.ts
|
|
19558
19558
|
function swiftArchiveCompilerDigestValue() {
|
|
19559
|
-
return true ? "
|
|
19559
|
+
return true ? "e036567f599b9df239e4332b34b546043c5d1c41996348475482e91ed8b42366" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
19560
19560
|
}
|
|
19561
19561
|
var import_node_crypto16, import_node_fs32, import_node_path31, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
19562
19562
|
var init_swift_compiler_digest = __esm({
|
|
@@ -19707,7 +19707,7 @@ var init_swift_standin_digest = __esm({
|
|
|
19707
19707
|
|
|
19708
19708
|
// src/expo-native-compiler-digest.ts
|
|
19709
19709
|
function expoNativeCompilerDigestValue() {
|
|
19710
|
-
return true ? "
|
|
19710
|
+
return true ? "5e0423a14cd4a805f390c706e22f3074ba5a6fccf294d23bf6702b83379bff79" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
19711
19711
|
}
|
|
19712
19712
|
var import_node_crypto18;
|
|
19713
19713
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -24483,6 +24483,27 @@ var init_swift_resource_class_names = __esm({
|
|
|
24483
24483
|
}
|
|
24484
24484
|
});
|
|
24485
24485
|
|
|
24486
|
+
// ../peach-kit/src/guest-engine-services.ts
|
|
24487
|
+
var PEACH_GUEST_SERVICE_MODULE, PEACH_GUEST_SERVICE_PREFIX, peachGuestServiceNames, peachGuestServiceSymbols, peachGuestServiceAllowlist;
|
|
24488
|
+
var init_guest_engine_services = __esm({
|
|
24489
|
+
"../peach-kit/src/guest-engine-services.ts"() {
|
|
24490
|
+
"use strict";
|
|
24491
|
+
PEACH_GUEST_SERVICE_MODULE = "peach_guest_services";
|
|
24492
|
+
PEACH_GUEST_SERVICE_PREFIX = "peach_guest_service_";
|
|
24493
|
+
peachGuestServiceNames = [
|
|
24494
|
+
"peach_app_config_resolve",
|
|
24495
|
+
"peach_audio_host_request",
|
|
24496
|
+
"peach_site_origin",
|
|
24497
|
+
"services_request",
|
|
24498
|
+
"services_storage_error"
|
|
24499
|
+
];
|
|
24500
|
+
peachGuestServiceSymbols = peachGuestServiceNames.map(
|
|
24501
|
+
(name3) => PEACH_GUEST_SERVICE_PREFIX + name3
|
|
24502
|
+
);
|
|
24503
|
+
peachGuestServiceAllowlist = peachGuestServiceSymbols.join("\n") + "\n";
|
|
24504
|
+
}
|
|
24505
|
+
});
|
|
24506
|
+
|
|
24486
24507
|
// src/swift-guest-linked-spans.ts
|
|
24487
24508
|
function number(bytes, start) {
|
|
24488
24509
|
let value = 0;
|
|
@@ -25242,7 +25263,146 @@ var init_swift_guest_linked_spans = __esm({
|
|
|
25242
25263
|
}
|
|
25243
25264
|
});
|
|
25244
25265
|
|
|
25266
|
+
// src/wasm-binary-sections.ts
|
|
25267
|
+
function encodeWasmNumber(value) {
|
|
25268
|
+
const bytes = [];
|
|
25269
|
+
for (let rest = value; ; ) {
|
|
25270
|
+
const byte = rest % 128;
|
|
25271
|
+
rest = Math.floor(rest / 128);
|
|
25272
|
+
if (rest === 0) return [...bytes, byte];
|
|
25273
|
+
bytes.push(byte | 128);
|
|
25274
|
+
}
|
|
25275
|
+
}
|
|
25276
|
+
function encodeWasmName(name3) {
|
|
25277
|
+
const bytes = new TextEncoder().encode(name3);
|
|
25278
|
+
return [...encodeWasmNumber(bytes.length), ...bytes];
|
|
25279
|
+
}
|
|
25280
|
+
function readWasmSection(bytes, start, end) {
|
|
25281
|
+
let at = start;
|
|
25282
|
+
const number3 = () => {
|
|
25283
|
+
let value = 0;
|
|
25284
|
+
for (let shift = 0; ; shift += 7) {
|
|
25285
|
+
if (at >= end || shift > 63) throw new Error("invalid wasm integer");
|
|
25286
|
+
const byte = bytes[at++];
|
|
25287
|
+
value += (byte & 127) * 2 ** shift;
|
|
25288
|
+
if (!(byte & 128)) return value;
|
|
25289
|
+
}
|
|
25290
|
+
};
|
|
25291
|
+
return {
|
|
25292
|
+
number: number3,
|
|
25293
|
+
byte: () => {
|
|
25294
|
+
if (at >= end) throw new Error("truncated wasm section");
|
|
25295
|
+
return bytes[at++];
|
|
25296
|
+
},
|
|
25297
|
+
name: () => {
|
|
25298
|
+
const length = number3();
|
|
25299
|
+
at += length;
|
|
25300
|
+
if (at > end) throw new Error("truncated wasm name");
|
|
25301
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset + at - length, length).toString();
|
|
25302
|
+
},
|
|
25303
|
+
position: () => at,
|
|
25304
|
+
done: () => at === end
|
|
25305
|
+
};
|
|
25306
|
+
}
|
|
25307
|
+
function wasmSections(bytes) {
|
|
25308
|
+
if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
|
|
25309
|
+
throw new Error("not a wasm module");
|
|
25310
|
+
const found = [];
|
|
25311
|
+
for (let at = 8; at < bytes.length; ) {
|
|
25312
|
+
const header = readWasmSection(bytes, at, bytes.length);
|
|
25313
|
+
const id = header.byte();
|
|
25314
|
+
const size2 = header.number();
|
|
25315
|
+
const start = header.position();
|
|
25316
|
+
if (start + size2 > bytes.length) throw new Error("truncated wasm section");
|
|
25317
|
+
found.push({ id, offset: at, start, end: start + size2 });
|
|
25318
|
+
at = start + size2;
|
|
25319
|
+
}
|
|
25320
|
+
return found;
|
|
25321
|
+
}
|
|
25322
|
+
var init_wasm_binary_sections = __esm({
|
|
25323
|
+
"src/wasm-binary-sections.ts"() {
|
|
25324
|
+
"use strict";
|
|
25325
|
+
}
|
|
25326
|
+
});
|
|
25327
|
+
|
|
25328
|
+
// src/wasm-imports.ts
|
|
25329
|
+
function readWasmImports(bytes, section2, visit3) {
|
|
25330
|
+
const input = readWasmSection(bytes, section2.start, section2.end);
|
|
25331
|
+
const count = input.number();
|
|
25332
|
+
const valueType = () => {
|
|
25333
|
+
const first = input.byte();
|
|
25334
|
+
if (first === 99 || first === 100) input.number();
|
|
25335
|
+
};
|
|
25336
|
+
const limits = () => {
|
|
25337
|
+
const flags = input.number();
|
|
25338
|
+
input.number();
|
|
25339
|
+
if (flags & 1) input.number();
|
|
25340
|
+
if (flags & 8) input.number();
|
|
25341
|
+
};
|
|
25342
|
+
for (let index = 0; index < count; index++) {
|
|
25343
|
+
const start = input.position();
|
|
25344
|
+
const module2 = input.name();
|
|
25345
|
+
const name3 = input.name();
|
|
25346
|
+
const type = input.position();
|
|
25347
|
+
const kind = input.byte();
|
|
25348
|
+
switch (kind) {
|
|
25349
|
+
case 0:
|
|
25350
|
+
input.number();
|
|
25351
|
+
break;
|
|
25352
|
+
case 1:
|
|
25353
|
+
valueType();
|
|
25354
|
+
limits();
|
|
25355
|
+
break;
|
|
25356
|
+
case 2:
|
|
25357
|
+
limits();
|
|
25358
|
+
break;
|
|
25359
|
+
case 3:
|
|
25360
|
+
valueType();
|
|
25361
|
+
input.byte();
|
|
25362
|
+
break;
|
|
25363
|
+
case 4:
|
|
25364
|
+
input.byte();
|
|
25365
|
+
input.number();
|
|
25366
|
+
break;
|
|
25367
|
+
default:
|
|
25368
|
+
throw new Error(`unsupported Wasm import kind ${kind}`);
|
|
25369
|
+
}
|
|
25370
|
+
visit3({ module: module2, name: name3, kind, start, type, end: input.position() });
|
|
25371
|
+
}
|
|
25372
|
+
if (!input.done()) throw new Error("invalid Wasm imports");
|
|
25373
|
+
return count;
|
|
25374
|
+
}
|
|
25375
|
+
var init_wasm_imports = __esm({
|
|
25376
|
+
"src/wasm-imports.ts"() {
|
|
25377
|
+
"use strict";
|
|
25378
|
+
init_wasm_binary_sections();
|
|
25379
|
+
}
|
|
25380
|
+
});
|
|
25381
|
+
|
|
25245
25382
|
// src/swift-sdk-image-map.ts
|
|
25383
|
+
function assertPeachGuestEngineLink(map2, linked) {
|
|
25384
|
+
const guestSymbol = /^peach_guest_(sdk|removed|service)_/;
|
|
25385
|
+
const unresolved = /* @__PURE__ */ new Set();
|
|
25386
|
+
for (const chunk of map2.code) {
|
|
25387
|
+
if (chunk.inputFile !== "<internal>" || chunk.section !== "undefined_stub") continue;
|
|
25388
|
+
for (const { name: name3 } of chunk.symbols) if (guestSymbol.test(name3)) unresolved.add(name3);
|
|
25389
|
+
}
|
|
25390
|
+
if (unresolved.size)
|
|
25391
|
+
throw new Error(
|
|
25392
|
+
`unresolved PeachEngine calls in the Swift SDK:
|
|
25393
|
+
${[...unresolved].sort().join("\n")}`
|
|
25394
|
+
);
|
|
25395
|
+
const imports2 = wasmSections(linked).find((section2) => section2.id === 2);
|
|
25396
|
+
if (imports2)
|
|
25397
|
+
readWasmImports(linked, imports2, ({ kind, module: module2, name: name3 }) => {
|
|
25398
|
+
if (module2 !== PEACH_GUEST_SERVICE_MODULE && !guestSymbol.test(name3)) return;
|
|
25399
|
+
if (kind === 0 && module2 === PEACH_GUEST_SERVICE_MODULE && peachGuestServiceSymbols.includes(name3))
|
|
25400
|
+
return;
|
|
25401
|
+
throw new Error(
|
|
25402
|
+
`unexpected PeachEngine host import in the Swift SDK: ${module2}.${name3}`
|
|
25403
|
+
);
|
|
25404
|
+
});
|
|
25405
|
+
}
|
|
25246
25406
|
function isHexChar(code) {
|
|
25247
25407
|
return code >= 48 && code <= 57 || code >= 97 && code <= 102;
|
|
25248
25408
|
}
|
|
@@ -25411,7 +25571,10 @@ var init_swift_sdk_image_map = __esm({
|
|
|
25411
25571
|
"src/swift-sdk-image-map.ts"() {
|
|
25412
25572
|
"use strict";
|
|
25413
25573
|
import_node_path43 = require("node:path");
|
|
25574
|
+
init_guest_engine_services();
|
|
25414
25575
|
init_swift_guest_linked_spans();
|
|
25576
|
+
init_wasm_binary_sections();
|
|
25577
|
+
init_wasm_imports();
|
|
25415
25578
|
PARTITIONED = [
|
|
25416
25579
|
".rodata",
|
|
25417
25580
|
".data",
|
|
@@ -25484,7 +25647,7 @@ function wasmReader(bytes, start) {
|
|
|
25484
25647
|
}
|
|
25485
25648
|
};
|
|
25486
25649
|
}
|
|
25487
|
-
function
|
|
25650
|
+
function wasmSections2(bytes) {
|
|
25488
25651
|
const out = [];
|
|
25489
25652
|
for (let at = 8; at < bytes.length; ) {
|
|
25490
25653
|
const r = wasmReader(bytes, at);
|
|
@@ -25577,7 +25740,7 @@ function* readFunctionNames(bytes, names) {
|
|
|
25577
25740
|
}
|
|
25578
25741
|
}
|
|
25579
25742
|
function orderObjCConstructors(bytes) {
|
|
25580
|
-
const sections =
|
|
25743
|
+
const sections = wasmSections2(bytes);
|
|
25581
25744
|
const names = sections.find((s) => s.name === "name");
|
|
25582
25745
|
if (!names) return bytes;
|
|
25583
25746
|
let constructors;
|
|
@@ -25625,7 +25788,7 @@ function orderObjCConstructors(bytes) {
|
|
|
25625
25788
|
return ordered;
|
|
25626
25789
|
}
|
|
25627
25790
|
function readModule(bytes) {
|
|
25628
|
-
const sections =
|
|
25791
|
+
const sections = wasmSections2(bytes);
|
|
25629
25792
|
const get = (id) => sections.find((s) => s.id === id);
|
|
25630
25793
|
const types2 = [];
|
|
25631
25794
|
const typeSection = get(1);
|
|
@@ -25829,7 +25992,7 @@ function finishSdkImage(bytes, hostExports, libraries, guestMap) {
|
|
|
25829
25992
|
return { image: Buffer.concat(parts), sdkInterface, functionSlots };
|
|
25830
25993
|
}
|
|
25831
25994
|
function passiveSegments(bytes) {
|
|
25832
|
-
const data =
|
|
25995
|
+
const data = wasmSections2(bytes).find((s) => s.id === 11);
|
|
25833
25996
|
if (!data) throw new Error("sdk image has no data section");
|
|
25834
25997
|
const r = wasmReader(bytes, data.start);
|
|
25835
25998
|
const out = [];
|
|
@@ -25934,7 +26097,7 @@ function codeOnlySdkImage(bytes, constructorMask) {
|
|
|
25934
26097
|
function constructorKeys(map2, bytes) {
|
|
25935
26098
|
const first = map2.code[0];
|
|
25936
26099
|
if (!first) throw new Error("link has no code");
|
|
25937
|
-
const sections =
|
|
26100
|
+
const sections = wasmSections2(bytes);
|
|
25938
26101
|
const code = sections.find((s) => s.id === 10);
|
|
25939
26102
|
if (!code) throw new Error("link has no code");
|
|
25940
26103
|
const ctors = map2.code.find((chunk) => chunk.section === "__wasm_call_ctors");
|
|
@@ -26006,7 +26169,7 @@ function constructorKeys(map2, bytes) {
|
|
|
26006
26169
|
return keys;
|
|
26007
26170
|
}
|
|
26008
26171
|
function relocationEdges(bytes, segmentAddress) {
|
|
26009
|
-
const sections =
|
|
26172
|
+
const sections = wasmSections2(bytes);
|
|
26010
26173
|
const linking = sections.find((s) => s.name === "linking");
|
|
26011
26174
|
if (!linking) throw new Error("relocation link has no linking section");
|
|
26012
26175
|
let symKind = new Uint8Array(0);
|
|
@@ -26174,7 +26337,7 @@ function relocationEdges(bytes, segmentAddress) {
|
|
|
26174
26337
|
return { data, code, dataFunctions, calls };
|
|
26175
26338
|
}
|
|
26176
26339
|
function strongDefinitions(bytes) {
|
|
26177
|
-
const linking =
|
|
26340
|
+
const linking = wasmSections2(bytes).find((s) => s.name === "linking");
|
|
26178
26341
|
if (!linking) return [];
|
|
26179
26342
|
const r = wasmReader(bytes, linking.start);
|
|
26180
26343
|
r.u();
|
|
@@ -26217,7 +26380,7 @@ function strongDefinitions(bytes) {
|
|
|
26217
26380
|
).map((s) => s.name);
|
|
26218
26381
|
}
|
|
26219
26382
|
function unslottedFunctions(bytes) {
|
|
26220
|
-
const sections =
|
|
26383
|
+
const sections = wasmSections2(bytes);
|
|
26221
26384
|
const importedFuncs = countImportedFunctions(
|
|
26222
26385
|
bytes,
|
|
26223
26386
|
sections.find((s) => s.id === 2)
|
|
@@ -30523,71 +30686,9 @@ var init_swift_guest_image_ledger = __esm({
|
|
|
30523
30686
|
}
|
|
30524
30687
|
});
|
|
30525
30688
|
|
|
30526
|
-
// src/wasm-binary-sections.ts
|
|
30527
|
-
function encodeWasmNumber(value) {
|
|
30528
|
-
const bytes = [];
|
|
30529
|
-
for (let rest = value; ; ) {
|
|
30530
|
-
const byte = rest % 128;
|
|
30531
|
-
rest = Math.floor(rest / 128);
|
|
30532
|
-
if (rest === 0) return [...bytes, byte];
|
|
30533
|
-
bytes.push(byte | 128);
|
|
30534
|
-
}
|
|
30535
|
-
}
|
|
30536
|
-
function encodeWasmName(name3) {
|
|
30537
|
-
const bytes = new TextEncoder().encode(name3);
|
|
30538
|
-
return [...encodeWasmNumber(bytes.length), ...bytes];
|
|
30539
|
-
}
|
|
30540
|
-
function readWasmSection(bytes, start, end) {
|
|
30541
|
-
let at = start;
|
|
30542
|
-
const number3 = () => {
|
|
30543
|
-
let value = 0;
|
|
30544
|
-
for (let shift = 0; ; shift += 7) {
|
|
30545
|
-
if (at >= end || shift > 63) throw new Error("invalid wasm integer");
|
|
30546
|
-
const byte = bytes[at++];
|
|
30547
|
-
value += (byte & 127) * 2 ** shift;
|
|
30548
|
-
if (!(byte & 128)) return value;
|
|
30549
|
-
}
|
|
30550
|
-
};
|
|
30551
|
-
return {
|
|
30552
|
-
number: number3,
|
|
30553
|
-
byte: () => {
|
|
30554
|
-
if (at >= end) throw new Error("truncated wasm section");
|
|
30555
|
-
return bytes[at++];
|
|
30556
|
-
},
|
|
30557
|
-
name: () => {
|
|
30558
|
-
const length = number3();
|
|
30559
|
-
at += length;
|
|
30560
|
-
if (at > end) throw new Error("truncated wasm name");
|
|
30561
|
-
return Buffer.from(bytes.buffer, bytes.byteOffset + at - length, length).toString();
|
|
30562
|
-
},
|
|
30563
|
-
position: () => at,
|
|
30564
|
-
done: () => at === end
|
|
30565
|
-
};
|
|
30566
|
-
}
|
|
30567
|
-
function wasmSections2(bytes) {
|
|
30568
|
-
if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
|
|
30569
|
-
throw new Error("not a wasm module");
|
|
30570
|
-
const found = [];
|
|
30571
|
-
for (let at = 8; at < bytes.length; ) {
|
|
30572
|
-
const header = readWasmSection(bytes, at, bytes.length);
|
|
30573
|
-
const id = header.byte();
|
|
30574
|
-
const size2 = header.number();
|
|
30575
|
-
const start = header.position();
|
|
30576
|
-
if (start + size2 > bytes.length) throw new Error("truncated wasm section");
|
|
30577
|
-
found.push({ id, offset: at, start, end: start + size2 });
|
|
30578
|
-
at = start + size2;
|
|
30579
|
-
}
|
|
30580
|
-
return found;
|
|
30581
|
-
}
|
|
30582
|
-
var init_wasm_binary_sections = __esm({
|
|
30583
|
-
"src/wasm-binary-sections.ts"() {
|
|
30584
|
-
"use strict";
|
|
30585
|
-
}
|
|
30586
|
-
});
|
|
30587
|
-
|
|
30588
30689
|
// src/wasm-narrow-boundary.ts
|
|
30589
30690
|
function readWasmCustomSection(bytes, name3) {
|
|
30590
|
-
for (const { id, start, end } of
|
|
30691
|
+
for (const { id, start, end } of wasmSections(bytes)) {
|
|
30591
30692
|
if (id !== 0) continue;
|
|
30592
30693
|
const contents2 = readWasmSection(bytes, start, end);
|
|
30593
30694
|
if (contents2.name() === name3) return bytes.subarray(contents2.position(), end);
|
|
@@ -30596,7 +30697,7 @@ function readWasmCustomSection(bytes, name3) {
|
|
|
30596
30697
|
}
|
|
30597
30698
|
function dropWasmCustomSection(bytes, name3) {
|
|
30598
30699
|
const parts = [bytes.subarray(0, 8)];
|
|
30599
|
-
for (const { id, offset, start, end } of
|
|
30700
|
+
for (const { id, offset, start, end } of wasmSections(bytes)) {
|
|
30600
30701
|
if (id === 0 && readWasmSection(bytes, start, end).name() === name3) continue;
|
|
30601
30702
|
parts.push(bytes.subarray(offset, end));
|
|
30602
30703
|
}
|
|
@@ -30608,7 +30709,7 @@ function writeWasmCustomSections(bytes, entries2) {
|
|
|
30608
30709
|
const parts = [];
|
|
30609
30710
|
let sliceStart = 0;
|
|
30610
30711
|
let sliceEnd = 8;
|
|
30611
|
-
for (const { id, start, end } of
|
|
30712
|
+
for (const { id, start, end } of wasmSections(bytes)) {
|
|
30612
30713
|
if (id === 0 && replaced.has(readWasmSection(bytes, start, end).name())) {
|
|
30613
30714
|
if (sliceEnd > sliceStart) parts.push(bytes.subarray(sliceStart, sliceEnd));
|
|
30614
30715
|
sliceStart = end;
|
|
@@ -30632,7 +30733,7 @@ function writeWasmCustomSection(bytes, name3, data) {
|
|
|
30632
30733
|
return writeWasmCustomSections(bytes, [[name3, data]]);
|
|
30633
30734
|
}
|
|
30634
30735
|
function readWasmMemory(bytes) {
|
|
30635
|
-
return readWasmMemoryAndTableImports(bytes,
|
|
30736
|
+
return readWasmMemoryAndTableImports(bytes, wasmSections(bytes)).memory;
|
|
30636
30737
|
}
|
|
30637
30738
|
function readWasmMemoryAndTableImports(bytes, layout2) {
|
|
30638
30739
|
let memory;
|
|
@@ -30693,7 +30794,7 @@ function withSections(bytes, layout2, replacements) {
|
|
|
30693
30794
|
return Buffer.concat(parts);
|
|
30694
30795
|
}
|
|
30695
30796
|
function narrowWasmBoundary(bytes, wideExports) {
|
|
30696
|
-
const layout2 =
|
|
30797
|
+
const layout2 = wasmSections(bytes);
|
|
30697
30798
|
const section2 = (id) => {
|
|
30698
30799
|
const found = layout2.find((entry) => entry.id === id);
|
|
30699
30800
|
return found && readWasmSection(bytes, found.start, found.end);
|
|
@@ -30819,7 +30920,7 @@ ${[...imports2, ...functions].join("\n")}
|
|
|
30819
30920
|
};
|
|
30820
30921
|
}
|
|
30821
30922
|
function dropBoundaryExports(bytes) {
|
|
30822
|
-
const layout2 =
|
|
30923
|
+
const layout2 = wasmSections(bytes);
|
|
30823
30924
|
const found = layout2.find((entry) => entry.id === 7);
|
|
30824
30925
|
if (!found) throw new Error("merged module has no exports");
|
|
30825
30926
|
const exportSection = readWasmSection(bytes, found.start, found.end);
|
|
@@ -30838,7 +30939,7 @@ function dropBoundaryExports(bytes) {
|
|
|
30838
30939
|
);
|
|
30839
30940
|
}
|
|
30840
30941
|
function withWasmTableMinimum(bytes, minimum) {
|
|
30841
|
-
const layout2 =
|
|
30942
|
+
const layout2 = wasmSections(bytes);
|
|
30842
30943
|
const table = layout2.find(({ id }) => id === 4);
|
|
30843
30944
|
if (!table) {
|
|
30844
30945
|
if (readWasmMemoryAndTableImports(bytes, layout2).tableImports === 1) return bytes;
|
|
@@ -31135,7 +31236,7 @@ function entries(bytes, section2, entry) {
|
|
|
31135
31236
|
return out;
|
|
31136
31237
|
}
|
|
31137
31238
|
function appendLazyPlacement(bytes, functions, table) {
|
|
31138
|
-
const sections =
|
|
31239
|
+
const sections = wasmSections2(bytes);
|
|
31139
31240
|
const section2 = (id) => sections.find((s) => s.id === id);
|
|
31140
31241
|
const imports2 = readImports2(bytes, sections);
|
|
31141
31242
|
const changes = /* @__PURE__ */ new Map();
|
|
@@ -31253,7 +31354,7 @@ function skipElementSegment(r) {
|
|
|
31253
31354
|
else r.u();
|
|
31254
31355
|
}
|
|
31255
31356
|
function placeGuestLazyFunctions(bytes, lazy) {
|
|
31256
|
-
const sections =
|
|
31357
|
+
const sections = wasmSections2(bytes);
|
|
31257
31358
|
const lazyIndex = new Map(lazy.map((name3, index) => [name3, index]));
|
|
31258
31359
|
const functions = new Array(lazy.length);
|
|
31259
31360
|
let found = 0;
|
|
@@ -40099,6 +40200,8 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
40099
40200
|
import_node_path58.default.join(work, "exports.rsp"),
|
|
40100
40201
|
[...defined].map((name3) => quote3(`--export-if-defined=${name3}`)).join("\n")
|
|
40101
40202
|
);
|
|
40203
|
+
const guestServices = import_node_path58.default.join(work, "peach-guest-services.allow");
|
|
40204
|
+
(0, import_node_fs60.writeFileSync)(guestServices, peachGuestServiceAllowlist);
|
|
40102
40205
|
const args = [
|
|
40103
40206
|
...link.flags,
|
|
40104
40207
|
`--global-base=${SWIFT_SDK_MEMORY_BASE}`,
|
|
@@ -40110,6 +40213,7 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
40110
40213
|
...lazy,
|
|
40111
40214
|
"--end-lib",
|
|
40112
40215
|
"--unresolved-symbols=ignore-all",
|
|
40216
|
+
`--allow-undefined-file=${guestServices}`,
|
|
40113
40217
|
"--export-dynamic",
|
|
40114
40218
|
...[
|
|
40115
40219
|
"__peach_sdk_register",
|
|
@@ -40142,8 +40246,9 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
40142
40246
|
if (result.status === "rejected") throw result.reason;
|
|
40143
40247
|
}
|
|
40144
40248
|
const rawLink = (0, import_node_fs60.readFileSync)(linked);
|
|
40145
|
-
const linkedBytes = lookups2 ? rawLink : orderObjCConstructors(rawLink);
|
|
40146
40249
|
const linkMap = readWasmLinkMap(map2, true);
|
|
40250
|
+
assertPeachGuestEngineLink(linkMap, rawLink);
|
|
40251
|
+
const linkedBytes = lookups2 ? rawLink : orderObjCConstructors(rawLink);
|
|
40147
40252
|
const {
|
|
40148
40253
|
image: finished,
|
|
40149
40254
|
sdkInterface,
|
|
@@ -40248,7 +40353,7 @@ function sdkLinkInputs(appRoot) {
|
|
|
40248
40353
|
return { flags, libraries, objects: [crt, ...objects], providers };
|
|
40249
40354
|
}
|
|
40250
40355
|
function autolinkLibraries(bytes) {
|
|
40251
|
-
const entries2 =
|
|
40356
|
+
const entries2 = wasmSections2(bytes).find((s) => s.name === ".swift1_autolink_entries");
|
|
40252
40357
|
if (!entries2) return [];
|
|
40253
40358
|
const raw2 = Buffer.isBuffer(bytes) ? bytes : Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
40254
40359
|
return raw2.toString("utf8", entries2.start, entries2.end).split("\0").filter((entry) => entry.startsWith("-l"));
|
|
@@ -40258,7 +40363,7 @@ function sdkHostExports(appRoot) {
|
|
|
40258
40363
|
const linked = (0, import_node_fs60.readdirSync)(release).find((name3) => name3.endsWith(".wasm"));
|
|
40259
40364
|
if (!linked) throw new Error("the sdk image link found no empty app image");
|
|
40260
40365
|
const bytes = (0, import_node_fs60.readFileSync)(import_node_path58.default.join(release, linked));
|
|
40261
|
-
const exports2 =
|
|
40366
|
+
const exports2 = wasmSections2(bytes).find((s) => s.id === 7);
|
|
40262
40367
|
if (!exports2) return [];
|
|
40263
40368
|
const names = [];
|
|
40264
40369
|
let at = exports2.start;
|
|
@@ -40460,6 +40565,7 @@ var init_swift_sdk_image = __esm({
|
|
|
40460
40565
|
import_node_fs60 = require("node:fs");
|
|
40461
40566
|
import_node_path58 = __toESM(require("node:path"), 1);
|
|
40462
40567
|
import_node_util10 = require("node:util");
|
|
40568
|
+
init_guest_engine_services();
|
|
40463
40569
|
init_native_prebuilt();
|
|
40464
40570
|
init_swift_compile();
|
|
40465
40571
|
init_swift_darwin_records();
|
|
@@ -41155,7 +41261,7 @@ async function linkSwiftAppModule(options2) {
|
|
|
41155
41261
|
};
|
|
41156
41262
|
}
|
|
41157
41263
|
function sdkImportThunks(bytes) {
|
|
41158
|
-
const sections =
|
|
41264
|
+
const sections = wasmSections2(bytes);
|
|
41159
41265
|
const section2 = (id) => sections.find((s) => s.id === id);
|
|
41160
41266
|
const valueType = (r) => {
|
|
41161
41267
|
const type = r.byte();
|
|
@@ -41286,7 +41392,7 @@ function sdkImportThunks(bytes) {
|
|
|
41286
41392
|
function resolveSdkReferences(source, sdk2, forwarders) {
|
|
41287
41393
|
const bytes = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
41288
41394
|
const { data: sdkData, signatures } = sdk2.sdkInterface;
|
|
41289
|
-
const sections =
|
|
41395
|
+
const sections = wasmSections2(bytes);
|
|
41290
41396
|
const linking = sections.find((s) => s.name === "linking");
|
|
41291
41397
|
if (!linking) throw new Error("app link has no linking section");
|
|
41292
41398
|
const symbols = [];
|
|
@@ -45496,7 +45602,7 @@ function findTargetForFile(file, byDir, predicate) {
|
|
|
45496
45602
|
}
|
|
45497
45603
|
return void 0;
|
|
45498
45604
|
}
|
|
45499
|
-
function compiledSwiftSources(files2, targets, overlayFrameworks, headers
|
|
45605
|
+
function compiledSwiftSources(files2, targets, overlayFrameworks, headers) {
|
|
45500
45606
|
const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
|
|
45501
45607
|
const byDir = indexTargetsByDirectory(ordered);
|
|
45502
45608
|
const excludeSets = /* @__PURE__ */ new Map();
|
|
@@ -45522,7 +45628,7 @@ function compiledSwiftSources(files2, targets, overlayFrameworks, headers, nativ
|
|
|
45522
45628
|
const { onWasm, withoutWasm } = swiftTargetArchitectures(targets, swiftSources, headers);
|
|
45523
45629
|
return new Map(
|
|
45524
45630
|
[...owners].map(([file, { source, owner }]) => {
|
|
45525
|
-
if (
|
|
45631
|
+
if (import_node_path70.default.posix.basename(file) === "OneNativeSource.generated.swift")
|
|
45526
45632
|
return [file, source];
|
|
45527
45633
|
const manifest = /(?:^|\/)Package(?:@swift-[\d.]+)?\.swift$/.test(file);
|
|
45528
45634
|
if (manifest && (!owner || /^Package(?:@swift-[\d.]+)?\.swift$/.test(file)))
|
|
@@ -47047,8 +47153,7 @@ module ${moduleName}.Swift {
|
|
|
47047
47153
|
([file]) => /\.(?:h|hh|hpp)$/.test(file)
|
|
47048
47154
|
);
|
|
47049
47155
|
return headerFiles3.filter(([file]) => file.startsWith(`${directory2}/`)).map(([, contents2]) => contents2);
|
|
47050
|
-
}
|
|
47051
|
-
input.oneModule
|
|
47156
|
+
}
|
|
47052
47157
|
);
|
|
47053
47158
|
const libraryEntryFiles = /* @__PURE__ */ new Map();
|
|
47054
47159
|
for (const target of [...targets]) {
|
|
@@ -48301,9 +48406,10 @@ function removeCaseCollidingModuleArtifacts(modulesDir, keep) {
|
|
|
48301
48406
|
(0, import_node_fs70.rmSync)(import_node_path70.default.join(modulesDir, name3), { recursive: true, force: true });
|
|
48302
48407
|
}
|
|
48303
48408
|
}
|
|
48304
|
-
function readFrameworkProductsReceipt(scratch2, receiptKey) {
|
|
48409
|
+
function readFrameworkProductsReceipt(scratch2, receiptKey, planChangedAt = 0n) {
|
|
48305
48410
|
const receiptFile2 = import_node_path70.default.join(scratch2, "products-ready", `${receiptKey}.json`);
|
|
48306
|
-
|
|
48411
|
+
const receiptStat = (0, import_node_fs70.statSync)(receiptFile2, { bigint: true, throwIfNoEntry: false });
|
|
48412
|
+
if (!receiptStat || receiptStat.mtimeNs < planChangedAt) return null;
|
|
48307
48413
|
let parsed2;
|
|
48308
48414
|
try {
|
|
48309
48415
|
parsed2 = v6.parse(
|
|
@@ -48427,117 +48533,136 @@ async function buildFrameworkProducts(scratch2, args, allowWrite) {
|
|
|
48427
48533
|
const unoptimized = args.input.unoptimized === true;
|
|
48428
48534
|
const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
|
|
48429
48535
|
const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
|
|
48430
|
-
const
|
|
48536
|
+
const receiptKeyFor = (products) => (0, import_node_crypto45.createHash)("sha256").update(
|
|
48431
48537
|
JSON.stringify([
|
|
48432
48538
|
"framework-products/v2",
|
|
48433
48539
|
args.frameworkKey,
|
|
48434
48540
|
unoptimized,
|
|
48435
48541
|
args.sdk,
|
|
48436
48542
|
args.toolchainBin,
|
|
48437
|
-
[...
|
|
48543
|
+
[...products].sort(),
|
|
48438
48544
|
darwinRecordsMinimum(),
|
|
48439
48545
|
args.plugins,
|
|
48440
48546
|
sdkOptions,
|
|
48441
48547
|
selectorOptions
|
|
48442
48548
|
])
|
|
48443
48549
|
).digest("hex").slice(0, 32);
|
|
48550
|
+
const receiptKey = receiptKeyFor(linkedTargets.products);
|
|
48444
48551
|
const ready = readFrameworkProductsReceipt(scratch2, receiptKey);
|
|
48445
48552
|
if (ready) return ready;
|
|
48446
48553
|
if (!allowWrite) return;
|
|
48447
48554
|
const linkRoot = import_node_path70.default.join(scratch2, "link");
|
|
48448
|
-
|
|
48449
|
-
const
|
|
48450
|
-
(0, import_node_fs70.
|
|
48451
|
-
|
|
48452
|
-
|
|
48453
|
-
|
|
48454
|
-
const
|
|
48555
|
+
const manifest = import_node_path70.default.join(linkRoot, "Package.swift");
|
|
48556
|
+
const manifestStat = (0, import_node_fs70.statSync)(manifest, { bigint: true, throwIfNoEntry: false });
|
|
48557
|
+
const planStat = (0, import_node_fs70.statSync)(import_node_path70.default.join(scratch2, "release.yaml"), {
|
|
48558
|
+
bigint: true,
|
|
48559
|
+
throwIfNoEntry: false
|
|
48560
|
+
});
|
|
48561
|
+
const builtProducts = manifestStat && planStat ? [
|
|
48562
|
+
...(0, import_node_fs70.readFileSync)(manifest, "utf8").matchAll(
|
|
48563
|
+
/^\s*\.product\(name: "([^"]+)", package:/gm
|
|
48564
|
+
)
|
|
48565
|
+
].map((match) => match[1]) : [];
|
|
48566
|
+
const reusePlan = manifestStat && planStat && linkedTargets.products.every((product) => builtProducts.includes(product)) && readFrameworkProductsReceipt(
|
|
48455
48567
|
scratch2,
|
|
48456
|
-
|
|
48457
|
-
|
|
48458
|
-
|
|
48459
|
-
|
|
48460
|
-
|
|
48461
|
-
|
|
48462
|
-
|
|
48463
|
-
|
|
48464
|
-
|
|
48465
|
-
|
|
48466
|
-
|
|
48467
|
-
"native",
|
|
48468
|
-
"-j",
|
|
48469
|
-
String(targetJobs),
|
|
48470
|
-
"--package-path",
|
|
48471
|
-
linkRoot,
|
|
48472
|
-
"--scratch-path",
|
|
48568
|
+
receiptKeyFor(builtProducts),
|
|
48569
|
+
manifestStat.ctimeNs > planStat.ctimeNs ? manifestStat.ctimeNs : planStat.ctimeNs
|
|
48570
|
+
);
|
|
48571
|
+
if (!reusePlan) {
|
|
48572
|
+
writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
|
|
48573
|
+
const frameworkTmp = import_node_path70.default.join(scratch2, "peach-compiler-tmp");
|
|
48574
|
+
(0, import_node_fs70.mkdirSync)(frameworkTmp, { recursive: true });
|
|
48575
|
+
const jobs = swiftCompilerJobs();
|
|
48576
|
+
const targetJobs = jobs >= 4 ? 2 : 1;
|
|
48577
|
+
const driverJobs = Math.max(1, Math.floor(jobs / targetJobs));
|
|
48578
|
+
const cache = unoptimized ? null : prepareFrameworkCompileCache(
|
|
48473
48579
|
scratch2,
|
|
48474
|
-
|
|
48475
|
-
|
|
48476
|
-
|
|
48477
|
-
|
|
48478
|
-
|
|
48479
|
-
|
|
48480
|
-
|
|
48481
|
-
|
|
48482
|
-
|
|
48483
|
-
|
|
48484
|
-
|
|
48485
|
-
|
|
48486
|
-
|
|
48487
|
-
|
|
48488
|
-
|
|
48489
|
-
|
|
48490
|
-
|
|
48491
|
-
|
|
48492
|
-
|
|
48493
|
-
|
|
48494
|
-
|
|
48495
|
-
|
|
48496
|
-
|
|
48497
|
-
|
|
48498
|
-
|
|
48499
|
-
|
|
48500
|
-
|
|
48501
|
-
"-g0",
|
|
48502
|
-
"-Xcxx",
|
|
48503
|
-
"-g0",
|
|
48504
|
-
"-Xswiftc",
|
|
48505
|
-
"-num-threads",
|
|
48506
|
-
"-Xswiftc",
|
|
48507
|
-
"1",
|
|
48508
|
-
...swiftReproducibleBuildFlags([
|
|
48509
|
-
[import_node_path70.default.dirname(args.toolchainBin), "toolchain"],
|
|
48510
|
-
[args.moduleRoot, "framework"],
|
|
48511
|
-
[scratch2, "framework-scratch"]
|
|
48512
|
-
]),
|
|
48513
|
-
...args.plugins.libraries.flatMap((plugin) => [
|
|
48580
|
+
args.moduleRoot,
|
|
48581
|
+
args.toolchainBin,
|
|
48582
|
+
sdkOptions,
|
|
48583
|
+
linkedTargets.products
|
|
48584
|
+
);
|
|
48585
|
+
await runCompiler(
|
|
48586
|
+
args.swift,
|
|
48587
|
+
[
|
|
48588
|
+
"build",
|
|
48589
|
+
...swiftPackageCacheOptions(),
|
|
48590
|
+
"--build-system",
|
|
48591
|
+
"native",
|
|
48592
|
+
"-j",
|
|
48593
|
+
String(targetJobs),
|
|
48594
|
+
"--package-path",
|
|
48595
|
+
linkRoot,
|
|
48596
|
+
"--scratch-path",
|
|
48597
|
+
scratch2,
|
|
48598
|
+
"--target",
|
|
48599
|
+
FRAMEWORK_LINK_TARGET,
|
|
48600
|
+
...sdkOptions,
|
|
48601
|
+
...selectorOptions,
|
|
48602
|
+
"--swift-sdk",
|
|
48603
|
+
args.sdk,
|
|
48604
|
+
"-c",
|
|
48605
|
+
"release",
|
|
48606
|
+
...cache ? ["-Xswiftc", "-driver-use-frontend-path", "-Xswiftc", cache.wrapper] : [],
|
|
48514
48607
|
"-Xswiftc",
|
|
48515
|
-
"-
|
|
48608
|
+
unoptimized ? "-Onone" : "-Osize",
|
|
48516
48609
|
"-Xswiftc",
|
|
48517
|
-
|
|
48518
|
-
|
|
48519
|
-
|
|
48610
|
+
"-no-whole-module-optimization",
|
|
48611
|
+
// optimized batches can move specialized definitions between object files.
|
|
48612
|
+
...unoptimized ? ["-Xswiftc", "-incremental"] : [],
|
|
48520
48613
|
"-Xswiftc",
|
|
48521
|
-
"-
|
|
48614
|
+
"-enable-batch-mode",
|
|
48615
|
+
// each batch repeats the same framework diagnostics.
|
|
48616
|
+
...unoptimized ? [] : ["-Xswiftc", "-suppress-warnings"],
|
|
48522
48617
|
"-Xswiftc",
|
|
48523
|
-
|
|
48524
|
-
|
|
48525
|
-
|
|
48526
|
-
|
|
48527
|
-
|
|
48528
|
-
|
|
48529
|
-
|
|
48530
|
-
|
|
48531
|
-
|
|
48532
|
-
|
|
48533
|
-
|
|
48534
|
-
|
|
48535
|
-
|
|
48536
|
-
|
|
48537
|
-
|
|
48538
|
-
|
|
48539
|
-
|
|
48540
|
-
|
|
48618
|
+
"-j",
|
|
48619
|
+
"-Xswiftc",
|
|
48620
|
+
String(driverJobs),
|
|
48621
|
+
// the release link strips all debug info, so none is generated.
|
|
48622
|
+
"-Xswiftc",
|
|
48623
|
+
"-gnone",
|
|
48624
|
+
"-Xcc",
|
|
48625
|
+
"-g0",
|
|
48626
|
+
"-Xcxx",
|
|
48627
|
+
"-g0",
|
|
48628
|
+
"-Xswiftc",
|
|
48629
|
+
"-num-threads",
|
|
48630
|
+
"-Xswiftc",
|
|
48631
|
+
"1",
|
|
48632
|
+
...swiftReproducibleBuildFlags([
|
|
48633
|
+
[import_node_path70.default.dirname(args.toolchainBin), "toolchain"],
|
|
48634
|
+
[args.moduleRoot, "framework"],
|
|
48635
|
+
[scratch2, "framework-scratch"]
|
|
48636
|
+
]),
|
|
48637
|
+
...args.plugins.libraries.flatMap((plugin) => [
|
|
48638
|
+
"-Xswiftc",
|
|
48639
|
+
"-load-plugin-library",
|
|
48640
|
+
"-Xswiftc",
|
|
48641
|
+
plugin
|
|
48642
|
+
]),
|
|
48643
|
+
...args.plugins.executables.flatMap((plugin) => [
|
|
48644
|
+
"-Xswiftc",
|
|
48645
|
+
"-load-plugin-executable",
|
|
48646
|
+
"-Xswiftc",
|
|
48647
|
+
`${plugin}#ExpoModulesMacros`
|
|
48648
|
+
])
|
|
48649
|
+
],
|
|
48650
|
+
// swiftpm hashes TMPDIR into its plan; keep one stable compiler scratch inside the locked slot.
|
|
48651
|
+
// the framework build's warnings alone pass the default 1 MiB cap, which kills
|
|
48652
|
+
// the build one step from the end.
|
|
48653
|
+
{
|
|
48654
|
+
...args.buildOptions,
|
|
48655
|
+
temporaryDirectory: frameworkTmp,
|
|
48656
|
+
maxBuffer: 64 * 1024 * 1024
|
|
48657
|
+
},
|
|
48658
|
+
SWIFTPM_PROGRESS,
|
|
48659
|
+
SWIFTPM_NOISE
|
|
48660
|
+
).catch((error) => {
|
|
48661
|
+
throw new Error(outputOf(error), { cause: error });
|
|
48662
|
+
}).finally(() => {
|
|
48663
|
+
if (cache) reportFrameworkCompileCacheStats(scratch2, cache.statsFile);
|
|
48664
|
+
});
|
|
48665
|
+
}
|
|
48541
48666
|
const release = import_node_path70.default.join(scratch2, WASM_TRIPLE, "release");
|
|
48542
48667
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
48543
48668
|
const objects = linked.objects;
|
|
@@ -50076,7 +50201,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
50076
50201
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
50077
50202
|
MULTI_MANIFEST_VERSION = 76;
|
|
50078
50203
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
50079
|
-
compilerSourceDigest = true ? "
|
|
50204
|
+
compilerSourceDigest = true ? "c83dc1b17f6e7fc01d5217313795b0276b66d9f33db641855c80c055d7d77edd" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
50080
50205
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
50081
50206
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
50082
50207
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -93227,7 +93352,7 @@ function addressImmediates(bytes) {
|
|
|
93227
93352
|
} else throw new Error(`sdk code has unknown instruction ${op.toString(16)}`);
|
|
93228
93353
|
}
|
|
93229
93354
|
};
|
|
93230
|
-
for (const section2 of
|
|
93355
|
+
for (const section2 of wasmSections(bytes)) {
|
|
93231
93356
|
at = section2.start;
|
|
93232
93357
|
if (section2.id === 6)
|
|
93233
93358
|
for (let n = u(); n > 0; n--) {
|
|
@@ -105458,7 +105583,7 @@ var init_nitro_superset = __esm({
|
|
|
105458
105583
|
init_nitroContract();
|
|
105459
105584
|
init_swift_standin_digest();
|
|
105460
105585
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
105461
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
105586
|
+
NITRO_COMPILER_DIGEST = true ? "880e684ade3a6398cfad03a94e2163815fcdc45e9f1be044e82a986570df5d2e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
105462
105587
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
105463
105588
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
105464
105589
|
published2 = /* @__PURE__ */ new Map();
|