@bytecodealliance/jco 0.11.2 → 0.12.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/lib/wasi_snapshot_preview1.command.wasm +0 -0
- package/lib/wasi_snapshot_preview1.reactor.wasm +0 -0
- package/obj/{exports → interfaces}/local-wasm-tools-tools.d.ts +5 -5
- package/obj/{imports → interfaces}/wasi-cli-stderr.d.ts +1 -1
- package/obj/{exports → interfaces}/wasi-cli-stdin.d.ts +1 -1
- package/obj/{exports → interfaces}/wasi-cli-stdout.d.ts +1 -1
- package/obj/interfaces/wasi-cli-terminal-stderr.d.ts +5 -0
- package/obj/interfaces/wasi-cli-terminal-stdin.d.ts +5 -0
- package/obj/interfaces/wasi-cli-terminal-stdout.d.ts +5 -0
- package/obj/{exports → interfaces}/wasi-filesystem-preopens.d.ts +1 -1
- package/obj/{exports → interfaces}/wasi-filesystem-types.d.ts +3 -3
- package/obj/{exports → interfaces}/wasi-io-streams.d.ts +12 -2
- 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 +17 -16
- package/obj/js-component-bindgen-component.js +263 -162
- 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 +16 -16
- package/obj/wasm-tools.js +208 -115
- package/package.json +3 -3
- package/src/cmd/transpile.js +3 -1
- package/src/cmd/wasm-tools.js +1 -1
- package/src/jco.js +2 -1
- package/obj/exports/wasi-cli-stderr.d.ts +0 -5
- package/obj/exports/wasi-cli-terminal-stderr.d.ts +0 -5
- package/obj/exports/wasi-cli-terminal-stdin.d.ts +0 -5
- package/obj/exports/wasi-cli-terminal-stdout.d.ts +0 -5
- package/obj/imports/wasi-cli-environment.d.ts +0 -3
- package/obj/imports/wasi-cli-exit.d.ts +0 -4
- package/obj/imports/wasi-cli-stdin.d.ts +0 -5
- package/obj/imports/wasi-cli-stdout.d.ts +0 -5
- package/obj/imports/wasi-cli-terminal-input.d.ts +0 -4
- package/obj/imports/wasi-cli-terminal-output.d.ts +0 -4
- package/obj/imports/wasi-cli-terminal-stderr.d.ts +0 -5
- package/obj/imports/wasi-cli-terminal-stdin.d.ts +0 -5
- package/obj/imports/wasi-cli-terminal-stdout.d.ts +0 -5
- package/obj/imports/wasi-clocks-wall-clock.d.ts +0 -6
- package/obj/imports/wasi-filesystem-preopens.d.ts +0 -5
- package/obj/imports/wasi-filesystem-types.d.ts +0 -153
- package/obj/imports/wasi-io-streams.d.ts +0 -18
- package/obj/imports/wasi-random-random.d.ts +0 -3
- /package/obj/{exports → interfaces}/wasi-cli-environment.d.ts +0 -0
- /package/obj/{exports → interfaces}/wasi-cli-exit.d.ts +0 -0
- /package/obj/{exports → interfaces}/wasi-cli-terminal-input.d.ts +0 -0
- /package/obj/{exports → interfaces}/wasi-cli-terminal-output.d.ts +0 -0
- /package/obj/{exports → interfaces}/wasi-clocks-wall-clock.d.ts +0 -0
- /package/obj/{exports → interfaces}/wasi-random-random.d.ts +0 -0
|
@@ -22,8 +22,10 @@ const { appendViaStream,
|
|
|
22
22
|
readViaStream,
|
|
23
23
|
stat,
|
|
24
24
|
writeViaStream } = types;
|
|
25
|
-
const {
|
|
26
|
-
|
|
25
|
+
const { blockingFlush,
|
|
26
|
+
blockingRead,
|
|
27
|
+
blockingWriteAndFlush,
|
|
28
|
+
checkWrite,
|
|
27
29
|
dropInputStream,
|
|
28
30
|
dropOutputStream,
|
|
29
31
|
read,
|
|
@@ -1628,39 +1630,7 @@ function trampoline17(arg0, arg1) {
|
|
|
1628
1630
|
}
|
|
1629
1631
|
}
|
|
1630
1632
|
|
|
1631
|
-
function trampoline18(arg0, arg1) {
|
|
1632
|
-
const ret = getRandomBytes(BigInt.asUintN(64, arg0));
|
|
1633
|
-
const val0 = ret;
|
|
1634
|
-
const len0 = val0.byteLength;
|
|
1635
|
-
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
1636
|
-
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
1637
|
-
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
1638
|
-
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
1639
|
-
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
function trampoline19(arg0) {
|
|
1643
|
-
const ret = getEnvironment();
|
|
1644
|
-
const vec3 = ret;
|
|
1645
|
-
const len3 = vec3.length;
|
|
1646
|
-
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
1647
|
-
for (let i = 0; i < vec3.length; i++) {
|
|
1648
|
-
const e = vec3[i];
|
|
1649
|
-
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
1650
|
-
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
1651
|
-
const len1 = utf8EncodedLen;
|
|
1652
|
-
dataView(memory0).setInt32(base + 4, len1, true);
|
|
1653
|
-
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
1654
|
-
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
1655
|
-
const len2 = utf8EncodedLen;
|
|
1656
|
-
dataView(memory0).setInt32(base + 12, len2, true);
|
|
1657
|
-
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
1658
|
-
}
|
|
1659
|
-
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
1660
|
-
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
function trampoline20(arg0, arg1, arg2) {
|
|
1633
|
+
function trampoline18(arg0, arg1, arg2) {
|
|
1664
1634
|
let ret;
|
|
1665
1635
|
try {
|
|
1666
1636
|
ret = { tag: 'ok', val: read(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
@@ -1713,7 +1683,7 @@ function trampoline20(arg0, arg1, arg2) {
|
|
|
1713
1683
|
}
|
|
1714
1684
|
}
|
|
1715
1685
|
|
|
1716
|
-
function
|
|
1686
|
+
function trampoline19(arg0, arg1, arg2) {
|
|
1717
1687
|
let ret;
|
|
1718
1688
|
try {
|
|
1719
1689
|
ret = { tag: 'ok', val: blockingRead(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
@@ -1766,7 +1736,53 @@ function trampoline21(arg0, arg1, arg2) {
|
|
|
1766
1736
|
}
|
|
1767
1737
|
}
|
|
1768
1738
|
|
|
1769
|
-
function
|
|
1739
|
+
function trampoline20(arg0, arg1) {
|
|
1740
|
+
let ret;
|
|
1741
|
+
try {
|
|
1742
|
+
ret = { tag: 'ok', val: checkWrite(arg0 >>> 0) };
|
|
1743
|
+
} catch (e) {
|
|
1744
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1745
|
+
}
|
|
1746
|
+
const variant1 = ret;
|
|
1747
|
+
switch (variant1.tag) {
|
|
1748
|
+
case 'ok': {
|
|
1749
|
+
const e = variant1.val;
|
|
1750
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
1751
|
+
dataView(memory0).setBigInt64(arg1 + 8, toUint64(e), true);
|
|
1752
|
+
break;
|
|
1753
|
+
}
|
|
1754
|
+
case 'err': {
|
|
1755
|
+
const e = variant1.val;
|
|
1756
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
1757
|
+
const val0 = e;
|
|
1758
|
+
let enum0;
|
|
1759
|
+
switch (val0) {
|
|
1760
|
+
case 'last-operation-failed': {
|
|
1761
|
+
enum0 = 0;
|
|
1762
|
+
break;
|
|
1763
|
+
}
|
|
1764
|
+
case 'closed': {
|
|
1765
|
+
enum0 = 1;
|
|
1766
|
+
break;
|
|
1767
|
+
}
|
|
1768
|
+
default: {
|
|
1769
|
+
if ((e) instanceof Error) {
|
|
1770
|
+
console.error(e);
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
throw new TypeError(`"${val0}" is not one of the cases of write-error`);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
dataView(memory0).setInt8(arg1 + 8, enum0, true);
|
|
1777
|
+
break;
|
|
1778
|
+
}
|
|
1779
|
+
default: {
|
|
1780
|
+
throw new TypeError('invalid variant specified for result');
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
function trampoline21(arg0, arg1, arg2, arg3) {
|
|
1770
1786
|
const ptr0 = arg1;
|
|
1771
1787
|
const len0 = arg2;
|
|
1772
1788
|
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
@@ -1776,38 +1792,36 @@ function trampoline22(arg0, arg1, arg2, arg3) {
|
|
|
1776
1792
|
} catch (e) {
|
|
1777
1793
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1778
1794
|
}
|
|
1779
|
-
const
|
|
1780
|
-
switch (
|
|
1795
|
+
const variant2 = ret;
|
|
1796
|
+
switch (variant2.tag) {
|
|
1781
1797
|
case 'ok': {
|
|
1782
|
-
const e =
|
|
1798
|
+
const e = variant2.val;
|
|
1783
1799
|
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1800
|
+
break;
|
|
1801
|
+
}
|
|
1802
|
+
case 'err': {
|
|
1803
|
+
const e = variant2.val;
|
|
1804
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
1805
|
+
const val1 = e;
|
|
1806
|
+
let enum1;
|
|
1807
|
+
switch (val1) {
|
|
1808
|
+
case 'last-operation-failed': {
|
|
1809
|
+
enum1 = 0;
|
|
1791
1810
|
break;
|
|
1792
1811
|
}
|
|
1793
|
-
case '
|
|
1794
|
-
|
|
1812
|
+
case 'closed': {
|
|
1813
|
+
enum1 = 1;
|
|
1795
1814
|
break;
|
|
1796
1815
|
}
|
|
1797
1816
|
default: {
|
|
1798
|
-
if ((
|
|
1799
|
-
console.error(
|
|
1817
|
+
if ((e) instanceof Error) {
|
|
1818
|
+
console.error(e);
|
|
1800
1819
|
}
|
|
1801
1820
|
|
|
1802
|
-
throw new TypeError(`"${
|
|
1821
|
+
throw new TypeError(`"${val1}" is not one of the cases of write-error`);
|
|
1803
1822
|
}
|
|
1804
1823
|
}
|
|
1805
|
-
dataView(memory0).setInt8(arg3 +
|
|
1806
|
-
break;
|
|
1807
|
-
}
|
|
1808
|
-
case 'err': {
|
|
1809
|
-
const e = variant3.val;
|
|
1810
|
-
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
1824
|
+
dataView(memory0).setInt8(arg3 + 1, enum1, true);
|
|
1811
1825
|
break;
|
|
1812
1826
|
}
|
|
1813
1827
|
default: {
|
|
@@ -1816,48 +1830,91 @@ function trampoline22(arg0, arg1, arg2, arg3) {
|
|
|
1816
1830
|
}
|
|
1817
1831
|
}
|
|
1818
1832
|
|
|
1819
|
-
function
|
|
1833
|
+
function trampoline22(arg0, arg1, arg2, arg3) {
|
|
1820
1834
|
const ptr0 = arg1;
|
|
1821
1835
|
const len0 = arg2;
|
|
1822
1836
|
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
1823
1837
|
let ret;
|
|
1824
1838
|
try {
|
|
1825
|
-
ret = { tag: 'ok', val:
|
|
1839
|
+
ret = { tag: 'ok', val: blockingWriteAndFlush(arg0 >>> 0, result0) };
|
|
1826
1840
|
} catch (e) {
|
|
1827
1841
|
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1828
1842
|
}
|
|
1829
|
-
const
|
|
1830
|
-
switch (
|
|
1843
|
+
const variant2 = ret;
|
|
1844
|
+
switch (variant2.tag) {
|
|
1831
1845
|
case 'ok': {
|
|
1832
|
-
const e =
|
|
1846
|
+
const e = variant2.val;
|
|
1833
1847
|
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
case 'err': {
|
|
1851
|
+
const e = variant2.val;
|
|
1852
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
1853
|
+
const val1 = e;
|
|
1854
|
+
let enum1;
|
|
1855
|
+
switch (val1) {
|
|
1856
|
+
case 'last-operation-failed': {
|
|
1857
|
+
enum1 = 0;
|
|
1841
1858
|
break;
|
|
1842
1859
|
}
|
|
1843
|
-
case '
|
|
1844
|
-
|
|
1860
|
+
case 'closed': {
|
|
1861
|
+
enum1 = 1;
|
|
1845
1862
|
break;
|
|
1846
1863
|
}
|
|
1847
1864
|
default: {
|
|
1848
|
-
if ((
|
|
1849
|
-
console.error(
|
|
1865
|
+
if ((e) instanceof Error) {
|
|
1866
|
+
console.error(e);
|
|
1850
1867
|
}
|
|
1851
1868
|
|
|
1852
|
-
throw new TypeError(`"${
|
|
1869
|
+
throw new TypeError(`"${val1}" is not one of the cases of write-error`);
|
|
1853
1870
|
}
|
|
1854
1871
|
}
|
|
1855
|
-
dataView(memory0).setInt8(arg3 +
|
|
1872
|
+
dataView(memory0).setInt8(arg3 + 1, enum1, true);
|
|
1873
|
+
break;
|
|
1874
|
+
}
|
|
1875
|
+
default: {
|
|
1876
|
+
throw new TypeError('invalid variant specified for result');
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
function trampoline23(arg0, arg1) {
|
|
1882
|
+
let ret;
|
|
1883
|
+
try {
|
|
1884
|
+
ret = { tag: 'ok', val: blockingFlush(arg0 >>> 0) };
|
|
1885
|
+
} catch (e) {
|
|
1886
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
1887
|
+
}
|
|
1888
|
+
const variant1 = ret;
|
|
1889
|
+
switch (variant1.tag) {
|
|
1890
|
+
case 'ok': {
|
|
1891
|
+
const e = variant1.val;
|
|
1892
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
1856
1893
|
break;
|
|
1857
1894
|
}
|
|
1858
1895
|
case 'err': {
|
|
1859
|
-
const e =
|
|
1860
|
-
dataView(memory0).setInt8(
|
|
1896
|
+
const e = variant1.val;
|
|
1897
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
1898
|
+
const val0 = e;
|
|
1899
|
+
let enum0;
|
|
1900
|
+
switch (val0) {
|
|
1901
|
+
case 'last-operation-failed': {
|
|
1902
|
+
enum0 = 0;
|
|
1903
|
+
break;
|
|
1904
|
+
}
|
|
1905
|
+
case 'closed': {
|
|
1906
|
+
enum0 = 1;
|
|
1907
|
+
break;
|
|
1908
|
+
}
|
|
1909
|
+
default: {
|
|
1910
|
+
if ((e) instanceof Error) {
|
|
1911
|
+
console.error(e);
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
throw new TypeError(`"${val0}" is not one of the cases of write-error`);
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
dataView(memory0).setInt8(arg1 + 1, enum0, true);
|
|
1861
1918
|
break;
|
|
1862
1919
|
}
|
|
1863
1920
|
default: {
|
|
@@ -1866,7 +1923,39 @@ function trampoline23(arg0, arg1, arg2, arg3) {
|
|
|
1866
1923
|
}
|
|
1867
1924
|
}
|
|
1868
1925
|
|
|
1869
|
-
function trampoline24(arg0) {
|
|
1926
|
+
function trampoline24(arg0, arg1) {
|
|
1927
|
+
const ret = getRandomBytes(BigInt.asUintN(64, arg0));
|
|
1928
|
+
const val0 = ret;
|
|
1929
|
+
const len0 = val0.byteLength;
|
|
1930
|
+
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
1931
|
+
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
1932
|
+
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
1933
|
+
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
1934
|
+
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
function trampoline25(arg0) {
|
|
1938
|
+
const ret = getEnvironment();
|
|
1939
|
+
const vec3 = ret;
|
|
1940
|
+
const len3 = vec3.length;
|
|
1941
|
+
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
1942
|
+
for (let i = 0; i < vec3.length; i++) {
|
|
1943
|
+
const e = vec3[i];
|
|
1944
|
+
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
1945
|
+
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
1946
|
+
const len1 = utf8EncodedLen;
|
|
1947
|
+
dataView(memory0).setInt32(base + 4, len1, true);
|
|
1948
|
+
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
1949
|
+
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
1950
|
+
const len2 = utf8EncodedLen;
|
|
1951
|
+
dataView(memory0).setInt32(base + 12, len2, true);
|
|
1952
|
+
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
1953
|
+
}
|
|
1954
|
+
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
1955
|
+
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
function trampoline26(arg0) {
|
|
1870
1959
|
const ret = getTerminalStdin();
|
|
1871
1960
|
const variant0 = ret;
|
|
1872
1961
|
if (variant0 === null || variant0=== undefined) {
|
|
@@ -1878,7 +1967,7 @@ function trampoline24(arg0) {
|
|
|
1878
1967
|
}
|
|
1879
1968
|
}
|
|
1880
1969
|
|
|
1881
|
-
function
|
|
1970
|
+
function trampoline27(arg0) {
|
|
1882
1971
|
const ret = getTerminalStdout();
|
|
1883
1972
|
const variant0 = ret;
|
|
1884
1973
|
if (variant0 === null || variant0=== undefined) {
|
|
@@ -1890,7 +1979,7 @@ function trampoline25(arg0) {
|
|
|
1890
1979
|
}
|
|
1891
1980
|
}
|
|
1892
1981
|
|
|
1893
|
-
function
|
|
1982
|
+
function trampoline28(arg0) {
|
|
1894
1983
|
const ret = getTerminalStderr();
|
|
1895
1984
|
const variant0 = ret;
|
|
1896
1985
|
if (variant0 === null || variant0=== undefined) {
|
|
@@ -1908,7 +1997,7 @@ let postReturn1;
|
|
|
1908
1997
|
|
|
1909
1998
|
function generate(arg0, arg1) {
|
|
1910
1999
|
if (!_initialized) throwUninitialized();
|
|
1911
|
-
const ptr0 = realloc1(0, 0, 4,
|
|
2000
|
+
const ptr0 = realloc1(0, 0, 4, 52);
|
|
1912
2001
|
const val1 = arg0;
|
|
1913
2002
|
const len1 = val1.byteLength;
|
|
1914
2003
|
const ptr1 = realloc1(0, 0, 1, len1 * 1);
|
|
@@ -1916,7 +2005,7 @@ function generate(arg0, arg1) {
|
|
|
1916
2005
|
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
1917
2006
|
dataView(memory0).setInt32(ptr0 + 4, len1, true);
|
|
1918
2007
|
dataView(memory0).setInt32(ptr0 + 0, ptr1, true);
|
|
1919
|
-
const {name: v2_0, noTypescript: v2_1, instantiation: v2_2, map: v2_3, compat: v2_4, noNodejsCompat: v2_5, base64Cutoff: v2_6, tlaCompat: v2_7, validLiftingOptimization: v2_8 } = arg1;
|
|
2008
|
+
const {name: v2_0, noTypescript: v2_1, instantiation: v2_2, map: v2_3, compat: v2_4, noNodejsCompat: v2_5, base64Cutoff: v2_6, tlaCompat: v2_7, validLiftingOptimization: v2_8, tracing: v2_9 } = arg1;
|
|
1920
2009
|
const ptr3 = utf8Encode(v2_0, realloc1, memory0);
|
|
1921
2010
|
const len3 = utf8EncodedLen;
|
|
1922
2011
|
dataView(memory0).setInt32(ptr0 + 12, len3, true);
|
|
@@ -2001,74 +2090,82 @@ function generate(arg0, arg1) {
|
|
|
2001
2090
|
dataView(memory0).setInt8(ptr0 + 46, 1, true);
|
|
2002
2091
|
dataView(memory0).setInt8(ptr0 + 47, e ? 1 : 0, true);
|
|
2003
2092
|
}
|
|
2093
|
+
const variant16 = v2_9;
|
|
2094
|
+
if (variant16 === null || variant16=== undefined) {
|
|
2095
|
+
dataView(memory0).setInt8(ptr0 + 48, 0, true);
|
|
2096
|
+
} else {
|
|
2097
|
+
const e = variant16;
|
|
2098
|
+
dataView(memory0).setInt8(ptr0 + 48, 1, true);
|
|
2099
|
+
dataView(memory0).setInt8(ptr0 + 49, e ? 1 : 0, true);
|
|
2100
|
+
}
|
|
2004
2101
|
const ret = exports1.generate(ptr0);
|
|
2005
|
-
let
|
|
2102
|
+
let variant26;
|
|
2006
2103
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
2007
2104
|
case 0: {
|
|
2008
|
-
const
|
|
2009
|
-
const
|
|
2010
|
-
const
|
|
2011
|
-
for (let i = 0; i <
|
|
2012
|
-
const base =
|
|
2013
|
-
const
|
|
2014
|
-
const
|
|
2015
|
-
const
|
|
2016
|
-
const
|
|
2017
|
-
const
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2105
|
+
const len19 = dataView(memory0).getInt32(ret + 8, true);
|
|
2106
|
+
const base19 = dataView(memory0).getInt32(ret + 4, true);
|
|
2107
|
+
const result19 = [];
|
|
2108
|
+
for (let i = 0; i < len19; i++) {
|
|
2109
|
+
const base = base19 + i * 16;
|
|
2110
|
+
const ptr17 = dataView(memory0).getInt32(base + 0, true);
|
|
2111
|
+
const len17 = dataView(memory0).getInt32(base + 4, true);
|
|
2112
|
+
const result17 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr17, len17));
|
|
2113
|
+
const ptr18 = dataView(memory0).getInt32(base + 8, true);
|
|
2114
|
+
const len18 = dataView(memory0).getInt32(base + 12, true);
|
|
2115
|
+
const result18 = new Uint8Array(memory0.buffer.slice(ptr18, ptr18 + len18 * 1));
|
|
2116
|
+
result19.push([result17, result18]);
|
|
2020
2117
|
}
|
|
2021
|
-
const
|
|
2022
|
-
const
|
|
2023
|
-
const
|
|
2024
|
-
for (let i = 0; i <
|
|
2025
|
-
const base =
|
|
2026
|
-
const
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
|
|
2118
|
+
const len21 = dataView(memory0).getInt32(ret + 16, true);
|
|
2119
|
+
const base21 = dataView(memory0).getInt32(ret + 12, true);
|
|
2120
|
+
const result21 = [];
|
|
2121
|
+
for (let i = 0; i < len21; i++) {
|
|
2122
|
+
const base = base21 + i * 8;
|
|
2123
|
+
const ptr20 = dataView(memory0).getInt32(base + 0, true);
|
|
2124
|
+
const len20 = dataView(memory0).getInt32(base + 4, true);
|
|
2125
|
+
const result20 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr20, len20));
|
|
2126
|
+
result21.push(result20);
|
|
2030
2127
|
}
|
|
2031
|
-
const
|
|
2032
|
-
const
|
|
2033
|
-
const
|
|
2034
|
-
for (let i = 0; i <
|
|
2035
|
-
const base =
|
|
2036
|
-
const
|
|
2037
|
-
const
|
|
2038
|
-
const
|
|
2039
|
-
let
|
|
2128
|
+
const len24 = dataView(memory0).getInt32(ret + 24, true);
|
|
2129
|
+
const base24 = dataView(memory0).getInt32(ret + 20, true);
|
|
2130
|
+
const result24 = [];
|
|
2131
|
+
for (let i = 0; i < len24; i++) {
|
|
2132
|
+
const base = base24 + i * 12;
|
|
2133
|
+
const ptr22 = dataView(memory0).getInt32(base + 0, true);
|
|
2134
|
+
const len22 = dataView(memory0).getInt32(base + 4, true);
|
|
2135
|
+
const result22 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr22, len22));
|
|
2136
|
+
let enum23;
|
|
2040
2137
|
switch (dataView(memory0).getUint8(base + 8, true)) {
|
|
2041
2138
|
case 0: {
|
|
2042
|
-
|
|
2139
|
+
enum23 = 'function';
|
|
2043
2140
|
break;
|
|
2044
2141
|
}
|
|
2045
2142
|
case 1: {
|
|
2046
|
-
|
|
2143
|
+
enum23 = 'instance';
|
|
2047
2144
|
break;
|
|
2048
2145
|
}
|
|
2049
2146
|
default: {
|
|
2050
2147
|
throw new TypeError('invalid discriminant specified for ExportType');
|
|
2051
2148
|
}
|
|
2052
2149
|
}
|
|
2053
|
-
|
|
2150
|
+
result24.push([result22, enum23]);
|
|
2054
2151
|
}
|
|
2055
|
-
|
|
2152
|
+
variant26= {
|
|
2056
2153
|
tag: 'ok',
|
|
2057
2154
|
val: {
|
|
2058
|
-
files:
|
|
2059
|
-
imports:
|
|
2060
|
-
exports:
|
|
2155
|
+
files: result19,
|
|
2156
|
+
imports: result21,
|
|
2157
|
+
exports: result24,
|
|
2061
2158
|
}
|
|
2062
2159
|
};
|
|
2063
2160
|
break;
|
|
2064
2161
|
}
|
|
2065
2162
|
case 1: {
|
|
2066
|
-
const
|
|
2067
|
-
const
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2163
|
+
const ptr25 = dataView(memory0).getInt32(ret + 4, true);
|
|
2164
|
+
const len25 = dataView(memory0).getInt32(ret + 8, true);
|
|
2165
|
+
const result25 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr25, len25));
|
|
2166
|
+
variant26= {
|
|
2070
2167
|
tag: 'err',
|
|
2071
|
-
val:
|
|
2168
|
+
val: result25
|
|
2072
2169
|
};
|
|
2073
2170
|
break;
|
|
2074
2171
|
}
|
|
@@ -2077,10 +2174,10 @@ function generate(arg0, arg1) {
|
|
|
2077
2174
|
}
|
|
2078
2175
|
}
|
|
2079
2176
|
postReturn0(ret);
|
|
2080
|
-
if (
|
|
2081
|
-
throw new ComponentError(
|
|
2177
|
+
if (variant26.tag === 'err') {
|
|
2178
|
+
throw new ComponentError(variant26.val);
|
|
2082
2179
|
}
|
|
2083
|
-
return
|
|
2180
|
+
return variant26.val;
|
|
2084
2181
|
}
|
|
2085
2182
|
|
|
2086
2183
|
function generateTypes(arg0, arg1) {
|
|
@@ -2242,24 +2339,24 @@ let _initialized = false;
|
|
|
2242
2339
|
export const $init = (async() => {
|
|
2243
2340
|
const module0 = fetchCompile(new URL('./js-component-bindgen-component.core.wasm', import.meta.url));
|
|
2244
2341
|
const module1 = fetchCompile(new URL('./js-component-bindgen-component.core2.wasm', import.meta.url));
|
|
2245
|
-
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/
|
|
2246
|
-
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/
|
|
2342
|
+
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGAEf39/fwBgAn5/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwADHx4AAQECAgIDAgEBAgQEAgUAAAAABgcHCAYGBgkGCgsEBQFwAR4eB5gBHwEwAAABMQABATIAAgEzAAMBNAAEATUABQE2AAYBNwAHATgACAE5AAkCMTAACgIxMQALAjEyAAwCMTMADQIxNAAOAjE1AA8CMTYAEAIxNwARAjE4ABICMTkAEwIyMAAUAjIxABUCMjIAFgIyMwAXAjI0ABgCMjUAGQIyNgAaAjI3ABsCMjgAHAIyOQAdCCRpbXBvcnRzAQAKjwMeCQAgAEEAEQAACw0AIAAgASACQQERAQALDQAgACABIAJBAhEBAAsLACAAIAFBAxECAAsLACAAIAFBBBECAAsLACAAIAFBBRECAAsXACAAIAEgAiADIAQgBSAGIAdBBhEDAAsLACAAIAFBBxECAAsNACAAIAEgAkEIEQEACw0AIAAgASACQQkRAQALCwAgACABQQoRAgALDwAgACABIAIgA0ELEQQACw8AIAAgASACIANBDBEEAAsLACAAIAFBDRECAAsLACAAIAFBDhEFAAsJACAAQQ8RAAALCQAgAEEQEQAACwkAIABBEREAAAsJACAAQRIRAAALCwAgACABQRMRBgALDwAgACABIAIgA0EUEQcACw8AIAAgASACIANBFREHAAsZACAAIAEgAiADIAQgBSAGIAcgCEEWEQgACwsAIAAgAU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AAEwAAAAATEAAQABMgABAAEzAAIAATQAAgABNQACAAE2AAMAATcAAgABOAABAAE5AAEAAjEwAAIAAjExAAQAAjEyAAQAAjEzAAIAAjE0AAUAAjE1AAAAAjE2AAAAAjE3AAAAAjE4AAAAAjE5AAYAAjIwAAcAAjIxAAcAAjIyAAgAAjIzAAYAAjI0AAYAAjI1AAYAAjI2AAkAAjI3AAYAAjI4AAoAAjI5AAsACCRpbXBvcnRzAXABHh4JJAEAQQALHgABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHQAuCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BjAuMTQuMgAcBG5hbWUAFRR3aXQtY29tcG9uZW50OmZpeHVwcw');
|
|
2247
2344
|
const instanceFlags0 = new WebAssembly.Global({ value: "i32", mutable: true }, 3);
|
|
2248
2345
|
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
2249
2346
|
({ exports: exports0 } = await instantiateCore(await module2));
|
|
2250
2347
|
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
2251
2348
|
wasi_snapshot_preview1: {
|
|
2252
|
-
environ_get: exports0['
|
|
2253
|
-
environ_sizes_get: exports0['
|
|
2254
|
-
fd_close: exports0['
|
|
2255
|
-
fd_filestat_get: exports0['
|
|
2256
|
-
fd_prestat_dir_name: exports0['
|
|
2257
|
-
fd_prestat_get: exports0['
|
|
2258
|
-
fd_read: exports0['
|
|
2259
|
-
fd_write: exports0['
|
|
2260
|
-
path_open: exports0['
|
|
2261
|
-
proc_exit: exports0['
|
|
2262
|
-
random_get: exports0['
|
|
2349
|
+
environ_get: exports0['24'],
|
|
2350
|
+
environ_sizes_get: exports0['25'],
|
|
2351
|
+
fd_close: exports0['26'],
|
|
2352
|
+
fd_filestat_get: exports0['19'],
|
|
2353
|
+
fd_prestat_dir_name: exports0['28'],
|
|
2354
|
+
fd_prestat_get: exports0['27'],
|
|
2355
|
+
fd_read: exports0['20'],
|
|
2356
|
+
fd_write: exports0['21'],
|
|
2357
|
+
path_open: exports0['22'],
|
|
2358
|
+
proc_exit: exports0['29'],
|
|
2359
|
+
random_get: exports0['23'],
|
|
2263
2360
|
},
|
|
2264
2361
|
}));
|
|
2265
2362
|
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
@@ -2270,7 +2367,7 @@ export const $init = (async() => {
|
|
|
2270
2367
|
memory: exports1.memory,
|
|
2271
2368
|
},
|
|
2272
2369
|
'wasi:cli/environment': {
|
|
2273
|
-
'get-environment': exports0['
|
|
2370
|
+
'get-environment': exports0['15'],
|
|
2274
2371
|
},
|
|
2275
2372
|
'wasi:cli/exit': {
|
|
2276
2373
|
exit: trampoline9,
|
|
@@ -2291,13 +2388,13 @@ export const $init = (async() => {
|
|
|
2291
2388
|
'drop-terminal-output': trampoline7,
|
|
2292
2389
|
},
|
|
2293
2390
|
'wasi:cli/terminal-stderr': {
|
|
2294
|
-
'get-terminal-stderr': exports0['
|
|
2391
|
+
'get-terminal-stderr': exports0['18'],
|
|
2295
2392
|
},
|
|
2296
2393
|
'wasi:cli/terminal-stdin': {
|
|
2297
|
-
'get-terminal-stdin': exports0['
|
|
2394
|
+
'get-terminal-stdin': exports0['16'],
|
|
2298
2395
|
},
|
|
2299
2396
|
'wasi:cli/terminal-stdout': {
|
|
2300
|
-
'get-terminal-stdout': exports0['
|
|
2397
|
+
'get-terminal-stdout': exports0['17'],
|
|
2301
2398
|
},
|
|
2302
2399
|
'wasi:filesystem/preopens': {
|
|
2303
2400
|
'get-directories': exports0['0'],
|
|
@@ -2314,15 +2411,17 @@ export const $init = (async() => {
|
|
|
2314
2411
|
'write-via-stream': exports0['2'],
|
|
2315
2412
|
},
|
|
2316
2413
|
'wasi:io/streams': {
|
|
2317
|
-
'blocking-
|
|
2318
|
-
'blocking-
|
|
2414
|
+
'blocking-flush': exports0['13'],
|
|
2415
|
+
'blocking-read': exports0['9'],
|
|
2416
|
+
'blocking-write-and-flush': exports0['12'],
|
|
2417
|
+
'check-write': exports0['10'],
|
|
2319
2418
|
'drop-input-stream': trampoline1,
|
|
2320
2419
|
'drop-output-stream': trampoline2,
|
|
2321
|
-
read: exports0['
|
|
2322
|
-
write: exports0['
|
|
2420
|
+
read: exports0['8'],
|
|
2421
|
+
write: exports0['11'],
|
|
2323
2422
|
},
|
|
2324
2423
|
'wasi:random/random': {
|
|
2325
|
-
'get-random-bytes': exports0['
|
|
2424
|
+
'get-random-bytes': exports0['14'],
|
|
2326
2425
|
},
|
|
2327
2426
|
}));
|
|
2328
2427
|
memory0 = exports1.memory;
|
|
@@ -2339,18 +2438,20 @@ export const $init = (async() => {
|
|
|
2339
2438
|
'14': trampoline24,
|
|
2340
2439
|
'15': trampoline25,
|
|
2341
2440
|
'16': trampoline26,
|
|
2342
|
-
'17':
|
|
2343
|
-
'18':
|
|
2344
|
-
'19': exports2.
|
|
2441
|
+
'17': trampoline27,
|
|
2442
|
+
'18': trampoline28,
|
|
2443
|
+
'19': exports2.fd_filestat_get,
|
|
2345
2444
|
'2': trampoline12,
|
|
2346
|
-
'20': exports2.
|
|
2347
|
-
'21': exports2.
|
|
2348
|
-
'22': exports2.
|
|
2349
|
-
'23': exports2.
|
|
2350
|
-
'24': exports2.
|
|
2351
|
-
'25': exports2.
|
|
2352
|
-
'26': exports2.
|
|
2353
|
-
'27': exports2.
|
|
2445
|
+
'20': exports2.fd_read,
|
|
2446
|
+
'21': exports2.fd_write,
|
|
2447
|
+
'22': exports2.path_open,
|
|
2448
|
+
'23': exports2.random_get,
|
|
2449
|
+
'24': exports2.environ_get,
|
|
2450
|
+
'25': exports2.environ_sizes_get,
|
|
2451
|
+
'26': exports2.fd_close,
|
|
2452
|
+
'27': exports2.fd_prestat_get,
|
|
2453
|
+
'28': exports2.fd_prestat_dir_name,
|
|
2454
|
+
'29': exports2.proc_exit,
|
|
2354
2455
|
'3': trampoline13,
|
|
2355
2456
|
'4': trampoline14,
|
|
2356
2457
|
'5': trampoline15,
|
|
Binary file
|
package/obj/wasm-tools.core.wasm
CHANGED
|
Binary file
|
|
Binary file
|