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;
|
|
@@ -10108,7 +10108,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
10108
10108
|
|
|
10109
10109
|
// src/swift-compiler-digest.ts
|
|
10110
10110
|
function swiftArchiveCompilerDigestValue() {
|
|
10111
|
-
return true ? "
|
|
10111
|
+
return true ? "e036567f599b9df239e4332b34b546043c5d1c41996348475482e91ed8b42366" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname, "archive");
|
|
10112
10112
|
}
|
|
10113
10113
|
var import_node_crypto9, import_node_fs20, import_node_path16, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
10114
10114
|
var init_swift_compiler_digest = __esm({
|
|
@@ -15678,6 +15678,27 @@ var init_swift_resource_class_names = __esm({
|
|
|
15678
15678
|
}
|
|
15679
15679
|
});
|
|
15680
15680
|
|
|
15681
|
+
// ../peach-kit/src/guest-engine-services.ts
|
|
15682
|
+
var PEACH_GUEST_SERVICE_MODULE, PEACH_GUEST_SERVICE_PREFIX, peachGuestServiceNames, peachGuestServiceSymbols, peachGuestServiceAllowlist;
|
|
15683
|
+
var init_guest_engine_services = __esm({
|
|
15684
|
+
"../peach-kit/src/guest-engine-services.ts"() {
|
|
15685
|
+
"use strict";
|
|
15686
|
+
PEACH_GUEST_SERVICE_MODULE = "peach_guest_services";
|
|
15687
|
+
PEACH_GUEST_SERVICE_PREFIX = "peach_guest_service_";
|
|
15688
|
+
peachGuestServiceNames = [
|
|
15689
|
+
"peach_app_config_resolve",
|
|
15690
|
+
"peach_audio_host_request",
|
|
15691
|
+
"peach_site_origin",
|
|
15692
|
+
"services_request",
|
|
15693
|
+
"services_storage_error"
|
|
15694
|
+
];
|
|
15695
|
+
peachGuestServiceSymbols = peachGuestServiceNames.map(
|
|
15696
|
+
(name3) => PEACH_GUEST_SERVICE_PREFIX + name3
|
|
15697
|
+
);
|
|
15698
|
+
peachGuestServiceAllowlist = peachGuestServiceSymbols.join("\n") + "\n";
|
|
15699
|
+
}
|
|
15700
|
+
});
|
|
15701
|
+
|
|
15681
15702
|
// src/swift-guest-linked-spans.ts
|
|
15682
15703
|
function number(bytes, start) {
|
|
15683
15704
|
let value = 0;
|
|
@@ -16437,7 +16458,146 @@ var init_swift_guest_linked_spans = __esm({
|
|
|
16437
16458
|
}
|
|
16438
16459
|
});
|
|
16439
16460
|
|
|
16461
|
+
// src/wasm-binary-sections.ts
|
|
16462
|
+
function encodeWasmNumber(value) {
|
|
16463
|
+
const bytes = [];
|
|
16464
|
+
for (let rest = value; ; ) {
|
|
16465
|
+
const byte = rest % 128;
|
|
16466
|
+
rest = Math.floor(rest / 128);
|
|
16467
|
+
if (rest === 0) return [...bytes, byte];
|
|
16468
|
+
bytes.push(byte | 128);
|
|
16469
|
+
}
|
|
16470
|
+
}
|
|
16471
|
+
function encodeWasmName(name3) {
|
|
16472
|
+
const bytes = new TextEncoder().encode(name3);
|
|
16473
|
+
return [...encodeWasmNumber(bytes.length), ...bytes];
|
|
16474
|
+
}
|
|
16475
|
+
function readWasmSection(bytes, start, end) {
|
|
16476
|
+
let at = start;
|
|
16477
|
+
const number3 = () => {
|
|
16478
|
+
let value = 0;
|
|
16479
|
+
for (let shift = 0; ; shift += 7) {
|
|
16480
|
+
if (at >= end || shift > 63) throw new Error("invalid wasm integer");
|
|
16481
|
+
const byte = bytes[at++];
|
|
16482
|
+
value += (byte & 127) * 2 ** shift;
|
|
16483
|
+
if (!(byte & 128)) return value;
|
|
16484
|
+
}
|
|
16485
|
+
};
|
|
16486
|
+
return {
|
|
16487
|
+
number: number3,
|
|
16488
|
+
byte: () => {
|
|
16489
|
+
if (at >= end) throw new Error("truncated wasm section");
|
|
16490
|
+
return bytes[at++];
|
|
16491
|
+
},
|
|
16492
|
+
name: () => {
|
|
16493
|
+
const length = number3();
|
|
16494
|
+
at += length;
|
|
16495
|
+
if (at > end) throw new Error("truncated wasm name");
|
|
16496
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset + at - length, length).toString();
|
|
16497
|
+
},
|
|
16498
|
+
position: () => at,
|
|
16499
|
+
done: () => at === end
|
|
16500
|
+
};
|
|
16501
|
+
}
|
|
16502
|
+
function wasmSections(bytes) {
|
|
16503
|
+
if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
|
|
16504
|
+
throw new Error("not a wasm module");
|
|
16505
|
+
const found = [];
|
|
16506
|
+
for (let at = 8; at < bytes.length; ) {
|
|
16507
|
+
const header = readWasmSection(bytes, at, bytes.length);
|
|
16508
|
+
const id = header.byte();
|
|
16509
|
+
const size2 = header.number();
|
|
16510
|
+
const start = header.position();
|
|
16511
|
+
if (start + size2 > bytes.length) throw new Error("truncated wasm section");
|
|
16512
|
+
found.push({ id, offset: at, start, end: start + size2 });
|
|
16513
|
+
at = start + size2;
|
|
16514
|
+
}
|
|
16515
|
+
return found;
|
|
16516
|
+
}
|
|
16517
|
+
var init_wasm_binary_sections = __esm({
|
|
16518
|
+
"src/wasm-binary-sections.ts"() {
|
|
16519
|
+
"use strict";
|
|
16520
|
+
}
|
|
16521
|
+
});
|
|
16522
|
+
|
|
16523
|
+
// src/wasm-imports.ts
|
|
16524
|
+
function readWasmImports(bytes, section2, visit3) {
|
|
16525
|
+
const input = readWasmSection(bytes, section2.start, section2.end);
|
|
16526
|
+
const count = input.number();
|
|
16527
|
+
const valueType = () => {
|
|
16528
|
+
const first = input.byte();
|
|
16529
|
+
if (first === 99 || first === 100) input.number();
|
|
16530
|
+
};
|
|
16531
|
+
const limits = () => {
|
|
16532
|
+
const flags = input.number();
|
|
16533
|
+
input.number();
|
|
16534
|
+
if (flags & 1) input.number();
|
|
16535
|
+
if (flags & 8) input.number();
|
|
16536
|
+
};
|
|
16537
|
+
for (let index = 0; index < count; index++) {
|
|
16538
|
+
const start = input.position();
|
|
16539
|
+
const module2 = input.name();
|
|
16540
|
+
const name3 = input.name();
|
|
16541
|
+
const type = input.position();
|
|
16542
|
+
const kind = input.byte();
|
|
16543
|
+
switch (kind) {
|
|
16544
|
+
case 0:
|
|
16545
|
+
input.number();
|
|
16546
|
+
break;
|
|
16547
|
+
case 1:
|
|
16548
|
+
valueType();
|
|
16549
|
+
limits();
|
|
16550
|
+
break;
|
|
16551
|
+
case 2:
|
|
16552
|
+
limits();
|
|
16553
|
+
break;
|
|
16554
|
+
case 3:
|
|
16555
|
+
valueType();
|
|
16556
|
+
input.byte();
|
|
16557
|
+
break;
|
|
16558
|
+
case 4:
|
|
16559
|
+
input.byte();
|
|
16560
|
+
input.number();
|
|
16561
|
+
break;
|
|
16562
|
+
default:
|
|
16563
|
+
throw new Error(`unsupported Wasm import kind ${kind}`);
|
|
16564
|
+
}
|
|
16565
|
+
visit3({ module: module2, name: name3, kind, start, type, end: input.position() });
|
|
16566
|
+
}
|
|
16567
|
+
if (!input.done()) throw new Error("invalid Wasm imports");
|
|
16568
|
+
return count;
|
|
16569
|
+
}
|
|
16570
|
+
var init_wasm_imports = __esm({
|
|
16571
|
+
"src/wasm-imports.ts"() {
|
|
16572
|
+
"use strict";
|
|
16573
|
+
init_wasm_binary_sections();
|
|
16574
|
+
}
|
|
16575
|
+
});
|
|
16576
|
+
|
|
16440
16577
|
// src/swift-sdk-image-map.ts
|
|
16578
|
+
function assertPeachGuestEngineLink(map2, linked) {
|
|
16579
|
+
const guestSymbol = /^peach_guest_(sdk|removed|service)_/;
|
|
16580
|
+
const unresolved = /* @__PURE__ */ new Set();
|
|
16581
|
+
for (const chunk of map2.code) {
|
|
16582
|
+
if (chunk.inputFile !== "<internal>" || chunk.section !== "undefined_stub") continue;
|
|
16583
|
+
for (const { name: name3 } of chunk.symbols) if (guestSymbol.test(name3)) unresolved.add(name3);
|
|
16584
|
+
}
|
|
16585
|
+
if (unresolved.size)
|
|
16586
|
+
throw new Error(
|
|
16587
|
+
`unresolved PeachEngine calls in the Swift SDK:
|
|
16588
|
+
${[...unresolved].sort().join("\n")}`
|
|
16589
|
+
);
|
|
16590
|
+
const imports2 = wasmSections(linked).find((section2) => section2.id === 2);
|
|
16591
|
+
if (imports2)
|
|
16592
|
+
readWasmImports(linked, imports2, ({ kind, module: module2, name: name3 }) => {
|
|
16593
|
+
if (module2 !== PEACH_GUEST_SERVICE_MODULE && !guestSymbol.test(name3)) return;
|
|
16594
|
+
if (kind === 0 && module2 === PEACH_GUEST_SERVICE_MODULE && peachGuestServiceSymbols.includes(name3))
|
|
16595
|
+
return;
|
|
16596
|
+
throw new Error(
|
|
16597
|
+
`unexpected PeachEngine host import in the Swift SDK: ${module2}.${name3}`
|
|
16598
|
+
);
|
|
16599
|
+
});
|
|
16600
|
+
}
|
|
16441
16601
|
function isHexChar(code) {
|
|
16442
16602
|
return code >= 48 && code <= 57 || code >= 97 && code <= 102;
|
|
16443
16603
|
}
|
|
@@ -16606,7 +16766,10 @@ var init_swift_sdk_image_map = __esm({
|
|
|
16606
16766
|
"src/swift-sdk-image-map.ts"() {
|
|
16607
16767
|
"use strict";
|
|
16608
16768
|
import_node_path27 = require("node:path");
|
|
16769
|
+
init_guest_engine_services();
|
|
16609
16770
|
init_swift_guest_linked_spans();
|
|
16771
|
+
init_wasm_binary_sections();
|
|
16772
|
+
init_wasm_imports();
|
|
16610
16773
|
PARTITIONED = [
|
|
16611
16774
|
".rodata",
|
|
16612
16775
|
".data",
|
|
@@ -16679,7 +16842,7 @@ function wasmReader(bytes, start) {
|
|
|
16679
16842
|
}
|
|
16680
16843
|
};
|
|
16681
16844
|
}
|
|
16682
|
-
function
|
|
16845
|
+
function wasmSections2(bytes) {
|
|
16683
16846
|
const out = [];
|
|
16684
16847
|
for (let at = 8; at < bytes.length; ) {
|
|
16685
16848
|
const r = wasmReader(bytes, at);
|
|
@@ -16772,7 +16935,7 @@ function* readFunctionNames(bytes, names) {
|
|
|
16772
16935
|
}
|
|
16773
16936
|
}
|
|
16774
16937
|
function orderObjCConstructors(bytes) {
|
|
16775
|
-
const sections =
|
|
16938
|
+
const sections = wasmSections2(bytes);
|
|
16776
16939
|
const names = sections.find((s) => s.name === "name");
|
|
16777
16940
|
if (!names) return bytes;
|
|
16778
16941
|
let constructors;
|
|
@@ -16820,7 +16983,7 @@ function orderObjCConstructors(bytes) {
|
|
|
16820
16983
|
return ordered;
|
|
16821
16984
|
}
|
|
16822
16985
|
function readModule(bytes) {
|
|
16823
|
-
const sections =
|
|
16986
|
+
const sections = wasmSections2(bytes);
|
|
16824
16987
|
const get = (id) => sections.find((s) => s.id === id);
|
|
16825
16988
|
const types2 = [];
|
|
16826
16989
|
const typeSection = get(1);
|
|
@@ -17024,7 +17187,7 @@ function finishSdkImage(bytes, hostExports, libraries, guestMap) {
|
|
|
17024
17187
|
return { image: Buffer.concat(parts), sdkInterface, functionSlots };
|
|
17025
17188
|
}
|
|
17026
17189
|
function passiveSegments(bytes) {
|
|
17027
|
-
const data =
|
|
17190
|
+
const data = wasmSections2(bytes).find((s) => s.id === 11);
|
|
17028
17191
|
if (!data) throw new Error("sdk image has no data section");
|
|
17029
17192
|
const r = wasmReader(bytes, data.start);
|
|
17030
17193
|
const out = [];
|
|
@@ -17129,7 +17292,7 @@ function codeOnlySdkImage(bytes, constructorMask) {
|
|
|
17129
17292
|
function constructorKeys(map2, bytes) {
|
|
17130
17293
|
const first = map2.code[0];
|
|
17131
17294
|
if (!first) throw new Error("link has no code");
|
|
17132
|
-
const sections =
|
|
17295
|
+
const sections = wasmSections2(bytes);
|
|
17133
17296
|
const code = sections.find((s) => s.id === 10);
|
|
17134
17297
|
if (!code) throw new Error("link has no code");
|
|
17135
17298
|
const ctors = map2.code.find((chunk) => chunk.section === "__wasm_call_ctors");
|
|
@@ -17201,7 +17364,7 @@ function constructorKeys(map2, bytes) {
|
|
|
17201
17364
|
return keys;
|
|
17202
17365
|
}
|
|
17203
17366
|
function relocationEdges(bytes, segmentAddress) {
|
|
17204
|
-
const sections =
|
|
17367
|
+
const sections = wasmSections2(bytes);
|
|
17205
17368
|
const linking = sections.find((s) => s.name === "linking");
|
|
17206
17369
|
if (!linking) throw new Error("relocation link has no linking section");
|
|
17207
17370
|
let symKind = new Uint8Array(0);
|
|
@@ -17369,7 +17532,7 @@ function relocationEdges(bytes, segmentAddress) {
|
|
|
17369
17532
|
return { data, code, dataFunctions, calls };
|
|
17370
17533
|
}
|
|
17371
17534
|
function strongDefinitions(bytes) {
|
|
17372
|
-
const linking =
|
|
17535
|
+
const linking = wasmSections2(bytes).find((s) => s.name === "linking");
|
|
17373
17536
|
if (!linking) return [];
|
|
17374
17537
|
const r = wasmReader(bytes, linking.start);
|
|
17375
17538
|
r.u();
|
|
@@ -17412,7 +17575,7 @@ function strongDefinitions(bytes) {
|
|
|
17412
17575
|
).map((s) => s.name);
|
|
17413
17576
|
}
|
|
17414
17577
|
function unslottedFunctions(bytes) {
|
|
17415
|
-
const sections =
|
|
17578
|
+
const sections = wasmSections2(bytes);
|
|
17416
17579
|
const importedFuncs = countImportedFunctions(
|
|
17417
17580
|
bytes,
|
|
17418
17581
|
sections.find((s) => s.id === 2)
|
|
@@ -21718,71 +21881,9 @@ var init_swift_guest_image_ledger = __esm({
|
|
|
21718
21881
|
}
|
|
21719
21882
|
});
|
|
21720
21883
|
|
|
21721
|
-
// src/wasm-binary-sections.ts
|
|
21722
|
-
function encodeWasmNumber(value) {
|
|
21723
|
-
const bytes = [];
|
|
21724
|
-
for (let rest = value; ; ) {
|
|
21725
|
-
const byte = rest % 128;
|
|
21726
|
-
rest = Math.floor(rest / 128);
|
|
21727
|
-
if (rest === 0) return [...bytes, byte];
|
|
21728
|
-
bytes.push(byte | 128);
|
|
21729
|
-
}
|
|
21730
|
-
}
|
|
21731
|
-
function encodeWasmName(name3) {
|
|
21732
|
-
const bytes = new TextEncoder().encode(name3);
|
|
21733
|
-
return [...encodeWasmNumber(bytes.length), ...bytes];
|
|
21734
|
-
}
|
|
21735
|
-
function readWasmSection(bytes, start, end) {
|
|
21736
|
-
let at = start;
|
|
21737
|
-
const number3 = () => {
|
|
21738
|
-
let value = 0;
|
|
21739
|
-
for (let shift = 0; ; shift += 7) {
|
|
21740
|
-
if (at >= end || shift > 63) throw new Error("invalid wasm integer");
|
|
21741
|
-
const byte = bytes[at++];
|
|
21742
|
-
value += (byte & 127) * 2 ** shift;
|
|
21743
|
-
if (!(byte & 128)) return value;
|
|
21744
|
-
}
|
|
21745
|
-
};
|
|
21746
|
-
return {
|
|
21747
|
-
number: number3,
|
|
21748
|
-
byte: () => {
|
|
21749
|
-
if (at >= end) throw new Error("truncated wasm section");
|
|
21750
|
-
return bytes[at++];
|
|
21751
|
-
},
|
|
21752
|
-
name: () => {
|
|
21753
|
-
const length = number3();
|
|
21754
|
-
at += length;
|
|
21755
|
-
if (at > end) throw new Error("truncated wasm name");
|
|
21756
|
-
return Buffer.from(bytes.buffer, bytes.byteOffset + at - length, length).toString();
|
|
21757
|
-
},
|
|
21758
|
-
position: () => at,
|
|
21759
|
-
done: () => at === end
|
|
21760
|
-
};
|
|
21761
|
-
}
|
|
21762
|
-
function wasmSections2(bytes) {
|
|
21763
|
-
if (Buffer.from(bytes.subarray(0, 8)).toString("hex") !== "0061736d01000000")
|
|
21764
|
-
throw new Error("not a wasm module");
|
|
21765
|
-
const found = [];
|
|
21766
|
-
for (let at = 8; at < bytes.length; ) {
|
|
21767
|
-
const header = readWasmSection(bytes, at, bytes.length);
|
|
21768
|
-
const id = header.byte();
|
|
21769
|
-
const size2 = header.number();
|
|
21770
|
-
const start = header.position();
|
|
21771
|
-
if (start + size2 > bytes.length) throw new Error("truncated wasm section");
|
|
21772
|
-
found.push({ id, offset: at, start, end: start + size2 });
|
|
21773
|
-
at = start + size2;
|
|
21774
|
-
}
|
|
21775
|
-
return found;
|
|
21776
|
-
}
|
|
21777
|
-
var init_wasm_binary_sections = __esm({
|
|
21778
|
-
"src/wasm-binary-sections.ts"() {
|
|
21779
|
-
"use strict";
|
|
21780
|
-
}
|
|
21781
|
-
});
|
|
21782
|
-
|
|
21783
21884
|
// src/wasm-narrow-boundary.ts
|
|
21784
21885
|
function readWasmCustomSection(bytes, name3) {
|
|
21785
|
-
for (const { id, start, end } of
|
|
21886
|
+
for (const { id, start, end } of wasmSections(bytes)) {
|
|
21786
21887
|
if (id !== 0) continue;
|
|
21787
21888
|
const contents2 = readWasmSection(bytes, start, end);
|
|
21788
21889
|
if (contents2.name() === name3) return bytes.subarray(contents2.position(), end);
|
|
@@ -21791,7 +21892,7 @@ function readWasmCustomSection(bytes, name3) {
|
|
|
21791
21892
|
}
|
|
21792
21893
|
function dropWasmCustomSection(bytes, name3) {
|
|
21793
21894
|
const parts = [bytes.subarray(0, 8)];
|
|
21794
|
-
for (const { id, offset, start, end } of
|
|
21895
|
+
for (const { id, offset, start, end } of wasmSections(bytes)) {
|
|
21795
21896
|
if (id === 0 && readWasmSection(bytes, start, end).name() === name3) continue;
|
|
21796
21897
|
parts.push(bytes.subarray(offset, end));
|
|
21797
21898
|
}
|
|
@@ -21803,7 +21904,7 @@ function writeWasmCustomSections(bytes, entries2) {
|
|
|
21803
21904
|
const parts = [];
|
|
21804
21905
|
let sliceStart = 0;
|
|
21805
21906
|
let sliceEnd = 8;
|
|
21806
|
-
for (const { id, start, end } of
|
|
21907
|
+
for (const { id, start, end } of wasmSections(bytes)) {
|
|
21807
21908
|
if (id === 0 && replaced.has(readWasmSection(bytes, start, end).name())) {
|
|
21808
21909
|
if (sliceEnd > sliceStart) parts.push(bytes.subarray(sliceStart, sliceEnd));
|
|
21809
21910
|
sliceStart = end;
|
|
@@ -21827,7 +21928,7 @@ function writeWasmCustomSection(bytes, name3, data) {
|
|
|
21827
21928
|
return writeWasmCustomSections(bytes, [[name3, data]]);
|
|
21828
21929
|
}
|
|
21829
21930
|
function readWasmMemory(bytes) {
|
|
21830
|
-
return readWasmMemoryAndTableImports(bytes,
|
|
21931
|
+
return readWasmMemoryAndTableImports(bytes, wasmSections(bytes)).memory;
|
|
21831
21932
|
}
|
|
21832
21933
|
function readWasmMemoryAndTableImports(bytes, layout2) {
|
|
21833
21934
|
let memory;
|
|
@@ -21888,7 +21989,7 @@ function withSections(bytes, layout2, replacements) {
|
|
|
21888
21989
|
return Buffer.concat(parts);
|
|
21889
21990
|
}
|
|
21890
21991
|
function narrowWasmBoundary(bytes, wideExports) {
|
|
21891
|
-
const layout2 =
|
|
21992
|
+
const layout2 = wasmSections(bytes);
|
|
21892
21993
|
const section2 = (id) => {
|
|
21893
21994
|
const found = layout2.find((entry) => entry.id === id);
|
|
21894
21995
|
return found && readWasmSection(bytes, found.start, found.end);
|
|
@@ -22014,7 +22115,7 @@ ${[...imports2, ...functions].join("\n")}
|
|
|
22014
22115
|
};
|
|
22015
22116
|
}
|
|
22016
22117
|
function dropBoundaryExports(bytes) {
|
|
22017
|
-
const layout2 =
|
|
22118
|
+
const layout2 = wasmSections(bytes);
|
|
22018
22119
|
const found = layout2.find((entry) => entry.id === 7);
|
|
22019
22120
|
if (!found) throw new Error("merged module has no exports");
|
|
22020
22121
|
const exportSection = readWasmSection(bytes, found.start, found.end);
|
|
@@ -22033,7 +22134,7 @@ function dropBoundaryExports(bytes) {
|
|
|
22033
22134
|
);
|
|
22034
22135
|
}
|
|
22035
22136
|
function withWasmTableMinimum(bytes, minimum) {
|
|
22036
|
-
const layout2 =
|
|
22137
|
+
const layout2 = wasmSections(bytes);
|
|
22037
22138
|
const table = layout2.find(({ id }) => id === 4);
|
|
22038
22139
|
if (!table) {
|
|
22039
22140
|
if (readWasmMemoryAndTableImports(bytes, layout2).tableImports === 1) return bytes;
|
|
@@ -22330,7 +22431,7 @@ function entries(bytes, section2, entry) {
|
|
|
22330
22431
|
return out;
|
|
22331
22432
|
}
|
|
22332
22433
|
function appendLazyPlacement(bytes, functions, table) {
|
|
22333
|
-
const sections =
|
|
22434
|
+
const sections = wasmSections2(bytes);
|
|
22334
22435
|
const section2 = (id) => sections.find((s) => s.id === id);
|
|
22335
22436
|
const imports2 = readImports2(bytes, sections);
|
|
22336
22437
|
const changes = /* @__PURE__ */ new Map();
|
|
@@ -22448,7 +22549,7 @@ function skipElementSegment(r) {
|
|
|
22448
22549
|
else r.u();
|
|
22449
22550
|
}
|
|
22450
22551
|
function placeGuestLazyFunctions(bytes, lazy) {
|
|
22451
|
-
const sections =
|
|
22552
|
+
const sections = wasmSections2(bytes);
|
|
22452
22553
|
const lazyIndex = new Map(lazy.map((name3, index) => [name3, index]));
|
|
22453
22554
|
const functions = new Array(lazy.length);
|
|
22454
22555
|
let found = 0;
|
|
@@ -31643,6 +31744,8 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
31643
31744
|
import_node_path43.default.join(work, "exports.rsp"),
|
|
31644
31745
|
[...defined].map((name3) => quote3(`--export-if-defined=${name3}`)).join("\n")
|
|
31645
31746
|
);
|
|
31747
|
+
const guestServices = import_node_path43.default.join(work, "peach-guest-services.allow");
|
|
31748
|
+
(0, import_node_fs45.writeFileSync)(guestServices, peachGuestServiceAllowlist);
|
|
31646
31749
|
const args = [
|
|
31647
31750
|
...link.flags,
|
|
31648
31751
|
`--global-base=${SWIFT_SDK_MEMORY_BASE}`,
|
|
@@ -31654,6 +31757,7 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
31654
31757
|
...lazy,
|
|
31655
31758
|
"--end-lib",
|
|
31656
31759
|
"--unresolved-symbols=ignore-all",
|
|
31760
|
+
`--allow-undefined-file=${guestServices}`,
|
|
31657
31761
|
"--export-dynamic",
|
|
31658
31762
|
...[
|
|
31659
31763
|
"__peach_sdk_register",
|
|
@@ -31686,8 +31790,9 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
|
|
|
31686
31790
|
if (result.status === "rejected") throw result.reason;
|
|
31687
31791
|
}
|
|
31688
31792
|
const rawLink = (0, import_node_fs45.readFileSync)(linked);
|
|
31689
|
-
const linkedBytes = lookups2 ? rawLink : orderObjCConstructors(rawLink);
|
|
31690
31793
|
const linkMap = readWasmLinkMap(map2, true);
|
|
31794
|
+
assertPeachGuestEngineLink(linkMap, rawLink);
|
|
31795
|
+
const linkedBytes = lookups2 ? rawLink : orderObjCConstructors(rawLink);
|
|
31691
31796
|
const {
|
|
31692
31797
|
image: finished,
|
|
31693
31798
|
sdkInterface,
|
|
@@ -31792,7 +31897,7 @@ function sdkLinkInputs(appRoot) {
|
|
|
31792
31897
|
return { flags, libraries, objects: [crt, ...objects], providers };
|
|
31793
31898
|
}
|
|
31794
31899
|
function autolinkLibraries(bytes) {
|
|
31795
|
-
const entries2 =
|
|
31900
|
+
const entries2 = wasmSections2(bytes).find((s) => s.name === ".swift1_autolink_entries");
|
|
31796
31901
|
if (!entries2) return [];
|
|
31797
31902
|
const raw2 = Buffer.isBuffer(bytes) ? bytes : Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
31798
31903
|
return raw2.toString("utf8", entries2.start, entries2.end).split("\0").filter((entry) => entry.startsWith("-l"));
|
|
@@ -31802,7 +31907,7 @@ function sdkHostExports(appRoot) {
|
|
|
31802
31907
|
const linked = (0, import_node_fs45.readdirSync)(release).find((name3) => name3.endsWith(".wasm"));
|
|
31803
31908
|
if (!linked) throw new Error("the sdk image link found no empty app image");
|
|
31804
31909
|
const bytes = (0, import_node_fs45.readFileSync)(import_node_path43.default.join(release, linked));
|
|
31805
|
-
const exports2 =
|
|
31910
|
+
const exports2 = wasmSections2(bytes).find((s) => s.id === 7);
|
|
31806
31911
|
if (!exports2) return [];
|
|
31807
31912
|
const names = [];
|
|
31808
31913
|
let at = exports2.start;
|
|
@@ -32004,6 +32109,7 @@ var init_swift_sdk_image = __esm({
|
|
|
32004
32109
|
import_node_fs45 = require("node:fs");
|
|
32005
32110
|
import_node_path43 = __toESM(require("node:path"), 1);
|
|
32006
32111
|
import_node_util8 = require("node:util");
|
|
32112
|
+
init_guest_engine_services();
|
|
32007
32113
|
init_native_prebuilt();
|
|
32008
32114
|
init_swift_compile();
|
|
32009
32115
|
init_swift_darwin_records();
|
|
@@ -32699,7 +32805,7 @@ async function linkSwiftAppModule(options2) {
|
|
|
32699
32805
|
};
|
|
32700
32806
|
}
|
|
32701
32807
|
function sdkImportThunks(bytes) {
|
|
32702
|
-
const sections =
|
|
32808
|
+
const sections = wasmSections2(bytes);
|
|
32703
32809
|
const section2 = (id) => sections.find((s) => s.id === id);
|
|
32704
32810
|
const valueType = (r) => {
|
|
32705
32811
|
const type = r.byte();
|
|
@@ -32830,7 +32936,7 @@ function sdkImportThunks(bytes) {
|
|
|
32830
32936
|
function resolveSdkReferences(source, sdk2, forwarders) {
|
|
32831
32937
|
const bytes = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
32832
32938
|
const { data: sdkData, signatures } = sdk2.sdkInterface;
|
|
32833
|
-
const sections =
|
|
32939
|
+
const sections = wasmSections2(bytes);
|
|
32834
32940
|
const linking = sections.find((s) => s.name === "linking");
|
|
32835
32941
|
if (!linking) throw new Error("app link has no linking section");
|
|
32836
32942
|
const symbols = [];
|
|
@@ -37058,7 +37164,7 @@ function findTargetForFile(file, byDir, predicate) {
|
|
|
37058
37164
|
}
|
|
37059
37165
|
return void 0;
|
|
37060
37166
|
}
|
|
37061
|
-
function compiledSwiftSources(files2, targets, overlayFrameworks, headers
|
|
37167
|
+
function compiledSwiftSources(files2, targets, overlayFrameworks, headers) {
|
|
37062
37168
|
const ordered = [...targets].sort((a, b) => b.path.length - a.path.length);
|
|
37063
37169
|
const byDir = indexTargetsByDirectory(ordered);
|
|
37064
37170
|
const excludeSets = /* @__PURE__ */ new Map();
|
|
@@ -37084,7 +37190,7 @@ function compiledSwiftSources(files2, targets, overlayFrameworks, headers, nativ
|
|
|
37084
37190
|
const { onWasm, withoutWasm } = swiftTargetArchitectures(targets, swiftSources, headers);
|
|
37085
37191
|
return new Map(
|
|
37086
37192
|
[...owners].map(([file, { source, owner }]) => {
|
|
37087
|
-
if (
|
|
37193
|
+
if (import_node_path55.default.posix.basename(file) === "OneNativeSource.generated.swift")
|
|
37088
37194
|
return [file, source];
|
|
37089
37195
|
const manifest = /(?:^|\/)Package(?:@swift-[\d.]+)?\.swift$/.test(file);
|
|
37090
37196
|
if (manifest && (!owner || /^Package(?:@swift-[\d.]+)?\.swift$/.test(file)))
|
|
@@ -38609,8 +38715,7 @@ module ${moduleName2}.Swift {
|
|
|
38609
38715
|
([file]) => /\.(?:h|hh|hpp)$/.test(file)
|
|
38610
38716
|
);
|
|
38611
38717
|
return headerFiles3.filter(([file]) => file.startsWith(`${directory2}/`)).map(([, contents2]) => contents2);
|
|
38612
|
-
}
|
|
38613
|
-
input.oneModule
|
|
38718
|
+
}
|
|
38614
38719
|
);
|
|
38615
38720
|
const libraryEntryFiles = /* @__PURE__ */ new Map();
|
|
38616
38721
|
for (const target of [...targets]) {
|
|
@@ -39863,9 +39968,10 @@ function removeCaseCollidingModuleArtifacts(modulesDir, keep) {
|
|
|
39863
39968
|
(0, import_node_fs55.rmSync)(import_node_path55.default.join(modulesDir, name3), { recursive: true, force: true });
|
|
39864
39969
|
}
|
|
39865
39970
|
}
|
|
39866
|
-
function readFrameworkProductsReceipt(scratch2, receiptKey) {
|
|
39971
|
+
function readFrameworkProductsReceipt(scratch2, receiptKey, planChangedAt = 0n) {
|
|
39867
39972
|
const receiptFile2 = import_node_path55.default.join(scratch2, "products-ready", `${receiptKey}.json`);
|
|
39868
|
-
|
|
39973
|
+
const receiptStat = (0, import_node_fs55.statSync)(receiptFile2, { bigint: true, throwIfNoEntry: false });
|
|
39974
|
+
if (!receiptStat || receiptStat.mtimeNs < planChangedAt) return null;
|
|
39869
39975
|
let parsed2;
|
|
39870
39976
|
try {
|
|
39871
39977
|
parsed2 = v6.parse(
|
|
@@ -39989,117 +40095,136 @@ async function buildFrameworkProducts(scratch2, args, allowWrite) {
|
|
|
39989
40095
|
const unoptimized = args.input.unoptimized === true;
|
|
39990
40096
|
const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
|
|
39991
40097
|
const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
|
|
39992
|
-
const
|
|
40098
|
+
const receiptKeyFor = (products) => (0, import_node_crypto35.createHash)("sha256").update(
|
|
39993
40099
|
JSON.stringify([
|
|
39994
40100
|
"framework-products/v2",
|
|
39995
40101
|
args.frameworkKey,
|
|
39996
40102
|
unoptimized,
|
|
39997
40103
|
args.sdk,
|
|
39998
40104
|
args.toolchainBin,
|
|
39999
|
-
[...
|
|
40105
|
+
[...products].sort(),
|
|
40000
40106
|
darwinRecordsMinimum(),
|
|
40001
40107
|
args.plugins,
|
|
40002
40108
|
sdkOptions,
|
|
40003
40109
|
selectorOptions
|
|
40004
40110
|
])
|
|
40005
40111
|
).digest("hex").slice(0, 32);
|
|
40112
|
+
const receiptKey = receiptKeyFor(linkedTargets.products);
|
|
40006
40113
|
const ready = readFrameworkProductsReceipt(scratch2, receiptKey);
|
|
40007
40114
|
if (ready) return ready;
|
|
40008
40115
|
if (!allowWrite) return;
|
|
40009
40116
|
const linkRoot = import_node_path55.default.join(scratch2, "link");
|
|
40010
|
-
|
|
40011
|
-
const
|
|
40012
|
-
(0, import_node_fs55.
|
|
40013
|
-
|
|
40014
|
-
|
|
40015
|
-
|
|
40016
|
-
const
|
|
40117
|
+
const manifest = import_node_path55.default.join(linkRoot, "Package.swift");
|
|
40118
|
+
const manifestStat = (0, import_node_fs55.statSync)(manifest, { bigint: true, throwIfNoEntry: false });
|
|
40119
|
+
const planStat = (0, import_node_fs55.statSync)(import_node_path55.default.join(scratch2, "release.yaml"), {
|
|
40120
|
+
bigint: true,
|
|
40121
|
+
throwIfNoEntry: false
|
|
40122
|
+
});
|
|
40123
|
+
const builtProducts = manifestStat && planStat ? [
|
|
40124
|
+
...(0, import_node_fs55.readFileSync)(manifest, "utf8").matchAll(
|
|
40125
|
+
/^\s*\.product\(name: "([^"]+)", package:/gm
|
|
40126
|
+
)
|
|
40127
|
+
].map((match) => match[1]) : [];
|
|
40128
|
+
const reusePlan = manifestStat && planStat && linkedTargets.products.every((product) => builtProducts.includes(product)) && readFrameworkProductsReceipt(
|
|
40017
40129
|
scratch2,
|
|
40018
|
-
|
|
40019
|
-
|
|
40020
|
-
|
|
40021
|
-
|
|
40022
|
-
|
|
40023
|
-
|
|
40024
|
-
|
|
40025
|
-
|
|
40026
|
-
|
|
40027
|
-
|
|
40028
|
-
|
|
40029
|
-
"native",
|
|
40030
|
-
"-j",
|
|
40031
|
-
String(targetJobs),
|
|
40032
|
-
"--package-path",
|
|
40033
|
-
linkRoot,
|
|
40034
|
-
"--scratch-path",
|
|
40130
|
+
receiptKeyFor(builtProducts),
|
|
40131
|
+
manifestStat.ctimeNs > planStat.ctimeNs ? manifestStat.ctimeNs : planStat.ctimeNs
|
|
40132
|
+
);
|
|
40133
|
+
if (!reusePlan) {
|
|
40134
|
+
writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
|
|
40135
|
+
const frameworkTmp = import_node_path55.default.join(scratch2, "peach-compiler-tmp");
|
|
40136
|
+
(0, import_node_fs55.mkdirSync)(frameworkTmp, { recursive: true });
|
|
40137
|
+
const jobs = swiftCompilerJobs();
|
|
40138
|
+
const targetJobs = jobs >= 4 ? 2 : 1;
|
|
40139
|
+
const driverJobs = Math.max(1, Math.floor(jobs / targetJobs));
|
|
40140
|
+
const cache = unoptimized ? null : prepareFrameworkCompileCache(
|
|
40035
40141
|
scratch2,
|
|
40036
|
-
|
|
40037
|
-
|
|
40038
|
-
|
|
40039
|
-
|
|
40040
|
-
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
|
|
40052
|
-
|
|
40053
|
-
|
|
40054
|
-
|
|
40055
|
-
|
|
40056
|
-
|
|
40057
|
-
|
|
40058
|
-
|
|
40059
|
-
|
|
40060
|
-
|
|
40061
|
-
|
|
40062
|
-
|
|
40063
|
-
"-g0",
|
|
40064
|
-
"-Xcxx",
|
|
40065
|
-
"-g0",
|
|
40066
|
-
"-Xswiftc",
|
|
40067
|
-
"-num-threads",
|
|
40068
|
-
"-Xswiftc",
|
|
40069
|
-
"1",
|
|
40070
|
-
...swiftReproducibleBuildFlags([
|
|
40071
|
-
[import_node_path55.default.dirname(args.toolchainBin), "toolchain"],
|
|
40072
|
-
[args.moduleRoot, "framework"],
|
|
40073
|
-
[scratch2, "framework-scratch"]
|
|
40074
|
-
]),
|
|
40075
|
-
...args.plugins.libraries.flatMap((plugin) => [
|
|
40142
|
+
args.moduleRoot,
|
|
40143
|
+
args.toolchainBin,
|
|
40144
|
+
sdkOptions,
|
|
40145
|
+
linkedTargets.products
|
|
40146
|
+
);
|
|
40147
|
+
await runCompiler(
|
|
40148
|
+
args.swift,
|
|
40149
|
+
[
|
|
40150
|
+
"build",
|
|
40151
|
+
...swiftPackageCacheOptions(),
|
|
40152
|
+
"--build-system",
|
|
40153
|
+
"native",
|
|
40154
|
+
"-j",
|
|
40155
|
+
String(targetJobs),
|
|
40156
|
+
"--package-path",
|
|
40157
|
+
linkRoot,
|
|
40158
|
+
"--scratch-path",
|
|
40159
|
+
scratch2,
|
|
40160
|
+
"--target",
|
|
40161
|
+
FRAMEWORK_LINK_TARGET,
|
|
40162
|
+
...sdkOptions,
|
|
40163
|
+
...selectorOptions,
|
|
40164
|
+
"--swift-sdk",
|
|
40165
|
+
args.sdk,
|
|
40166
|
+
"-c",
|
|
40167
|
+
"release",
|
|
40168
|
+
...cache ? ["-Xswiftc", "-driver-use-frontend-path", "-Xswiftc", cache.wrapper] : [],
|
|
40076
40169
|
"-Xswiftc",
|
|
40077
|
-
"-
|
|
40170
|
+
unoptimized ? "-Onone" : "-Osize",
|
|
40078
40171
|
"-Xswiftc",
|
|
40079
|
-
|
|
40080
|
-
|
|
40081
|
-
|
|
40172
|
+
"-no-whole-module-optimization",
|
|
40173
|
+
// optimized batches can move specialized definitions between object files.
|
|
40174
|
+
...unoptimized ? ["-Xswiftc", "-incremental"] : [],
|
|
40082
40175
|
"-Xswiftc",
|
|
40083
|
-
"-
|
|
40176
|
+
"-enable-batch-mode",
|
|
40177
|
+
// each batch repeats the same framework diagnostics.
|
|
40178
|
+
...unoptimized ? [] : ["-Xswiftc", "-suppress-warnings"],
|
|
40084
40179
|
"-Xswiftc",
|
|
40085
|
-
|
|
40086
|
-
|
|
40087
|
-
|
|
40088
|
-
|
|
40089
|
-
|
|
40090
|
-
|
|
40091
|
-
|
|
40092
|
-
|
|
40093
|
-
|
|
40094
|
-
|
|
40095
|
-
|
|
40096
|
-
|
|
40097
|
-
|
|
40098
|
-
|
|
40099
|
-
|
|
40100
|
-
|
|
40101
|
-
|
|
40102
|
-
|
|
40180
|
+
"-j",
|
|
40181
|
+
"-Xswiftc",
|
|
40182
|
+
String(driverJobs),
|
|
40183
|
+
// the release link strips all debug info, so none is generated.
|
|
40184
|
+
"-Xswiftc",
|
|
40185
|
+
"-gnone",
|
|
40186
|
+
"-Xcc",
|
|
40187
|
+
"-g0",
|
|
40188
|
+
"-Xcxx",
|
|
40189
|
+
"-g0",
|
|
40190
|
+
"-Xswiftc",
|
|
40191
|
+
"-num-threads",
|
|
40192
|
+
"-Xswiftc",
|
|
40193
|
+
"1",
|
|
40194
|
+
...swiftReproducibleBuildFlags([
|
|
40195
|
+
[import_node_path55.default.dirname(args.toolchainBin), "toolchain"],
|
|
40196
|
+
[args.moduleRoot, "framework"],
|
|
40197
|
+
[scratch2, "framework-scratch"]
|
|
40198
|
+
]),
|
|
40199
|
+
...args.plugins.libraries.flatMap((plugin) => [
|
|
40200
|
+
"-Xswiftc",
|
|
40201
|
+
"-load-plugin-library",
|
|
40202
|
+
"-Xswiftc",
|
|
40203
|
+
plugin
|
|
40204
|
+
]),
|
|
40205
|
+
...args.plugins.executables.flatMap((plugin) => [
|
|
40206
|
+
"-Xswiftc",
|
|
40207
|
+
"-load-plugin-executable",
|
|
40208
|
+
"-Xswiftc",
|
|
40209
|
+
`${plugin}#ExpoModulesMacros`
|
|
40210
|
+
])
|
|
40211
|
+
],
|
|
40212
|
+
// swiftpm hashes TMPDIR into its plan; keep one stable compiler scratch inside the locked slot.
|
|
40213
|
+
// the framework build's warnings alone pass the default 1 MiB cap, which kills
|
|
40214
|
+
// the build one step from the end.
|
|
40215
|
+
{
|
|
40216
|
+
...args.buildOptions,
|
|
40217
|
+
temporaryDirectory: frameworkTmp,
|
|
40218
|
+
maxBuffer: 64 * 1024 * 1024
|
|
40219
|
+
},
|
|
40220
|
+
SWIFTPM_PROGRESS,
|
|
40221
|
+
SWIFTPM_NOISE
|
|
40222
|
+
).catch((error) => {
|
|
40223
|
+
throw new Error(outputOf(error), { cause: error });
|
|
40224
|
+
}).finally(() => {
|
|
40225
|
+
if (cache) reportFrameworkCompileCacheStats(scratch2, cache.statsFile);
|
|
40226
|
+
});
|
|
40227
|
+
}
|
|
40103
40228
|
const release = import_node_path55.default.join(scratch2, WASM_TRIPLE, "release");
|
|
40104
40229
|
const linked = frameworkLinkClosure(scratch2, linkedTargets.targets);
|
|
40105
40230
|
const objects = linked.objects;
|
|
@@ -41638,7 +41763,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
41638
41763
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
41639
41764
|
MULTI_MANIFEST_VERSION = 76;
|
|
41640
41765
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
41641
|
-
compilerSourceDigest = true ? "
|
|
41766
|
+
compilerSourceDigest = true ? "c83dc1b17f6e7fc01d5217313795b0276b66d9f33db641855c80c055d7d77edd" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
41642
41767
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
41643
41768
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
41644
41769
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -95780,7 +95905,7 @@ function addressImmediates(bytes) {
|
|
|
95780
95905
|
} else throw new Error(`sdk code has unknown instruction ${op.toString(16)}`);
|
|
95781
95906
|
}
|
|
95782
95907
|
};
|
|
95783
|
-
for (const section2 of
|
|
95908
|
+
for (const section2 of wasmSections(bytes)) {
|
|
95784
95909
|
at = section2.start;
|
|
95785
95910
|
if (section2.id === 6)
|
|
95786
95911
|
for (let n = u(); n > 0; n--) {
|
|
@@ -106573,7 +106698,7 @@ var init_nitro_superset = __esm({
|
|
|
106573
106698
|
init_nitroContract();
|
|
106574
106699
|
init_swift_standin_digest();
|
|
106575
106700
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
106576
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
106701
|
+
NITRO_COMPILER_DIGEST = true ? "880e684ade3a6398cfad03a94e2163815fcdc45e9f1be044e82a986570df5d2e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
106577
106702
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
106578
106703
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
106579
106704
|
published = /* @__PURE__ */ new Map();
|
|
@@ -107553,7 +107678,7 @@ var init_expo_eager_seam_contract = __esm({
|
|
|
107553
107678
|
|
|
107554
107679
|
// src/expo-native-compiler-digest.ts
|
|
107555
107680
|
function expoNativeCompilerDigestValue() {
|
|
107556
|
-
return true ? "
|
|
107681
|
+
return true ? "5e0423a14cd4a805f390c706e22f3074ba5a6fccf294d23bf6702b83379bff79" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
107557
107682
|
}
|
|
107558
107683
|
var import_node_crypto81;
|
|
107559
107684
|
var init_expo_native_compiler_digest = __esm({
|