@bytecodealliance/jco
Advanced tools
Comparing version 0.10.3 to 0.11.0
@@ -1,3 +0,3 @@ | ||
export namespace WasiCliBaseEnvironment { | ||
export namespace WasiCliBaseEnvironment1 { | ||
export function getEnvironment(): [string, string][]; | ||
} |
@@ -1,4 +0,4 @@ | ||
export namespace WasiCliBaseExit { | ||
export namespace WasiCliBaseExit1 { | ||
export function exit(status: Result<void, void>): void; | ||
} | ||
export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E }; |
@@ -1,2 +0,2 @@ | ||
export namespace WasiCliBasePreopens { | ||
export namespace WasiCliBasePreopens1 { | ||
export function getDirectories(): [Descriptor, string][]; | ||
@@ -3,0 +3,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export namespace WasiCliBaseStderr { | ||
export namespace WasiCliBaseStderr1 { | ||
export function getStderr(): OutputStream; | ||
@@ -3,0 +3,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export namespace WasiCliBaseStdin { | ||
export namespace WasiCliBaseStdin1 { | ||
export function getStdin(): InputStream; | ||
@@ -3,0 +3,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export namespace WasiCliBaseStdout { | ||
export namespace WasiCliBaseStdout1 { | ||
export function getStdout(): OutputStream; | ||
@@ -3,0 +3,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export namespace WasiClocksWallClock { | ||
export namespace WasiClocksWallClock1 { | ||
} | ||
@@ -3,0 +3,0 @@ export interface Datetime { |
@@ -1,2 +0,2 @@ | ||
export namespace WasiFilesystemFilesystem { | ||
export namespace WasiFilesystemFilesystem1 { | ||
export function readViaStream(this: Descriptor, offset: Filesize): InputStream; | ||
@@ -3,0 +3,0 @@ export function writeViaStream(this: Descriptor, offset: Filesize): OutputStream; |
@@ -1,2 +0,2 @@ | ||
export namespace WasiIoStreams { | ||
export namespace WasiIoStreams1 { | ||
export function read(this: InputStream, len: bigint): [Uint8Array | ArrayBuffer, StreamStatus]; | ||
@@ -18,5 +18,2 @@ export function blockingRead(this: InputStream, len: bigint): [Uint8Array | ArrayBuffer, StreamStatus]; | ||
export type StreamStatus = 'open' | 'ended'; | ||
export interface StreamError { | ||
dummy: number, | ||
} | ||
export type OutputStream = number; |
@@ -1,3 +0,3 @@ | ||
export namespace WasiRandomRandom { | ||
export namespace WasiRandomRandom1 { | ||
export function getRandomBytes(len: bigint): Uint8Array | ArrayBuffer; | ||
} |
@@ -47,12 +47,17 @@ export type Files = [string, Uint8Array][]; | ||
} | ||
import { WasiCliBaseEnvironment } from './imports/wasi-cli-base-environment'; | ||
import { WasiCliBaseExit } from './imports/wasi-cli-base-exit'; | ||
import { WasiCliBasePreopens } from './imports/wasi-cli-base-preopens'; | ||
import { WasiCliBaseStderr } from './imports/wasi-cli-base-stderr'; | ||
import { WasiCliBaseStdin } from './imports/wasi-cli-base-stdin'; | ||
import { WasiCliBaseStdout } from './imports/wasi-cli-base-stdout'; | ||
import { WasiClocksWallClock } from './imports/wasi-clocks-wall-clock'; | ||
import { WasiFilesystemFilesystem } from './imports/wasi-filesystem-filesystem'; | ||
import { WasiIoStreams } from './imports/wasi-io-streams'; | ||
import { WasiRandomRandom } from './imports/wasi-random-random'; | ||
import { WasiCliEnvironment1 } from './imports/wasi-cli-environment'; | ||
import { WasiCliExit1 } from './imports/wasi-cli-exit'; | ||
import { WasiCliStderr1 } from './imports/wasi-cli-stderr'; | ||
import { WasiCliStdin1 } from './imports/wasi-cli-stdin'; | ||
import { WasiCliStdout1 } from './imports/wasi-cli-stdout'; | ||
import { WasiCliTerminalInput1 } from './imports/wasi-cli-terminal-input'; | ||
import { WasiCliTerminalOutput1 } from './imports/wasi-cli-terminal-output'; | ||
import { WasiCliTerminalStderr1 } from './imports/wasi-cli-terminal-stderr'; | ||
import { WasiCliTerminalStdin1 } from './imports/wasi-cli-terminal-stdin'; | ||
import { WasiCliTerminalStdout1 } from './imports/wasi-cli-terminal-stdout'; | ||
import { WasiClocksWallClock1 } from './imports/wasi-clocks-wall-clock'; | ||
import { WasiFilesystemPreopens1 } from './imports/wasi-filesystem-preopens'; | ||
import { WasiFilesystemTypes1 } from './imports/wasi-filesystem-types'; | ||
import { WasiIoStreams1 } from './imports/wasi-io-streams'; | ||
import { WasiRandomRandom1 } from './imports/wasi-random-random'; | ||
export function generate(component: Uint8Array | ArrayBuffer, options: GenerateOptions): Transpiled; | ||
@@ -59,0 +64,0 @@ export function generateTypes(name: string, options: TypeGenerationOptions): Files; |
@@ -1,3 +0,3 @@ | ||
import { environment, exit as exit$1, preopens, stderr, stdin, stdout } from '@bytecodealliance/preview2-shim/cli-base'; | ||
import { filesystem } from '@bytecodealliance/preview2-shim/filesystem'; | ||
import { environment, exit as exit$1, stderr, stdin, stdout, terminalInput, terminalOutput, terminalStderr, terminalStdin, terminalStdout } from '@bytecodealliance/preview2-shim/cli'; | ||
import { preopens, types } from '@bytecodealliance/preview2-shim/filesystem'; | ||
import { streams } from '@bytecodealliance/preview2-shim/io'; | ||
@@ -7,6 +7,11 @@ import { random } from '@bytecodealliance/preview2-shim/random'; | ||
const { exit } = exit$1; | ||
const { getDirectories } = preopens; | ||
const { getStderr } = stderr; | ||
const { getStdin } = stdin; | ||
const { getStdout } = stdout; | ||
const { dropTerminalInput } = terminalInput; | ||
const { dropTerminalOutput } = terminalOutput; | ||
const { getTerminalStderr } = terminalStderr; | ||
const { getTerminalStdin } = terminalStdin; | ||
const { getTerminalStdout } = terminalStdout; | ||
const { getDirectories } = preopens; | ||
const { appendViaStream, | ||
@@ -16,6 +21,7 @@ dropDescriptor, | ||
getType, | ||
metadataHash, | ||
openAt, | ||
readViaStream, | ||
stat, | ||
writeViaStream } = filesystem; | ||
writeViaStream } = types; | ||
const { blockingRead, | ||
@@ -125,3 +131,7 @@ blockingWrite, | ||
function trampoline5() { | ||
function trampoline5(arg0) { | ||
dropTerminalInput(arg0 >>> 0); | ||
} | ||
function trampoline6() { | ||
const ret = getStdout(); | ||
@@ -131,3 +141,7 @@ return toUint32(ret); | ||
function trampoline6() { | ||
function trampoline7(arg0) { | ||
dropTerminalOutput(arg0 >>> 0); | ||
} | ||
function trampoline8() { | ||
const ret = getStderr(); | ||
@@ -137,3 +151,3 @@ return toUint32(ret); | ||
function trampoline7(arg0) { | ||
function trampoline9(arg0) { | ||
let variant0; | ||
@@ -163,3 +177,3 @@ switch (arg0) { | ||
function trampoline8(arg0) { | ||
function trampoline10(arg0) { | ||
const ret = getDirectories(); | ||
@@ -184,3 +198,3 @@ const vec2 = ret; | ||
function trampoline9(arg0, arg1, arg2) { | ||
function trampoline11(arg0, arg1, arg2) { | ||
let ret; | ||
@@ -371,3 +385,3 @@ try { | ||
function trampoline10(arg0, arg1, arg2) { | ||
function trampoline12(arg0, arg1, arg2) { | ||
let ret; | ||
@@ -558,3 +572,3 @@ try { | ||
function trampoline11(arg0, arg1) { | ||
function trampoline13(arg0, arg1) { | ||
let ret; | ||
@@ -745,3 +759,3 @@ try { | ||
function trampoline12(arg0, arg1) { | ||
function trampoline14(arg0, arg1) { | ||
let ret; | ||
@@ -975,3 +989,3 @@ try { | ||
function trampoline13(arg0, arg1) { | ||
function trampoline15(arg0, arg1) { | ||
let ret; | ||
@@ -988,6 +1002,4 @@ try { | ||
dataView(memory0).setInt8(arg1 + 0, 0, true); | ||
const {device: v0_0, inode: v0_1, type: v0_2, linkCount: v0_3, size: v0_4, dataAccessTimestamp: v0_5, dataModificationTimestamp: v0_6, statusChangeTimestamp: v0_7 } = e; | ||
dataView(memory0).setBigInt64(arg1 + 8, toUint64(v0_0), true); | ||
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true); | ||
const val1 = v0_2; | ||
const {type: v0_0, linkCount: v0_1, size: v0_2, dataAccessTimestamp: v0_3, dataModificationTimestamp: v0_4, statusChangeTimestamp: v0_5 } = e; | ||
const val1 = v0_0; | ||
let enum1; | ||
@@ -1028,4 +1040,4 @@ switch (val1) { | ||
default: { | ||
if ((v0_2) instanceof Error) { | ||
console.error(v0_2); | ||
if ((v0_0) instanceof Error) { | ||
console.error(v0_0); | ||
} | ||
@@ -1036,14 +1048,14 @@ | ||
} | ||
dataView(memory0).setInt8(arg1 + 24, enum1, true); | ||
dataView(memory0).setBigInt64(arg1 + 32, toUint64(v0_3), true); | ||
dataView(memory0).setBigInt64(arg1 + 40, toUint64(v0_4), true); | ||
const {seconds: v2_0, nanoseconds: v2_1 } = v0_5; | ||
dataView(memory0).setBigInt64(arg1 + 48, toUint64(v2_0), true); | ||
dataView(memory0).setInt32(arg1 + 56, toUint32(v2_1), true); | ||
const {seconds: v3_0, nanoseconds: v3_1 } = v0_6; | ||
dataView(memory0).setBigInt64(arg1 + 64, toUint64(v3_0), true); | ||
dataView(memory0).setInt32(arg1 + 72, toUint32(v3_1), true); | ||
const {seconds: v4_0, nanoseconds: v4_1 } = v0_7; | ||
dataView(memory0).setBigInt64(arg1 + 80, toUint64(v4_0), true); | ||
dataView(memory0).setInt32(arg1 + 88, toUint32(v4_1), true); | ||
dataView(memory0).setInt8(arg1 + 8, enum1, true); | ||
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true); | ||
dataView(memory0).setBigInt64(arg1 + 24, toUint64(v0_2), true); | ||
const {seconds: v2_0, nanoseconds: v2_1 } = v0_3; | ||
dataView(memory0).setBigInt64(arg1 + 32, toUint64(v2_0), true); | ||
dataView(memory0).setInt32(arg1 + 40, toUint32(v2_1), true); | ||
const {seconds: v3_0, nanoseconds: v3_1 } = v0_4; | ||
dataView(memory0).setBigInt64(arg1 + 48, toUint64(v3_0), true); | ||
dataView(memory0).setInt32(arg1 + 56, toUint32(v3_1), true); | ||
const {seconds: v4_0, nanoseconds: v4_1 } = v0_5; | ||
dataView(memory0).setBigInt64(arg1 + 64, toUint64(v4_0), true); | ||
dataView(memory0).setInt32(arg1 + 72, toUint32(v4_1), true); | ||
break; | ||
@@ -1222,3 +1234,3 @@ } | ||
function trampoline14(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { | ||
function trampoline16(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) { | ||
if ((arg1 & 4294967294) !== 0) { | ||
@@ -1446,3 +1458,191 @@ throw new TypeError('flags have extraneous bits set'); | ||
function trampoline15(arg0, arg1) { | ||
function trampoline17(arg0, arg1) { | ||
let ret; | ||
try { | ||
ret = { tag: 'ok', val: metadataHash(arg0 >>> 0) }; | ||
} catch (e) { | ||
ret = { tag: 'err', val: getErrorPayload(e) }; | ||
} | ||
const variant2 = ret; | ||
switch (variant2.tag) { | ||
case 'ok': { | ||
const e = variant2.val; | ||
dataView(memory0).setInt8(arg1 + 0, 0, true); | ||
const {lower: v0_0, upper: v0_1 } = e; | ||
dataView(memory0).setBigInt64(arg1 + 8, toUint64(v0_0), true); | ||
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true); | ||
break; | ||
} | ||
case 'err': { | ||
const e = variant2.val; | ||
dataView(memory0).setInt8(arg1 + 0, 1, true); | ||
const val1 = e; | ||
let enum1; | ||
switch (val1) { | ||
case 'access': { | ||
enum1 = 0; | ||
break; | ||
} | ||
case 'would-block': { | ||
enum1 = 1; | ||
break; | ||
} | ||
case 'already': { | ||
enum1 = 2; | ||
break; | ||
} | ||
case 'bad-descriptor': { | ||
enum1 = 3; | ||
break; | ||
} | ||
case 'busy': { | ||
enum1 = 4; | ||
break; | ||
} | ||
case 'deadlock': { | ||
enum1 = 5; | ||
break; | ||
} | ||
case 'quota': { | ||
enum1 = 6; | ||
break; | ||
} | ||
case 'exist': { | ||
enum1 = 7; | ||
break; | ||
} | ||
case 'file-too-large': { | ||
enum1 = 8; | ||
break; | ||
} | ||
case 'illegal-byte-sequence': { | ||
enum1 = 9; | ||
break; | ||
} | ||
case 'in-progress': { | ||
enum1 = 10; | ||
break; | ||
} | ||
case 'interrupted': { | ||
enum1 = 11; | ||
break; | ||
} | ||
case 'invalid': { | ||
enum1 = 12; | ||
break; | ||
} | ||
case 'io': { | ||
enum1 = 13; | ||
break; | ||
} | ||
case 'is-directory': { | ||
enum1 = 14; | ||
break; | ||
} | ||
case 'loop': { | ||
enum1 = 15; | ||
break; | ||
} | ||
case 'too-many-links': { | ||
enum1 = 16; | ||
break; | ||
} | ||
case 'message-size': { | ||
enum1 = 17; | ||
break; | ||
} | ||
case 'name-too-long': { | ||
enum1 = 18; | ||
break; | ||
} | ||
case 'no-device': { | ||
enum1 = 19; | ||
break; | ||
} | ||
case 'no-entry': { | ||
enum1 = 20; | ||
break; | ||
} | ||
case 'no-lock': { | ||
enum1 = 21; | ||
break; | ||
} | ||
case 'insufficient-memory': { | ||
enum1 = 22; | ||
break; | ||
} | ||
case 'insufficient-space': { | ||
enum1 = 23; | ||
break; | ||
} | ||
case 'not-directory': { | ||
enum1 = 24; | ||
break; | ||
} | ||
case 'not-empty': { | ||
enum1 = 25; | ||
break; | ||
} | ||
case 'not-recoverable': { | ||
enum1 = 26; | ||
break; | ||
} | ||
case 'unsupported': { | ||
enum1 = 27; | ||
break; | ||
} | ||
case 'no-tty': { | ||
enum1 = 28; | ||
break; | ||
} | ||
case 'no-such-device': { | ||
enum1 = 29; | ||
break; | ||
} | ||
case 'overflow': { | ||
enum1 = 30; | ||
break; | ||
} | ||
case 'not-permitted': { | ||
enum1 = 31; | ||
break; | ||
} | ||
case 'pipe': { | ||
enum1 = 32; | ||
break; | ||
} | ||
case 'read-only': { | ||
enum1 = 33; | ||
break; | ||
} | ||
case 'invalid-seek': { | ||
enum1 = 34; | ||
break; | ||
} | ||
case 'text-file-busy': { | ||
enum1 = 35; | ||
break; | ||
} | ||
case 'cross-device': { | ||
enum1 = 36; | ||
break; | ||
} | ||
default: { | ||
if ((e) instanceof Error) { | ||
console.error(e); | ||
} | ||
throw new TypeError(`"${val1}" is not one of the cases of error-code`); | ||
} | ||
} | ||
dataView(memory0).setInt8(arg1 + 8, enum1, true); | ||
break; | ||
} | ||
default: { | ||
throw new TypeError('invalid variant specified for result'); | ||
} | ||
} | ||
} | ||
function trampoline18(arg0, arg1) { | ||
const ret = getRandomBytes(BigInt.asUintN(64, arg0)); | ||
@@ -1458,3 +1658,3 @@ const val0 = ret; | ||
function trampoline16(arg0) { | ||
function trampoline19(arg0) { | ||
const ret = getEnvironment(); | ||
@@ -1480,3 +1680,3 @@ const vec3 = ret; | ||
function trampoline17(arg0, arg1, arg2) { | ||
function trampoline20(arg0, arg1, arg2) { | ||
let ret; | ||
@@ -1488,6 +1688,6 @@ try { | ||
} | ||
const variant4 = ret; | ||
switch (variant4.tag) { | ||
const variant3 = ret; | ||
switch (variant3.tag) { | ||
case 'ok': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg2 + 0, 0, true); | ||
@@ -1525,6 +1725,4 @@ const [tuple0_0, tuple0_1] = e; | ||
case 'err': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg2 + 0, 1, true); | ||
const {dummy: v3_0 } = e; | ||
dataView(memory0).setInt32(arg2 + 4, toUint32(v3_0), true); | ||
break; | ||
@@ -1538,3 +1736,3 @@ } | ||
function trampoline18(arg0, arg1, arg2) { | ||
function trampoline21(arg0, arg1, arg2) { | ||
let ret; | ||
@@ -1546,6 +1744,6 @@ try { | ||
} | ||
const variant4 = ret; | ||
switch (variant4.tag) { | ||
const variant3 = ret; | ||
switch (variant3.tag) { | ||
case 'ok': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg2 + 0, 0, true); | ||
@@ -1583,6 +1781,4 @@ const [tuple0_0, tuple0_1] = e; | ||
case 'err': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg2 + 0, 1, true); | ||
const {dummy: v3_0 } = e; | ||
dataView(memory0).setInt32(arg2 + 4, toUint32(v3_0), true); | ||
break; | ||
@@ -1596,3 +1792,3 @@ } | ||
function trampoline19(arg0, arg1, arg2, arg3) { | ||
function trampoline22(arg0, arg1, arg2, arg3) { | ||
const ptr0 = arg1; | ||
@@ -1607,6 +1803,6 @@ const len0 = arg2; | ||
} | ||
const variant4 = ret; | ||
switch (variant4.tag) { | ||
const variant3 = ret; | ||
switch (variant3.tag) { | ||
case 'ok': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg3 + 0, 0, true); | ||
@@ -1638,6 +1834,4 @@ const [tuple1_0, tuple1_1] = e; | ||
case 'err': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg3 + 0, 1, true); | ||
const {dummy: v3_0 } = e; | ||
dataView(memory0).setInt32(arg3 + 8, toUint32(v3_0), true); | ||
break; | ||
@@ -1651,3 +1845,3 @@ } | ||
function trampoline20(arg0, arg1, arg2, arg3) { | ||
function trampoline23(arg0, arg1, arg2, arg3) { | ||
const ptr0 = arg1; | ||
@@ -1662,6 +1856,6 @@ const len0 = arg2; | ||
} | ||
const variant4 = ret; | ||
switch (variant4.tag) { | ||
const variant3 = ret; | ||
switch (variant3.tag) { | ||
case 'ok': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg3 + 0, 0, true); | ||
@@ -1693,6 +1887,4 @@ const [tuple1_0, tuple1_1] = e; | ||
case 'err': { | ||
const e = variant4.val; | ||
const e = variant3.val; | ||
dataView(memory0).setInt8(arg3 + 0, 1, true); | ||
const {dummy: v3_0 } = e; | ||
dataView(memory0).setInt32(arg3 + 8, toUint32(v3_0), true); | ||
break; | ||
@@ -1705,2 +1897,38 @@ } | ||
} | ||
function trampoline24(arg0) { | ||
const ret = getTerminalStdin(); | ||
const variant0 = ret; | ||
if (variant0 === null || variant0=== undefined) { | ||
dataView(memory0).setInt8(arg0 + 0, 0, true); | ||
} else { | ||
const e = variant0; | ||
dataView(memory0).setInt8(arg0 + 0, 1, true); | ||
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true); | ||
} | ||
} | ||
function trampoline25(arg0) { | ||
const ret = getTerminalStdout(); | ||
const variant0 = ret; | ||
if (variant0 === null || variant0=== undefined) { | ||
dataView(memory0).setInt8(arg0 + 0, 0, true); | ||
} else { | ||
const e = variant0; | ||
dataView(memory0).setInt8(arg0 + 0, 1, true); | ||
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true); | ||
} | ||
} | ||
function trampoline26(arg0) { | ||
const ret = getTerminalStderr(); | ||
const variant0 = ret; | ||
if (variant0 === null || variant0=== undefined) { | ||
dataView(memory0).setInt8(arg0 + 0, 0, true); | ||
} else { | ||
const e = variant0; | ||
dataView(memory0).setInt8(arg0 + 0, 1, true); | ||
dataView(memory0).setInt32(arg0 + 4, toUint32(e), true); | ||
} | ||
} | ||
let exports3; | ||
@@ -2047,4 +2275,4 @@ let realloc1; | ||
const module1 = fetchCompile(new URL('./js-component-bindgen-component.core2.wasm', import.meta.url)); | ||
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwADGRgAAQECAgIDBAABAQUFBgcHCAYGBgkGCgsEBQFwARgYB3oZATAAAAExAAEBMgACATMAAwE0AAQBNQAFATYABgE3AAcBOAAIATkACQIxMAAKAjExAAsCMTIADAIxMwANAjE0AA4CMTUADwIxNgAQAjE3ABECMTgAEgIxOQATAjIwABQCMjEAFQIyMgAWAjIzABcIJGltcG9ydHMBAArNAhgJACAAQQARAAALDQAgACABIAJBAREBAAsNACAAIAEgAkECEQEACwsAIAAgAUEDEQIACwsAIAAgAUEEEQIACwsAIAAgAUEFEQIACxcAIAAgASACIAMgBCAFIAYgB0EGEQMACwsAIAAgAUEHEQQACwkAIABBCBEAAAsNACAAIAEgAkEJEQEACw0AIAAgASACQQoRAQALDwAgACABIAIgA0ELEQUACw8AIAAgASACIANBDBEFAAsLACAAIAFBDREGAAsPACAAIAEgAiADQQ4RBwALDwAgACABIAIgA0EPEQcACxkAIAAgASACIAMgBCAFIAYgByAIQRARCAALCwAgACABQRERBgALCwAgACABQRIRBgALCwAgACABQRMRBgALCQAgAEEUE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YWQPJWFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfd3JpdGUQJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcGF0aF9vcGVuESdhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXJhbmRvbV9nZXQSKGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9nZXQTLmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9zaXplc19nZXQUJWFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfY2xvc2UVK2FkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9nZXQWMGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9kaXJfbmFtZRcmYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1wcm9jX2V4aXQ'); | ||
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwAClgEZAAEwAAAAATEAAQABMgABAAEzAAIAATQAAgABNQACAAE2AAMAATcABAABOAAAAAE5AAEAAjEwAAEAAjExAAUAAjEyAAUAAjEzAAYAAjE0AAcAAjE1AAcAAjE2AAgAAjE3AAYAAjE4AAYAAjE5AAYAAjIwAAkAAjIxAAYAAjIyAAoAAjIzAAsACCRpbXBvcnRzAXABGBgJHgEAQQALGAABAgMEBQYHCAkKCwwNDg8QERITFBUWFwAuCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BjAuMTMuMQAcBG5hbWUAFRR3aXQtY29tcG9uZW50OmZpeHVwcw'); | ||
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGAC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uYXBzaG90X3ByZXZpZXcxLXJhbmRvbV9nZXQWKGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9nZXQXLmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9zaXplc19nZXQYJWFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfY2xvc2UZK2FkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9nZXQaMGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZmRfcHJlc3RhdF9kaXJfbmFtZRsmYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1wcm9jX2V4aXQ'); | ||
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAN/fn8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwACrgEdAAEwAAAAATEAAQABMgABAAEzAAIAATQAAgABNQACAAE2AAMAATcAAgABOAAEAAE5AAAAAjEwAAEAAjExAAEAAjEyAAUAAjEzAAUAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAYAAjE4AAcAAjE5AAcAAjIwAAgAAjIxAAYAAjIyAAYAAjIzAAYAAjI0AAkAAjI1AAYAAjI2AAoAAjI3AAsACCRpbXBvcnRzAXABHBwJIgEAQQALHAABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhsALglwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAYwLjEzLjIAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM'); | ||
const instanceFlags0 = new WebAssembly.Global({ value: "i32", mutable: true }, 3); | ||
@@ -2055,13 +2283,13 @@ Promise.all([module0, module1, module2, module3]).catch(() => {}); | ||
wasi_snapshot_preview1: { | ||
environ_get: exports0['18'], | ||
environ_sizes_get: exports0['19'], | ||
fd_close: exports0['20'], | ||
fd_filestat_get: exports0['13'], | ||
fd_prestat_dir_name: exports0['22'], | ||
fd_prestat_get: exports0['21'], | ||
fd_read: exports0['14'], | ||
fd_write: exports0['15'], | ||
path_open: exports0['16'], | ||
proc_exit: exports0['23'], | ||
random_get: exports0['17'], | ||
environ_get: exports0['22'], | ||
environ_sizes_get: exports0['23'], | ||
fd_close: exports0['24'], | ||
fd_filestat_get: exports0['17'], | ||
fd_prestat_dir_name: exports0['26'], | ||
fd_prestat_get: exports0['25'], | ||
fd_read: exports0['18'], | ||
fd_write: exports0['19'], | ||
path_open: exports0['20'], | ||
proc_exit: exports0['27'], | ||
random_get: exports0['21'], | ||
}, | ||
@@ -2076,21 +2304,36 @@ })); | ||
}, | ||
'wasi:cli-base/environment': { | ||
'get-environment': exports0['8'], | ||
'wasi:cli/environment': { | ||
'get-environment': exports0['9'], | ||
}, | ||
'wasi:cli-base/exit': { | ||
exit: trampoline7, | ||
'wasi:cli/exit': { | ||
exit: trampoline9, | ||
}, | ||
'wasi:cli-base/preopens': { | ||
'get-directories': exports0['0'], | ||
'wasi:cli/stderr': { | ||
'get-stderr': trampoline8, | ||
}, | ||
'wasi:cli-base/stderr': { | ||
'get-stderr': trampoline6, | ||
}, | ||
'wasi:cli-base/stdin': { | ||
'wasi:cli/stdin': { | ||
'get-stdin': trampoline4, | ||
}, | ||
'wasi:cli-base/stdout': { | ||
'get-stdout': trampoline5, | ||
'wasi:cli/stdout': { | ||
'get-stdout': trampoline6, | ||
}, | ||
'wasi:filesystem/filesystem': { | ||
'wasi:cli/terminal-input': { | ||
'drop-terminal-input': trampoline5, | ||
}, | ||
'wasi:cli/terminal-output': { | ||
'drop-terminal-output': trampoline7, | ||
}, | ||
'wasi:cli/terminal-stderr': { | ||
'get-terminal-stderr': exports0['16'], | ||
}, | ||
'wasi:cli/terminal-stdin': { | ||
'get-terminal-stdin': exports0['14'], | ||
}, | ||
'wasi:cli/terminal-stdout': { | ||
'get-terminal-stdout': exports0['15'], | ||
}, | ||
'wasi:filesystem/preopens': { | ||
'get-directories': exports0['0'], | ||
}, | ||
'wasi:filesystem/types': { | ||
'append-via-stream': exports0['3'], | ||
@@ -2100,2 +2343,3 @@ 'drop-descriptor': trampoline3, | ||
'get-type': exports0['4'], | ||
'metadata-hash': exports0['7'], | ||
'open-at': exports0['6'], | ||
@@ -2107,11 +2351,11 @@ 'read-via-stream': exports0['1'], | ||
'wasi:io/streams': { | ||
'blocking-read': exports0['10'], | ||
'blocking-write': exports0['12'], | ||
'blocking-read': exports0['11'], | ||
'blocking-write': exports0['13'], | ||
'drop-input-stream': trampoline1, | ||
'drop-output-stream': trampoline2, | ||
read: exports0['9'], | ||
write: exports0['11'], | ||
read: exports0['10'], | ||
write: exports0['12'], | ||
}, | ||
'wasi:random/random': { | ||
'get-random-bytes': exports0['7'], | ||
'get-random-bytes': exports0['8'], | ||
}, | ||
@@ -2124,26 +2368,30 @@ })); | ||
$imports: exports0.$imports, | ||
'0': trampoline8, | ||
'1': trampoline9, | ||
'10': trampoline18, | ||
'11': trampoline19, | ||
'12': trampoline20, | ||
'13': exports2.fd_filestat_get, | ||
'14': exports2.fd_read, | ||
'15': exports2.fd_write, | ||
'16': exports2.path_open, | ||
'17': exports2.random_get, | ||
'18': exports2.environ_get, | ||
'19': exports2.environ_sizes_get, | ||
'2': trampoline10, | ||
'20': exports2.fd_close, | ||
'21': exports2.fd_prestat_get, | ||
'22': exports2.fd_prestat_dir_name, | ||
'23': exports2.proc_exit, | ||
'3': trampoline11, | ||
'4': trampoline12, | ||
'5': trampoline13, | ||
'6': trampoline14, | ||
'7': trampoline15, | ||
'8': trampoline16, | ||
'9': trampoline17, | ||
'0': trampoline10, | ||
'1': trampoline11, | ||
'10': trampoline20, | ||
'11': trampoline21, | ||
'12': trampoline22, | ||
'13': trampoline23, | ||
'14': trampoline24, | ||
'15': trampoline25, | ||
'16': trampoline26, | ||
'17': exports2.fd_filestat_get, | ||
'18': exports2.fd_read, | ||
'19': exports2.fd_write, | ||
'2': trampoline12, | ||
'20': exports2.path_open, | ||
'21': exports2.random_get, | ||
'22': exports2.environ_get, | ||
'23': exports2.environ_sizes_get, | ||
'24': exports2.fd_close, | ||
'25': exports2.fd_prestat_get, | ||
'26': exports2.fd_prestat_dir_name, | ||
'27': exports2.proc_exit, | ||
'3': trampoline13, | ||
'4': trampoline14, | ||
'5': trampoline15, | ||
'6': trampoline16, | ||
'7': trampoline17, | ||
'8': trampoline18, | ||
'9': trampoline19, | ||
}, | ||
@@ -2150,0 +2398,0 @@ })); |
@@ -35,12 +35,17 @@ /** | ||
} | ||
import { WasiCliBaseEnvironment } from './imports/wasi-cli-base-environment'; | ||
import { WasiCliBaseExit } from './imports/wasi-cli-base-exit'; | ||
import { WasiCliBasePreopens } from './imports/wasi-cli-base-preopens'; | ||
import { WasiCliBaseStderr } from './imports/wasi-cli-base-stderr'; | ||
import { WasiCliBaseStdin } from './imports/wasi-cli-base-stdin'; | ||
import { WasiCliBaseStdout } from './imports/wasi-cli-base-stdout'; | ||
import { WasiClocksWallClock } from './imports/wasi-clocks-wall-clock'; | ||
import { WasiFilesystemFilesystem } from './imports/wasi-filesystem-filesystem'; | ||
import { WasiIoStreams } from './imports/wasi-io-streams'; | ||
import { WasiRandomRandom } from './imports/wasi-random-random'; | ||
import { WasiCliEnvironment1 } from './imports/wasi-cli-environment'; | ||
import { WasiCliExit1 } from './imports/wasi-cli-exit'; | ||
import { WasiCliStderr1 } from './imports/wasi-cli-stderr'; | ||
import { WasiCliStdin1 } from './imports/wasi-cli-stdin'; | ||
import { WasiCliStdout1 } from './imports/wasi-cli-stdout'; | ||
import { WasiCliTerminalInput1 } from './imports/wasi-cli-terminal-input'; | ||
import { WasiCliTerminalOutput1 } from './imports/wasi-cli-terminal-output'; | ||
import { WasiCliTerminalStderr1 } from './imports/wasi-cli-terminal-stderr'; | ||
import { WasiCliTerminalStdin1 } from './imports/wasi-cli-terminal-stdin'; | ||
import { WasiCliTerminalStdout1 } from './imports/wasi-cli-terminal-stdout'; | ||
import { WasiClocksWallClock1 } from './imports/wasi-clocks-wall-clock'; | ||
import { WasiFilesystemPreopens1 } from './imports/wasi-filesystem-preopens'; | ||
import { WasiFilesystemTypes1 } from './imports/wasi-filesystem-types'; | ||
import { WasiIoStreams1 } from './imports/wasi-io-streams'; | ||
import { WasiRandomRandom1 } from './imports/wasi-random-random'; | ||
export function parse(wat: string): Uint8Array; | ||
@@ -47,0 +52,0 @@ export function print(binary: Uint8Array | ArrayBuffer): string; |
{ | ||
"name": "@bytecodealliance/jco", | ||
"version": "0.10.3", | ||
"version": "0.11.0", | ||
"description": "JavaScript tooling for working with WebAssembly Components", | ||
@@ -18,3 +18,3 @@ "author": "Guy Bedford", | ||
"dependencies": { | ||
"@bytecodealliance/preview2-shim": "0.0.12", | ||
"@bytecodealliance/preview2-shim": "0.0.13", | ||
"binaryen": "^111.0.0", | ||
@@ -21,0 +21,0 @@ "chalk-template": "^0.4.0", |
@@ -93,3 +93,3 @@ import { $init, generate } from '../../obj/js-component-bindgen-component.js'; | ||
opts.map = Object.assign({ | ||
'wasi:cli-base/*': '@bytecodealliance/preview2-shim/cli-base#*', | ||
'wasi:cli/*': '@bytecodealliance/preview2-shim/cli#*', | ||
'wasi:clocks/*': '@bytecodealliance/preview2-shim/clocks#*', | ||
@@ -96,0 +96,0 @@ 'wasi:filesystem/*': '@bytecodealliance/preview2-shim/filesystem#*', |
@@ -13,3 +13,3 @@ #!/usr/bin/env node | ||
.usage('<command> [options]') | ||
.version('0.10.3'); | ||
.version('0.11.0'); | ||
@@ -16,0 +16,0 @@ function myParseInt(value) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
13871414
86
7093
8
+ Added@bytecodealliance/preview2-shim@0.0.13(transitive)
- Removed@bytecodealliance/preview2-shim@0.0.12(transitive)