@bytecodealliance/jco 0.10.3 → 0.11.1
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/README.md +15 -2
- package/lib/wasi_snapshot_preview1.command.wasm +0 -0
- package/lib/wasi_snapshot_preview1.reactor.wasm +0 -0
- package/obj/exports/local-wasm-tools-tools.d.ts +43 -0
- package/obj/{interfaces/environment.d.ts → exports/wasi-cli-environment.d.ts} +1 -1
- package/obj/{interfaces/exit.d.ts → exports/wasi-cli-exit.d.ts} +1 -1
- package/obj/exports/wasi-cli-stderr.d.ts +5 -0
- package/obj/exports/wasi-cli-stdin.d.ts +5 -0
- package/obj/exports/wasi-cli-stdout.d.ts +5 -0
- package/obj/exports/wasi-cli-terminal-input.d.ts +4 -0
- package/obj/exports/wasi-cli-terminal-output.d.ts +4 -0
- package/obj/exports/wasi-cli-terminal-stderr.d.ts +5 -0
- package/obj/exports/wasi-cli-terminal-stdin.d.ts +5 -0
- package/obj/exports/wasi-cli-terminal-stdout.d.ts +5 -0
- package/obj/exports/wasi-filesystem-preopens.d.ts +5 -0
- package/obj/{interfaces/filesystem.d.ts → exports/wasi-filesystem-types.d.ts} +17 -16
- package/obj/exports/wasi-io-streams.d.ts +18 -0
- package/obj/imports/{wasi-cli-base-environment.d.ts → wasi-cli-environment.d.ts} +1 -1
- package/obj/{interfaces/wasi-cli-base-exit.d.ts → imports/wasi-cli-exit.d.ts} +1 -1
- package/obj/imports/{wasi-cli-base-stderr.d.ts → wasi-cli-stderr.d.ts} +1 -1
- package/obj/imports/{wasi-cli-base-stdin.d.ts → wasi-cli-stdin.d.ts} +1 -1
- package/obj/imports/{wasi-cli-base-stdout.d.ts → wasi-cli-stdout.d.ts} +1 -1
- package/obj/imports/wasi-cli-terminal-input.d.ts +4 -0
- package/obj/imports/wasi-cli-terminal-output.d.ts +4 -0
- package/obj/imports/wasi-cli-terminal-stderr.d.ts +5 -0
- package/obj/imports/wasi-cli-terminal-stdin.d.ts +5 -0
- package/obj/imports/wasi-cli-terminal-stdout.d.ts +5 -0
- package/obj/imports/wasi-filesystem-preopens.d.ts +5 -0
- package/obj/imports/{wasi-filesystem-filesystem.d.ts → wasi-filesystem-types.d.ts} +14 -13
- package/obj/imports/wasi-io-streams.d.ts +6 -9
- package/obj/js-component-bindgen-component.component.wasm +0 -0
- package/obj/js-component-bindgen-component.core.wasm +0 -0
- package/obj/js-component-bindgen-component.core2.wasm +0 -0
- package/obj/js-component-bindgen-component.d.ts +12 -7
- package/obj/js-component-bindgen-component.js +365 -117
- package/obj/wasm-tools.component.wasm +0 -0
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.core2.wasm +0 -0
- package/obj/wasm-tools.d.ts +14 -48
- package/obj/wasm-tools.js +386 -127
- package/package.json +7 -4
- package/src/api.js +2 -1
- package/src/browser.js +3 -0
- package/src/cmd/opt.js +2 -1
- package/src/cmd/run.js +103 -0
- package/src/cmd/transpile.js +4 -3
- package/src/cmd/wasm-tools.js +10 -3
- package/src/jco.js +11 -1
- package/obj/imports/wasi-cli-base-exit.d.ts +0 -4
- package/obj/imports/wasi-cli-base-preopens.d.ts +0 -5
- package/obj/interfaces/preopens.d.ts +0 -5
- package/obj/interfaces/random.d.ts +0 -3
- package/obj/interfaces/stderr.d.ts +0 -5
- package/obj/interfaces/stdin.d.ts +0 -5
- package/obj/interfaces/stdout.d.ts +0 -5
- package/obj/interfaces/streams.d.ts +0 -21
- package/obj/interfaces/wall-clock.d.ts +0 -6
- package/obj/interfaces/wasi-cli-base-environment.d.ts +0 -3
- package/obj/interfaces/wasi-cli-base-preopens.d.ts +0 -5
- package/obj/interfaces/wasi-cli-base-stderr.d.ts +0 -5
- package/obj/interfaces/wasi-cli-base-stdin.d.ts +0 -5
- package/obj/interfaces/wasi-cli-base-stdout.d.ts +0 -5
- package/obj/interfaces/wasi-filesystem-filesystem.d.ts +0 -152
- package/obj/interfaces/wasi-io-streams.d.ts +0 -21
- /package/obj/{interfaces → exports}/wasi-clocks-wall-clock.d.ts +0 -0
- /package/obj/{interfaces → exports}/wasi-random-random.d.ts +0 -0
package/obj/wasm-tools.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import { environment, exit as exit$1,
|
|
2
|
-
import {
|
|
1
|
+
import { environment, exit as exit$1, stderr, stdin, stdout, terminalInput, terminalOutput, terminalStderr, terminalStdin, terminalStdout } from '@bytecodealliance/preview2-shim/cli';
|
|
2
|
+
import { preopens, types } from '@bytecodealliance/preview2-shim/filesystem';
|
|
3
3
|
import { streams } from '@bytecodealliance/preview2-shim/io';
|
|
4
4
|
import { random } from '@bytecodealliance/preview2-shim/random';
|
|
5
5
|
const { getEnvironment } = environment;
|
|
6
6
|
const { exit } = exit$1;
|
|
7
|
-
const { getDirectories } = preopens;
|
|
8
7
|
const { getStderr } = stderr;
|
|
9
8
|
const { getStdin } = stdin;
|
|
10
9
|
const { getStdout } = stdout;
|
|
10
|
+
const { dropTerminalInput } = terminalInput;
|
|
11
|
+
const { dropTerminalOutput } = terminalOutput;
|
|
12
|
+
const { getTerminalStderr } = terminalStderr;
|
|
13
|
+
const { getTerminalStdin } = terminalStdin;
|
|
14
|
+
const { getTerminalStdout } = terminalStdout;
|
|
15
|
+
const { getDirectories } = preopens;
|
|
11
16
|
const { appendViaStream,
|
|
12
17
|
dropDescriptor,
|
|
13
18
|
dropDirectoryEntryStream,
|
|
14
19
|
getType,
|
|
20
|
+
metadataHash,
|
|
15
21
|
openAt,
|
|
16
22
|
readViaStream,
|
|
17
23
|
stat,
|
|
18
|
-
writeViaStream } =
|
|
24
|
+
writeViaStream } = types;
|
|
19
25
|
const { blockingRead,
|
|
20
26
|
blockingWrite,
|
|
21
27
|
dropInputStream,
|
|
@@ -120,17 +126,25 @@ function trampoline4() {
|
|
|
120
126
|
return toUint32(ret);
|
|
121
127
|
}
|
|
122
128
|
|
|
123
|
-
function trampoline5() {
|
|
129
|
+
function trampoline5(arg0) {
|
|
130
|
+
dropTerminalInput(arg0 >>> 0);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function trampoline6() {
|
|
124
134
|
const ret = getStdout();
|
|
125
135
|
return toUint32(ret);
|
|
126
136
|
}
|
|
127
137
|
|
|
128
|
-
function
|
|
138
|
+
function trampoline7(arg0) {
|
|
139
|
+
dropTerminalOutput(arg0 >>> 0);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function trampoline8() {
|
|
129
143
|
const ret = getStderr();
|
|
130
144
|
return toUint32(ret);
|
|
131
145
|
}
|
|
132
146
|
|
|
133
|
-
function
|
|
147
|
+
function trampoline9(arg0) {
|
|
134
148
|
let variant0;
|
|
135
149
|
switch (arg0) {
|
|
136
150
|
case 0: {
|
|
@@ -155,7 +169,7 @@ function trampoline7(arg0) {
|
|
|
155
169
|
}
|
|
156
170
|
let exports2;
|
|
157
171
|
|
|
158
|
-
function
|
|
172
|
+
function trampoline10(arg0) {
|
|
159
173
|
const ret = getDirectories();
|
|
160
174
|
const vec2 = ret;
|
|
161
175
|
const len2 = vec2.length;
|
|
@@ -175,7 +189,7 @@ function trampoline8(arg0) {
|
|
|
175
189
|
let memory0;
|
|
176
190
|
let realloc0;
|
|
177
191
|
|
|
178
|
-
function
|
|
192
|
+
function trampoline11(arg0, arg1, arg2) {
|
|
179
193
|
let ret;
|
|
180
194
|
try {
|
|
181
195
|
ret = { tag: 'ok', val: readViaStream(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
@@ -361,7 +375,7 @@ function trampoline9(arg0, arg1, arg2) {
|
|
|
361
375
|
}
|
|
362
376
|
}
|
|
363
377
|
|
|
364
|
-
function
|
|
378
|
+
function trampoline12(arg0, arg1, arg2) {
|
|
365
379
|
let ret;
|
|
366
380
|
try {
|
|
367
381
|
ret = { tag: 'ok', val: writeViaStream(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
@@ -547,7 +561,7 @@ function trampoline10(arg0, arg1, arg2) {
|
|
|
547
561
|
}
|
|
548
562
|
}
|
|
549
563
|
|
|
550
|
-
function
|
|
564
|
+
function trampoline13(arg0, arg1) {
|
|
551
565
|
let ret;
|
|
552
566
|
try {
|
|
553
567
|
ret = { tag: 'ok', val: appendViaStream(arg0 >>> 0) };
|
|
@@ -733,7 +747,7 @@ function trampoline11(arg0, arg1) {
|
|
|
733
747
|
}
|
|
734
748
|
}
|
|
735
749
|
|
|
736
|
-
function
|
|
750
|
+
function trampoline14(arg0, arg1) {
|
|
737
751
|
let ret;
|
|
738
752
|
try {
|
|
739
753
|
ret = { tag: 'ok', val: getType(arg0 >>> 0) };
|
|
@@ -962,7 +976,7 @@ function trampoline12(arg0, arg1) {
|
|
|
962
976
|
}
|
|
963
977
|
}
|
|
964
978
|
|
|
965
|
-
function
|
|
979
|
+
function trampoline15(arg0, arg1) {
|
|
966
980
|
let ret;
|
|
967
981
|
try {
|
|
968
982
|
ret = { tag: 'ok', val: stat(arg0 >>> 0) };
|
|
@@ -974,10 +988,8 @@ function trampoline13(arg0, arg1) {
|
|
|
974
988
|
case 'ok': {
|
|
975
989
|
const e = variant6.val;
|
|
976
990
|
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
977
|
-
const {
|
|
978
|
-
|
|
979
|
-
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true);
|
|
980
|
-
const val1 = v0_2;
|
|
991
|
+
const {type: v0_0, linkCount: v0_1, size: v0_2, dataAccessTimestamp: v0_3, dataModificationTimestamp: v0_4, statusChangeTimestamp: v0_5 } = e;
|
|
992
|
+
const val1 = v0_0;
|
|
981
993
|
let enum1;
|
|
982
994
|
switch (val1) {
|
|
983
995
|
case 'unknown': {
|
|
@@ -1013,25 +1025,25 @@ function trampoline13(arg0, arg1) {
|
|
|
1013
1025
|
break;
|
|
1014
1026
|
}
|
|
1015
1027
|
default: {
|
|
1016
|
-
if ((
|
|
1017
|
-
console.error(
|
|
1028
|
+
if ((v0_0) instanceof Error) {
|
|
1029
|
+
console.error(v0_0);
|
|
1018
1030
|
}
|
|
1019
1031
|
|
|
1020
1032
|
throw new TypeError(`"${val1}" is not one of the cases of descriptor-type`);
|
|
1021
1033
|
}
|
|
1022
1034
|
}
|
|
1023
|
-
dataView(memory0).setInt8(arg1 +
|
|
1024
|
-
dataView(memory0).setBigInt64(arg1 +
|
|
1025
|
-
dataView(memory0).setBigInt64(arg1 +
|
|
1026
|
-
const {seconds: v2_0, nanoseconds: v2_1 } =
|
|
1027
|
-
dataView(memory0).setBigInt64(arg1 +
|
|
1028
|
-
dataView(memory0).setInt32(arg1 +
|
|
1029
|
-
const {seconds: v3_0, nanoseconds: v3_1 } =
|
|
1030
|
-
dataView(memory0).setBigInt64(arg1 +
|
|
1031
|
-
dataView(memory0).setInt32(arg1 +
|
|
1032
|
-
const {seconds: v4_0, nanoseconds: v4_1 } =
|
|
1033
|
-
dataView(memory0).setBigInt64(arg1 +
|
|
1034
|
-
dataView(memory0).setInt32(arg1 +
|
|
1035
|
+
dataView(memory0).setInt8(arg1 + 8, enum1, true);
|
|
1036
|
+
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true);
|
|
1037
|
+
dataView(memory0).setBigInt64(arg1 + 24, toUint64(v0_2), true);
|
|
1038
|
+
const {seconds: v2_0, nanoseconds: v2_1 } = v0_3;
|
|
1039
|
+
dataView(memory0).setBigInt64(arg1 + 32, toUint64(v2_0), true);
|
|
1040
|
+
dataView(memory0).setInt32(arg1 + 40, toUint32(v2_1), true);
|
|
1041
|
+
const {seconds: v3_0, nanoseconds: v3_1 } = v0_4;
|
|
1042
|
+
dataView(memory0).setBigInt64(arg1 + 48, toUint64(v3_0), true);
|
|
1043
|
+
dataView(memory0).setInt32(arg1 + 56, toUint32(v3_1), true);
|
|
1044
|
+
const {seconds: v4_0, nanoseconds: v4_1 } = v0_5;
|
|
1045
|
+
dataView(memory0).setBigInt64(arg1 + 64, toUint64(v4_0), true);
|
|
1046
|
+
dataView(memory0).setInt32(arg1 + 72, toUint32(v4_1), true);
|
|
1035
1047
|
break;
|
|
1036
1048
|
}
|
|
1037
1049
|
case 'err': {
|
|
@@ -1205,7 +1217,7 @@ function trampoline13(arg0, arg1) {
|
|
|
1205
1217
|
}
|
|
1206
1218
|
}
|
|
1207
1219
|
|
|
1208
|
-
function
|
|
1220
|
+
function trampoline16(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
1209
1221
|
if ((arg1 & 4294967294) !== 0) {
|
|
1210
1222
|
throw new TypeError('flags have extraneous bits set');
|
|
1211
1223
|
}
|
|
@@ -1428,7 +1440,195 @@ function trampoline14(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
|
1428
1440
|
}
|
|
1429
1441
|
}
|
|
1430
1442
|
|
|
1431
|
-
function
|
|
1443
|
+
function trampoline17(arg0, arg1) {
|
|
1444
|
+
let ret;
|
|
1445
|
+
try {
|
|
1446
|
+
ret = { tag: 'ok', val: metadataHash(arg0 >>> 0) };
|
|
1447
|
+
} catch (e) {
|
|
1448
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1449
|
+
}
|
|
1450
|
+
const variant2 = ret;
|
|
1451
|
+
switch (variant2.tag) {
|
|
1452
|
+
case 'ok': {
|
|
1453
|
+
const e = variant2.val;
|
|
1454
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
1455
|
+
const {lower: v0_0, upper: v0_1 } = e;
|
|
1456
|
+
dataView(memory0).setBigInt64(arg1 + 8, toUint64(v0_0), true);
|
|
1457
|
+
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true);
|
|
1458
|
+
break;
|
|
1459
|
+
}
|
|
1460
|
+
case 'err': {
|
|
1461
|
+
const e = variant2.val;
|
|
1462
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
1463
|
+
const val1 = e;
|
|
1464
|
+
let enum1;
|
|
1465
|
+
switch (val1) {
|
|
1466
|
+
case 'access': {
|
|
1467
|
+
enum1 = 0;
|
|
1468
|
+
break;
|
|
1469
|
+
}
|
|
1470
|
+
case 'would-block': {
|
|
1471
|
+
enum1 = 1;
|
|
1472
|
+
break;
|
|
1473
|
+
}
|
|
1474
|
+
case 'already': {
|
|
1475
|
+
enum1 = 2;
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
case 'bad-descriptor': {
|
|
1479
|
+
enum1 = 3;
|
|
1480
|
+
break;
|
|
1481
|
+
}
|
|
1482
|
+
case 'busy': {
|
|
1483
|
+
enum1 = 4;
|
|
1484
|
+
break;
|
|
1485
|
+
}
|
|
1486
|
+
case 'deadlock': {
|
|
1487
|
+
enum1 = 5;
|
|
1488
|
+
break;
|
|
1489
|
+
}
|
|
1490
|
+
case 'quota': {
|
|
1491
|
+
enum1 = 6;
|
|
1492
|
+
break;
|
|
1493
|
+
}
|
|
1494
|
+
case 'exist': {
|
|
1495
|
+
enum1 = 7;
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
case 'file-too-large': {
|
|
1499
|
+
enum1 = 8;
|
|
1500
|
+
break;
|
|
1501
|
+
}
|
|
1502
|
+
case 'illegal-byte-sequence': {
|
|
1503
|
+
enum1 = 9;
|
|
1504
|
+
break;
|
|
1505
|
+
}
|
|
1506
|
+
case 'in-progress': {
|
|
1507
|
+
enum1 = 10;
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
case 'interrupted': {
|
|
1511
|
+
enum1 = 11;
|
|
1512
|
+
break;
|
|
1513
|
+
}
|
|
1514
|
+
case 'invalid': {
|
|
1515
|
+
enum1 = 12;
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1518
|
+
case 'io': {
|
|
1519
|
+
enum1 = 13;
|
|
1520
|
+
break;
|
|
1521
|
+
}
|
|
1522
|
+
case 'is-directory': {
|
|
1523
|
+
enum1 = 14;
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
case 'loop': {
|
|
1527
|
+
enum1 = 15;
|
|
1528
|
+
break;
|
|
1529
|
+
}
|
|
1530
|
+
case 'too-many-links': {
|
|
1531
|
+
enum1 = 16;
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
case 'message-size': {
|
|
1535
|
+
enum1 = 17;
|
|
1536
|
+
break;
|
|
1537
|
+
}
|
|
1538
|
+
case 'name-too-long': {
|
|
1539
|
+
enum1 = 18;
|
|
1540
|
+
break;
|
|
1541
|
+
}
|
|
1542
|
+
case 'no-device': {
|
|
1543
|
+
enum1 = 19;
|
|
1544
|
+
break;
|
|
1545
|
+
}
|
|
1546
|
+
case 'no-entry': {
|
|
1547
|
+
enum1 = 20;
|
|
1548
|
+
break;
|
|
1549
|
+
}
|
|
1550
|
+
case 'no-lock': {
|
|
1551
|
+
enum1 = 21;
|
|
1552
|
+
break;
|
|
1553
|
+
}
|
|
1554
|
+
case 'insufficient-memory': {
|
|
1555
|
+
enum1 = 22;
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
case 'insufficient-space': {
|
|
1559
|
+
enum1 = 23;
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
case 'not-directory': {
|
|
1563
|
+
enum1 = 24;
|
|
1564
|
+
break;
|
|
1565
|
+
}
|
|
1566
|
+
case 'not-empty': {
|
|
1567
|
+
enum1 = 25;
|
|
1568
|
+
break;
|
|
1569
|
+
}
|
|
1570
|
+
case 'not-recoverable': {
|
|
1571
|
+
enum1 = 26;
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
case 'unsupported': {
|
|
1575
|
+
enum1 = 27;
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
case 'no-tty': {
|
|
1579
|
+
enum1 = 28;
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
case 'no-such-device': {
|
|
1583
|
+
enum1 = 29;
|
|
1584
|
+
break;
|
|
1585
|
+
}
|
|
1586
|
+
case 'overflow': {
|
|
1587
|
+
enum1 = 30;
|
|
1588
|
+
break;
|
|
1589
|
+
}
|
|
1590
|
+
case 'not-permitted': {
|
|
1591
|
+
enum1 = 31;
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
case 'pipe': {
|
|
1595
|
+
enum1 = 32;
|
|
1596
|
+
break;
|
|
1597
|
+
}
|
|
1598
|
+
case 'read-only': {
|
|
1599
|
+
enum1 = 33;
|
|
1600
|
+
break;
|
|
1601
|
+
}
|
|
1602
|
+
case 'invalid-seek': {
|
|
1603
|
+
enum1 = 34;
|
|
1604
|
+
break;
|
|
1605
|
+
}
|
|
1606
|
+
case 'text-file-busy': {
|
|
1607
|
+
enum1 = 35;
|
|
1608
|
+
break;
|
|
1609
|
+
}
|
|
1610
|
+
case 'cross-device': {
|
|
1611
|
+
enum1 = 36;
|
|
1612
|
+
break;
|
|
1613
|
+
}
|
|
1614
|
+
default: {
|
|
1615
|
+
if ((e) instanceof Error) {
|
|
1616
|
+
console.error(e);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
throw new TypeError(`"${val1}" is not one of the cases of error-code`);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
dataView(memory0).setInt8(arg1 + 8, enum1, true);
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
default: {
|
|
1626
|
+
throw new TypeError('invalid variant specified for result');
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
function trampoline18(arg0, arg1) {
|
|
1432
1632
|
const ret = getRandomBytes(BigInt.asUintN(64, arg0));
|
|
1433
1633
|
const val0 = ret;
|
|
1434
1634
|
const len0 = val0.byteLength;
|
|
@@ -1439,7 +1639,7 @@ function trampoline15(arg0, arg1) {
|
|
|
1439
1639
|
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
1440
1640
|
}
|
|
1441
1641
|
|
|
1442
|
-
function
|
|
1642
|
+
function trampoline19(arg0) {
|
|
1443
1643
|
const ret = getEnvironment();
|
|
1444
1644
|
const vec3 = ret;
|
|
1445
1645
|
const len3 = vec3.length;
|
|
@@ -1460,17 +1660,17 @@ function trampoline16(arg0) {
|
|
|
1460
1660
|
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
1461
1661
|
}
|
|
1462
1662
|
|
|
1463
|
-
function
|
|
1663
|
+
function trampoline20(arg0, arg1, arg2) {
|
|
1464
1664
|
let ret;
|
|
1465
1665
|
try {
|
|
1466
1666
|
ret = { tag: 'ok', val: read(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
1467
1667
|
} catch (e) {
|
|
1468
1668
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1469
1669
|
}
|
|
1470
|
-
const
|
|
1471
|
-
switch (
|
|
1670
|
+
const variant3 = ret;
|
|
1671
|
+
switch (variant3.tag) {
|
|
1472
1672
|
case 'ok': {
|
|
1473
|
-
const e =
|
|
1673
|
+
const e = variant3.val;
|
|
1474
1674
|
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
1475
1675
|
const [tuple0_0, tuple0_1] = e;
|
|
1476
1676
|
const val1 = tuple0_0;
|
|
@@ -1503,10 +1703,8 @@ function trampoline17(arg0, arg1, arg2) {
|
|
|
1503
1703
|
break;
|
|
1504
1704
|
}
|
|
1505
1705
|
case 'err': {
|
|
1506
|
-
const e =
|
|
1706
|
+
const e = variant3.val;
|
|
1507
1707
|
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
1508
|
-
const {dummy: v3_0 } = e;
|
|
1509
|
-
dataView(memory0).setInt32(arg2 + 4, toUint32(v3_0), true);
|
|
1510
1708
|
break;
|
|
1511
1709
|
}
|
|
1512
1710
|
default: {
|
|
@@ -1515,17 +1713,17 @@ function trampoline17(arg0, arg1, arg2) {
|
|
|
1515
1713
|
}
|
|
1516
1714
|
}
|
|
1517
1715
|
|
|
1518
|
-
function
|
|
1716
|
+
function trampoline21(arg0, arg1, arg2) {
|
|
1519
1717
|
let ret;
|
|
1520
1718
|
try {
|
|
1521
1719
|
ret = { tag: 'ok', val: blockingRead(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
1522
1720
|
} catch (e) {
|
|
1523
1721
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1524
1722
|
}
|
|
1525
|
-
const
|
|
1526
|
-
switch (
|
|
1723
|
+
const variant3 = ret;
|
|
1724
|
+
switch (variant3.tag) {
|
|
1527
1725
|
case 'ok': {
|
|
1528
|
-
const e =
|
|
1726
|
+
const e = variant3.val;
|
|
1529
1727
|
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
1530
1728
|
const [tuple0_0, tuple0_1] = e;
|
|
1531
1729
|
const val1 = tuple0_0;
|
|
@@ -1558,10 +1756,8 @@ function trampoline18(arg0, arg1, arg2) {
|
|
|
1558
1756
|
break;
|
|
1559
1757
|
}
|
|
1560
1758
|
case 'err': {
|
|
1561
|
-
const e =
|
|
1759
|
+
const e = variant3.val;
|
|
1562
1760
|
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
1563
|
-
const {dummy: v3_0 } = e;
|
|
1564
|
-
dataView(memory0).setInt32(arg2 + 4, toUint32(v3_0), true);
|
|
1565
1761
|
break;
|
|
1566
1762
|
}
|
|
1567
1763
|
default: {
|
|
@@ -1570,7 +1766,7 @@ function trampoline18(arg0, arg1, arg2) {
|
|
|
1570
1766
|
}
|
|
1571
1767
|
}
|
|
1572
1768
|
|
|
1573
|
-
function
|
|
1769
|
+
function trampoline22(arg0, arg1, arg2, arg3) {
|
|
1574
1770
|
const ptr0 = arg1;
|
|
1575
1771
|
const len0 = arg2;
|
|
1576
1772
|
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
@@ -1580,10 +1776,10 @@ function trampoline19(arg0, arg1, arg2, arg3) {
|
|
|
1580
1776
|
} catch (e) {
|
|
1581
1777
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1582
1778
|
}
|
|
1583
|
-
const
|
|
1584
|
-
switch (
|
|
1779
|
+
const variant3 = ret;
|
|
1780
|
+
switch (variant3.tag) {
|
|
1585
1781
|
case 'ok': {
|
|
1586
|
-
const e =
|
|
1782
|
+
const e = variant3.val;
|
|
1587
1783
|
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
1588
1784
|
const [tuple1_0, tuple1_1] = e;
|
|
1589
1785
|
dataView(memory0).setBigInt64(arg3 + 8, toUint64(tuple1_0), true);
|
|
@@ -1610,10 +1806,8 @@ function trampoline19(arg0, arg1, arg2, arg3) {
|
|
|
1610
1806
|
break;
|
|
1611
1807
|
}
|
|
1612
1808
|
case 'err': {
|
|
1613
|
-
const e =
|
|
1809
|
+
const e = variant3.val;
|
|
1614
1810
|
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
1615
|
-
const {dummy: v3_0 } = e;
|
|
1616
|
-
dataView(memory0).setInt32(arg3 + 8, toUint32(v3_0), true);
|
|
1617
1811
|
break;
|
|
1618
1812
|
}
|
|
1619
1813
|
default: {
|
|
@@ -1622,7 +1816,7 @@ function trampoline19(arg0, arg1, arg2, arg3) {
|
|
|
1622
1816
|
}
|
|
1623
1817
|
}
|
|
1624
1818
|
|
|
1625
|
-
function
|
|
1819
|
+
function trampoline23(arg0, arg1, arg2, arg3) {
|
|
1626
1820
|
const ptr0 = arg1;
|
|
1627
1821
|
const len0 = arg2;
|
|
1628
1822
|
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
@@ -1632,10 +1826,10 @@ function trampoline20(arg0, arg1, arg2, arg3) {
|
|
|
1632
1826
|
} catch (e) {
|
|
1633
1827
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1634
1828
|
}
|
|
1635
|
-
const
|
|
1636
|
-
switch (
|
|
1829
|
+
const variant3 = ret;
|
|
1830
|
+
switch (variant3.tag) {
|
|
1637
1831
|
case 'ok': {
|
|
1638
|
-
const e =
|
|
1832
|
+
const e = variant3.val;
|
|
1639
1833
|
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
1640
1834
|
const [tuple1_0, tuple1_1] = e;
|
|
1641
1835
|
dataView(memory0).setBigInt64(arg3 + 8, toUint64(tuple1_0), true);
|
|
@@ -1662,10 +1856,8 @@ function trampoline20(arg0, arg1, arg2, arg3) {
|
|
|
1662
1856
|
break;
|
|
1663
1857
|
}
|
|
1664
1858
|
case 'err': {
|
|
1665
|
-
const e =
|
|
1859
|
+
const e = variant3.val;
|
|
1666
1860
|
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
1667
|
-
const {dummy: v3_0 } = e;
|
|
1668
|
-
dataView(memory0).setInt32(arg3 + 8, toUint32(v3_0), true);
|
|
1669
1861
|
break;
|
|
1670
1862
|
}
|
|
1671
1863
|
default: {
|
|
@@ -1673,6 +1865,42 @@ function trampoline20(arg0, arg1, arg2, arg3) {
|
|
|
1673
1865
|
}
|
|
1674
1866
|
}
|
|
1675
1867
|
}
|
|
1868
|
+
|
|
1869
|
+
function trampoline24(arg0) {
|
|
1870
|
+
const ret = getTerminalStdin();
|
|
1871
|
+
const variant0 = ret;
|
|
1872
|
+
if (variant0 === null || variant0=== undefined) {
|
|
1873
|
+
dataView(memory0).setInt8(arg0 + 0, 0, true);
|
|
1874
|
+
} else {
|
|
1875
|
+
const e = variant0;
|
|
1876
|
+
dataView(memory0).setInt8(arg0 + 0, 1, true);
|
|
1877
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
function trampoline25(arg0) {
|
|
1882
|
+
const ret = getTerminalStdout();
|
|
1883
|
+
const variant0 = ret;
|
|
1884
|
+
if (variant0 === null || variant0=== undefined) {
|
|
1885
|
+
dataView(memory0).setInt8(arg0 + 0, 0, true);
|
|
1886
|
+
} else {
|
|
1887
|
+
const e = variant0;
|
|
1888
|
+
dataView(memory0).setInt8(arg0 + 0, 1, true);
|
|
1889
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
function trampoline26(arg0) {
|
|
1894
|
+
const ret = getTerminalStderr();
|
|
1895
|
+
const variant0 = ret;
|
|
1896
|
+
if (variant0 === null || variant0=== undefined) {
|
|
1897
|
+
dataView(memory0).setInt8(arg0 + 0, 0, true);
|
|
1898
|
+
} else {
|
|
1899
|
+
const e = variant0;
|
|
1900
|
+
dataView(memory0).setInt8(arg0 + 0, 1, true);
|
|
1901
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true);
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1676
1904
|
let exports3;
|
|
1677
1905
|
let realloc1;
|
|
1678
1906
|
let postReturn0;
|
|
@@ -1682,7 +1910,7 @@ function parse(arg0) {
|
|
|
1682
1910
|
if (!_initialized) throwUninitialized();
|
|
1683
1911
|
const ptr0 = utf8Encode(arg0, realloc1, memory0);
|
|
1684
1912
|
const len0 = utf8EncodedLen;
|
|
1685
|
-
const ret = exports1
|
|
1913
|
+
const ret = exports1['local:wasm-tools/tools#parse'](ptr0, len0);
|
|
1686
1914
|
let variant3;
|
|
1687
1915
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
1688
1916
|
case 0: {
|
|
@@ -1723,7 +1951,7 @@ function print(arg0) {
|
|
|
1723
1951
|
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
1724
1952
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
1725
1953
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
1726
|
-
const ret = exports1
|
|
1954
|
+
const ret = exports1['local:wasm-tools/tools#print'](ptr0, len0);
|
|
1727
1955
|
let variant3;
|
|
1728
1956
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
1729
1957
|
case 0: {
|
|
@@ -1796,7 +2024,7 @@ function componentNew(arg0, arg1) {
|
|
|
1796
2024
|
variant5_1 = result4;
|
|
1797
2025
|
variant5_2 = len4;
|
|
1798
2026
|
}
|
|
1799
|
-
const ret = exports1['component-new'](ptr0, len0, variant5_0, variant5_1, variant5_2);
|
|
2027
|
+
const ret = exports1['local:wasm-tools/tools#component-new'](ptr0, len0, variant5_0, variant5_1, variant5_2);
|
|
1800
2028
|
let variant8;
|
|
1801
2029
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
1802
2030
|
case 0: {
|
|
@@ -1837,7 +2065,7 @@ function componentWit(arg0) {
|
|
|
1837
2065
|
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
1838
2066
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
1839
2067
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
1840
|
-
const ret = exports1['component-wit'](ptr0, len0);
|
|
2068
|
+
const ret = exports1['local:wasm-tools/tools#component-wit'](ptr0, len0);
|
|
1841
2069
|
let variant3;
|
|
1842
2070
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
1843
2071
|
case 0: {
|
|
@@ -1998,7 +2226,7 @@ function componentEmbed(arg0) {
|
|
|
1998
2226
|
dataView(memory0).setInt32(ptr0 + 60, len19, true);
|
|
1999
2227
|
dataView(memory0).setInt32(ptr0 + 56, result19, true);
|
|
2000
2228
|
}
|
|
2001
|
-
const ret = exports1['component-embed'](ptr0);
|
|
2229
|
+
const ret = exports1['local:wasm-tools/tools#component-embed'](ptr0);
|
|
2002
2230
|
let variant23;
|
|
2003
2231
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
2004
2232
|
case 0: {
|
|
@@ -2039,7 +2267,7 @@ function metadataShow(arg0) {
|
|
|
2039
2267
|
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
2040
2268
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
2041
2269
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
2042
|
-
const ret = exports1['metadata-show'](ptr0, len0);
|
|
2270
|
+
const ret = exports1['local:wasm-tools/tools#metadata-show'](ptr0, len0);
|
|
2043
2271
|
let variant11;
|
|
2044
2272
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
2045
2273
|
case 0: {
|
|
@@ -2176,7 +2404,7 @@ function metadataAdd(arg0, arg1) {
|
|
|
2176
2404
|
dataView(memory0).setInt32(base + 12, len6, true);
|
|
2177
2405
|
dataView(memory0).setInt32(base + 8, result6, true);
|
|
2178
2406
|
}
|
|
2179
|
-
const ret = exports1['metadata-add'](ptr0, len0, result7, len7);
|
|
2407
|
+
const ret = exports1['local:wasm-tools/tools#metadata-add'](ptr0, len0, result7, len7);
|
|
2180
2408
|
let variant10;
|
|
2181
2409
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
2182
2410
|
case 0: {
|
|
@@ -2214,24 +2442,25 @@ let _initialized = false;
|
|
|
2214
2442
|
export const $init = (async() => {
|
|
2215
2443
|
const module0 = fetchCompile(new URL('./wasm-tools.core.wasm', import.meta.url));
|
|
2216
2444
|
const module1 = fetchCompile(new URL('./wasm-tools.core2.wasm', import.meta.url));
|
|
2217
|
-
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/
|
|
2218
|
-
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/
|
|
2445
|
+
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwADHRwAAQECAgIDAgQAAQEFBQAAAAYHBwgGBgYJBgoLBAUBcAEcHAeOAR0BMAAAATEAAQEyAAIBMwADATQABAE1AAUBNgAGATcABwE4AAgBOQAJAjEwAAoCMTEACwIxMgAMAjEzAA0CMTQADgIxNQAPAjE2ABACMTcAEQIxOAASAjE5ABMCMjAAFAIyMQAVAjIyABYCMjMAFwIyNAAYAjI1ABkCMjYAGgIyNwAbCCRpbXBvcnRzAQAK9wIcCQAgAEEAEQAACw0AIAAgASACQQERAQALDQAgACABIAJBAhEBAAsLACAAIAFBAxECAAsLACAAIAFBBBECAAsLACAAIAFBBRECAAsXACAAIAEgAiADIAQgBSAGIAdBBhEDAAsLACAAIAFBBxECAAsLACAAIAFBCBEEAAsJACAAQQkRAAALDQAgACABIAJBChEBAAsNACAAIAEgAkELEQEACw8AIAAgASACIANBDBEFAAsPACAAIAEgAiADQQ0RBQALCQAgAEEOEQAACwkAIABBDxEAAAsJACAAQRARAAALCwAgACABQRERBgALDwAgACABIAIgA0ESEQcACw8AIAAgASACIANBExEHAAsZACAAIAEgAiADIAQgBSAGIAcgCEEUEQgACwsAIAAgAUEVEQYACwsAIAAgAUEWEQYACwsAIAAgAUEXEQYACwkAIABBGBEJAAsLACAAIAFBGREGAAsNACAAIAEgAkEaEQoACwkAIABBGxELAAsALglwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAYwLjE0LjAA7AkEbmFtZQATEndpdC1jb21wb25lbnQ6c2hpbQHPCRwAMWluZGlyZWN0LXdhc2k6ZmlsZXN5c3RlbS9wcmVvcGVucy1nZXQtZGlyZWN0b3JpZXMBLmluZGlyZWN0LXdhc2k6ZmlsZXN5c3RlbS90eXBlcy1yZWFkLXZpYS1zdHJlYW0CL2luZGlyZWN0LXdhc2k6ZmlsZXN5c3RlbS90eXBlcy13cml0ZS12aWEtc3RyZWFtAzBpbmRpcmVjdC13YXNpOmZpbGVzeXN0ZW0vdHlwZXMtYXBwZW5kLXZpYS1zdHJlYW0EJ2luZGlyZWN0LXdhc2k6ZmlsZXN5c3RlbS90eXBlcy1nZXQtdHlwZQUjaW5kaXJlY3Qtd2FzaTpmaWxlc3lzdGVtL3R5cGVzLXN0YXQGJmluZGlyZWN0LXdhc2k6ZmlsZXN5c3RlbS90eXBlcy1vcGVuLWF0ByxpbmRpcmVjdC13YXNpOmZpbGVzeXN0ZW0vdHlwZXMtbWV0YWRhdGEtaGFzaAgsaW5kaXJlY3Qtd2FzaTpyYW5kb20vcmFuZG9tLWdldC1yYW5kb20tYnl0ZXMJLWluZGlyZWN0LXdhc2k6Y2xpL2Vudmlyb25tZW50LWdldC1lbnZpcm9ubWVudAodaW5kaXJlY3Qtd2FzaTppby9zdHJlYW1zLXJlYWQLJmluZGlyZWN0LXdhc2k6aW8vc3RyZWFtcy1ibG9ja2luZy1yZWFkDB5pbmRpcmVjdC13YXNpOmlvL3N0cmVhbXMtd3JpdGUNJ2luZGlyZWN0LXdhc2k6aW8vc3RyZWFtcy1ibG9ja2luZy13cml0ZQ4zaW5kaXJlY3Qtd2FzaTpjbGkvdGVybWluYWwtc3RkaW4tZ2V0LXRlcm1pbmFsLXN0ZGluDzVpbmRpcmVjdC13YXNpOmNsaS90ZXJtaW5hbC1zdGRvdXQtZ2V0LXRlcm1pbmFsLXN0ZG91dBA1aW5kaXJlY3Qtd2FzaTpjbGkvdGVybWluYWwtc3RkZXJyLWdldC10ZXJtaW5hbC1zdGRlcnIRLGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfZmlsZXN0YXRfZ2V0EiRhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3JlYWQTJWFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfd3JpdGUUJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcGF0aF9vcGVuFSdhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXJhbmRvbV9nZXQWKGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9nZXQXLmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9zaXplc19nZXQYJWFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfY2xvc2UZK2FkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9nZXQaMGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9kaXJfbmFtZRsmYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1wcm9jX2V4aXQ');
|
|
2446
|
+
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwACrgEdAAEwAAAAATEAAQABMgABAAEzAAIAATQAAgABNQACAAE2AAMAATcAAgABOAAEAAE5AAAAAjEwAAEAAjExAAEAAjEyAAUAAjEzAAUAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAYAAjE4AAcAAjE5AAcAAjIwAAgAAjIxAAYAAjIyAAYAAjIzAAYAAjI0AAkAAjI1AAYAAjI2AAoAAjI3AAsACCRpbXBvcnRzAXABHBwJIgEAQQALHAABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhsALglwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAYwLjE0LjAAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM');
|
|
2219
2447
|
const instanceFlags0 = new WebAssembly.Global({ value: "i32", mutable: true }, 3);
|
|
2448
|
+
const instanceFlags1 = new WebAssembly.Global({ value: "i32", mutable: true }, 3);
|
|
2220
2449
|
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
2221
2450
|
({ exports: exports0 } = await instantiateCore(await module2));
|
|
2222
2451
|
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
2223
2452
|
wasi_snapshot_preview1: {
|
|
2224
|
-
environ_get: exports0['
|
|
2225
|
-
environ_sizes_get: exports0['
|
|
2226
|
-
fd_close: exports0['
|
|
2227
|
-
fd_filestat_get: exports0['
|
|
2228
|
-
fd_prestat_dir_name: exports0['
|
|
2229
|
-
fd_prestat_get: exports0['
|
|
2230
|
-
fd_read: exports0['
|
|
2231
|
-
fd_write: exports0['
|
|
2232
|
-
path_open: exports0['
|
|
2233
|
-
proc_exit: exports0['
|
|
2234
|
-
random_get: exports0['
|
|
2453
|
+
environ_get: exports0['22'],
|
|
2454
|
+
environ_sizes_get: exports0['23'],
|
|
2455
|
+
fd_close: exports0['24'],
|
|
2456
|
+
fd_filestat_get: exports0['17'],
|
|
2457
|
+
fd_prestat_dir_name: exports0['26'],
|
|
2458
|
+
fd_prestat_get: exports0['25'],
|
|
2459
|
+
fd_read: exports0['18'],
|
|
2460
|
+
fd_write: exports0['19'],
|
|
2461
|
+
path_open: exports0['20'],
|
|
2462
|
+
proc_exit: exports0['27'],
|
|
2463
|
+
random_get: exports0['21'],
|
|
2235
2464
|
},
|
|
2236
2465
|
}));
|
|
2237
2466
|
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
@@ -2241,44 +2470,60 @@ export const $init = (async() => {
|
|
|
2241
2470
|
env: {
|
|
2242
2471
|
memory: exports1.memory,
|
|
2243
2472
|
},
|
|
2244
|
-
'wasi:cli
|
|
2245
|
-
'get-environment': exports0['
|
|
2473
|
+
'wasi:cli/environment': {
|
|
2474
|
+
'get-environment': exports0['9'],
|
|
2246
2475
|
},
|
|
2247
|
-
'wasi:cli
|
|
2248
|
-
exit:
|
|
2476
|
+
'wasi:cli/exit': {
|
|
2477
|
+
exit: trampoline9,
|
|
2249
2478
|
},
|
|
2250
|
-
'wasi:cli
|
|
2251
|
-
'get-
|
|
2252
|
-
},
|
|
2253
|
-
'wasi:cli-base/stderr': {
|
|
2254
|
-
'get-stderr': trampoline6,
|
|
2479
|
+
'wasi:cli/stderr': {
|
|
2480
|
+
'get-stderr': trampoline8,
|
|
2255
2481
|
},
|
|
2256
|
-
'wasi:cli
|
|
2482
|
+
'wasi:cli/stdin': {
|
|
2257
2483
|
'get-stdin': trampoline4,
|
|
2258
2484
|
},
|
|
2259
|
-
'wasi:cli
|
|
2260
|
-
'get-stdout':
|
|
2485
|
+
'wasi:cli/stdout': {
|
|
2486
|
+
'get-stdout': trampoline6,
|
|
2487
|
+
},
|
|
2488
|
+
'wasi:cli/terminal-input': {
|
|
2489
|
+
'drop-terminal-input': trampoline5,
|
|
2490
|
+
},
|
|
2491
|
+
'wasi:cli/terminal-output': {
|
|
2492
|
+
'drop-terminal-output': trampoline7,
|
|
2493
|
+
},
|
|
2494
|
+
'wasi:cli/terminal-stderr': {
|
|
2495
|
+
'get-terminal-stderr': exports0['16'],
|
|
2496
|
+
},
|
|
2497
|
+
'wasi:cli/terminal-stdin': {
|
|
2498
|
+
'get-terminal-stdin': exports0['14'],
|
|
2499
|
+
},
|
|
2500
|
+
'wasi:cli/terminal-stdout': {
|
|
2501
|
+
'get-terminal-stdout': exports0['15'],
|
|
2502
|
+
},
|
|
2503
|
+
'wasi:filesystem/preopens': {
|
|
2504
|
+
'get-directories': exports0['0'],
|
|
2261
2505
|
},
|
|
2262
|
-
'wasi:filesystem/
|
|
2506
|
+
'wasi:filesystem/types': {
|
|
2263
2507
|
'append-via-stream': exports0['3'],
|
|
2264
2508
|
'drop-descriptor': trampoline3,
|
|
2265
2509
|
'drop-directory-entry-stream': trampoline0,
|
|
2266
2510
|
'get-type': exports0['4'],
|
|
2511
|
+
'metadata-hash': exports0['7'],
|
|
2267
2512
|
'open-at': exports0['6'],
|
|
2268
2513
|
'read-via-stream': exports0['1'],
|
|
2269
2514
|
stat: exports0['5'],
|
|
2270
2515
|
'write-via-stream': exports0['2'],
|
|
2271
2516
|
},
|
|
2272
2517
|
'wasi:io/streams': {
|
|
2273
|
-
'blocking-read': exports0['
|
|
2274
|
-
'blocking-write': exports0['
|
|
2518
|
+
'blocking-read': exports0['11'],
|
|
2519
|
+
'blocking-write': exports0['13'],
|
|
2275
2520
|
'drop-input-stream': trampoline1,
|
|
2276
2521
|
'drop-output-stream': trampoline2,
|
|
2277
|
-
read: exports0['
|
|
2278
|
-
write: exports0['
|
|
2522
|
+
read: exports0['10'],
|
|
2523
|
+
write: exports0['12'],
|
|
2279
2524
|
},
|
|
2280
2525
|
'wasi:random/random': {
|
|
2281
|
-
'get-random-bytes': exports0['
|
|
2526
|
+
'get-random-bytes': exports0['8'],
|
|
2282
2527
|
},
|
|
2283
2528
|
}));
|
|
2284
2529
|
memory0 = exports1.memory;
|
|
@@ -2286,36 +2531,50 @@ export const $init = (async() => {
|
|
|
2286
2531
|
({ exports: exports3 } = await instantiateCore(await module3, {
|
|
2287
2532
|
'': {
|
|
2288
2533
|
$imports: exports0.$imports,
|
|
2289
|
-
'0':
|
|
2290
|
-
'1':
|
|
2291
|
-
'10':
|
|
2292
|
-
'11':
|
|
2293
|
-
'12':
|
|
2294
|
-
'13':
|
|
2295
|
-
'14':
|
|
2296
|
-
'15':
|
|
2297
|
-
'16':
|
|
2298
|
-
'17': exports2.
|
|
2299
|
-
'18': exports2.
|
|
2300
|
-
'19': exports2.
|
|
2301
|
-
'2':
|
|
2302
|
-
'20': exports2.
|
|
2303
|
-
'21': exports2.
|
|
2304
|
-
'22': exports2.
|
|
2305
|
-
'23': exports2.
|
|
2306
|
-
'
|
|
2307
|
-
'
|
|
2308
|
-
'
|
|
2309
|
-
'
|
|
2310
|
-
'
|
|
2311
|
-
'
|
|
2312
|
-
'
|
|
2534
|
+
'0': trampoline10,
|
|
2535
|
+
'1': trampoline11,
|
|
2536
|
+
'10': trampoline20,
|
|
2537
|
+
'11': trampoline21,
|
|
2538
|
+
'12': trampoline22,
|
|
2539
|
+
'13': trampoline23,
|
|
2540
|
+
'14': trampoline24,
|
|
2541
|
+
'15': trampoline25,
|
|
2542
|
+
'16': trampoline26,
|
|
2543
|
+
'17': exports2.fd_filestat_get,
|
|
2544
|
+
'18': exports2.fd_read,
|
|
2545
|
+
'19': exports2.fd_write,
|
|
2546
|
+
'2': trampoline12,
|
|
2547
|
+
'20': exports2.path_open,
|
|
2548
|
+
'21': exports2.random_get,
|
|
2549
|
+
'22': exports2.environ_get,
|
|
2550
|
+
'23': exports2.environ_sizes_get,
|
|
2551
|
+
'24': exports2.fd_close,
|
|
2552
|
+
'25': exports2.fd_prestat_get,
|
|
2553
|
+
'26': exports2.fd_prestat_dir_name,
|
|
2554
|
+
'27': exports2.proc_exit,
|
|
2555
|
+
'3': trampoline13,
|
|
2556
|
+
'4': trampoline14,
|
|
2557
|
+
'5': trampoline15,
|
|
2558
|
+
'6': trampoline16,
|
|
2559
|
+
'7': trampoline17,
|
|
2560
|
+
'8': trampoline18,
|
|
2561
|
+
'9': trampoline19,
|
|
2313
2562
|
},
|
|
2314
2563
|
}));
|
|
2315
2564
|
realloc1 = exports1.cabi_realloc;
|
|
2316
|
-
postReturn0 = exports1['
|
|
2317
|
-
postReturn1 = exports1['
|
|
2565
|
+
postReturn0 = exports1['cabi_post_local:wasm-tools/tools#component-embed'];
|
|
2566
|
+
postReturn1 = exports1['cabi_post_local:wasm-tools/tools#metadata-show'];
|
|
2318
2567
|
_initialized = true;
|
|
2319
2568
|
})();
|
|
2569
|
+
const tools = {
|
|
2570
|
+
componentEmbed: componentEmbed,
|
|
2571
|
+
componentNew: componentNew,
|
|
2572
|
+
componentWit: componentWit,
|
|
2573
|
+
metadataAdd: metadataAdd,
|
|
2574
|
+
metadataShow: metadataShow,
|
|
2575
|
+
parse: parse,
|
|
2576
|
+
print: print,
|
|
2577
|
+
|
|
2578
|
+
};
|
|
2320
2579
|
|
|
2321
|
-
export {
|
|
2580
|
+
export { tools, tools as 'local:wasm-tools/tools' }
|