@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
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export namespace LocalWasmToolsTools {
|
|
2
2
|
export function parse(wat: string): Uint8Array;
|
|
3
|
-
export function print(binary: Uint8Array
|
|
4
|
-
export function componentNew(binary: Uint8Array
|
|
5
|
-
export function componentWit(binary: Uint8Array
|
|
3
|
+
export function print(binary: Uint8Array): string;
|
|
4
|
+
export function componentNew(binary: Uint8Array, adapters: [string, Uint8Array][] | undefined): Uint8Array;
|
|
5
|
+
export function componentWit(binary: Uint8Array): string;
|
|
6
6
|
export function componentEmbed(embedOpts: EmbedOpts): Uint8Array;
|
|
7
|
-
export function metadataShow(binary: Uint8Array
|
|
8
|
-
export function metadataAdd(binary: Uint8Array
|
|
7
|
+
export function metadataShow(binary: Uint8Array): ModuleMetadata[];
|
|
8
|
+
export function metadataAdd(binary: Uint8Array, metadata: ProducersFields): Uint8Array;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* # Variants
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace WasiFilesystemPreopens {
|
|
2
2
|
export function getDirectories(): [Descriptor, string][];
|
|
3
3
|
}
|
|
4
|
-
import type { Descriptor } from '../
|
|
4
|
+
import type { Descriptor } from '../interfaces/wasi-filesystem-types';
|
|
5
5
|
export { Descriptor };
|
|
@@ -11,7 +11,7 @@ export namespace WasiFilesystemTypes {
|
|
|
11
11
|
}
|
|
12
12
|
export type Descriptor = number;
|
|
13
13
|
export type Filesize = bigint;
|
|
14
|
-
import type { InputStream } from '../
|
|
14
|
+
import type { InputStream } from '../interfaces/wasi-io-streams';
|
|
15
15
|
export { InputStream };
|
|
16
16
|
/**
|
|
17
17
|
* # Variants
|
|
@@ -91,7 +91,7 @@ export { InputStream };
|
|
|
91
91
|
* ## `"cross-device"`
|
|
92
92
|
*/
|
|
93
93
|
export type ErrorCode = 'access' | 'would-block' | 'already' | 'bad-descriptor' | 'busy' | 'deadlock' | 'quota' | 'exist' | 'file-too-large' | 'illegal-byte-sequence' | 'in-progress' | 'interrupted' | 'invalid' | 'io' | 'is-directory' | 'loop' | 'too-many-links' | 'message-size' | 'name-too-long' | 'no-device' | 'no-entry' | 'no-lock' | 'insufficient-memory' | 'insufficient-space' | 'not-directory' | 'not-empty' | 'not-recoverable' | 'unsupported' | 'no-tty' | 'no-such-device' | 'overflow' | 'not-permitted' | 'pipe' | 'read-only' | 'invalid-seek' | 'text-file-busy' | 'cross-device';
|
|
94
|
-
import type { OutputStream } from '../
|
|
94
|
+
import type { OutputStream } from '../interfaces/wasi-io-streams';
|
|
95
95
|
export { OutputStream };
|
|
96
96
|
/**
|
|
97
97
|
* # Variants
|
|
@@ -114,7 +114,7 @@ export { OutputStream };
|
|
|
114
114
|
*/
|
|
115
115
|
export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
|
|
116
116
|
export type LinkCount = bigint;
|
|
117
|
-
import type { Datetime } from '../
|
|
117
|
+
import type { Datetime } from '../interfaces/wasi-clocks-wall-clock';
|
|
118
118
|
export { Datetime };
|
|
119
119
|
export interface DescriptorStat {
|
|
120
120
|
type: DescriptorType,
|
|
@@ -2,8 +2,10 @@ export namespace WasiIoStreams {
|
|
|
2
2
|
export function read(this_: InputStream, len: bigint): [Uint8Array, StreamStatus];
|
|
3
3
|
export function blockingRead(this_: InputStream, len: bigint): [Uint8Array, StreamStatus];
|
|
4
4
|
export function dropInputStream(this_: InputStream): void;
|
|
5
|
-
export function
|
|
6
|
-
export function
|
|
5
|
+
export function checkWrite(this_: OutputStream): bigint;
|
|
6
|
+
export function write(this_: OutputStream, contents: Uint8Array): void;
|
|
7
|
+
export function blockingWriteAndFlush(this_: OutputStream, contents: Uint8Array): void;
|
|
8
|
+
export function blockingFlush(this_: OutputStream): void;
|
|
7
9
|
export function dropOutputStream(this_: OutputStream): void;
|
|
8
10
|
}
|
|
9
11
|
export type InputStream = number;
|
|
@@ -16,3 +18,11 @@ export type InputStream = number;
|
|
|
16
18
|
*/
|
|
17
19
|
export type StreamStatus = 'open' | 'ended';
|
|
18
20
|
export type OutputStream = number;
|
|
21
|
+
/**
|
|
22
|
+
* # Variants
|
|
23
|
+
*
|
|
24
|
+
* ## `"last-operation-failed"`
|
|
25
|
+
*
|
|
26
|
+
* ## `"closed"`
|
|
27
|
+
*/
|
|
28
|
+
export type WriteError = 'last-operation-failed' | 'closed';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,6 +10,7 @@ export interface GenerateOptions {
|
|
|
10
10
|
base64Cutoff?: number,
|
|
11
11
|
tlaCompat?: boolean,
|
|
12
12
|
validLiftingOptimization?: boolean,
|
|
13
|
+
tracing?: boolean,
|
|
13
14
|
}
|
|
14
15
|
export type Wit = WitSource | WitBinary | WitPath;
|
|
15
16
|
export interface WitSource {
|
|
@@ -44,22 +45,22 @@ export interface Transpiled {
|
|
|
44
45
|
imports: string[],
|
|
45
46
|
exports: [string, ExportType][],
|
|
46
47
|
}
|
|
47
|
-
import { WasiCliEnvironment } from './
|
|
48
|
-
import { WasiCliExit } from './
|
|
49
|
-
import { WasiCliStderr } from './
|
|
50
|
-
import { WasiCliStdin } from './
|
|
51
|
-
import { WasiCliStdout } from './
|
|
52
|
-
import { WasiCliTerminalInput } from './
|
|
53
|
-
import { WasiCliTerminalOutput } from './
|
|
54
|
-
import { WasiCliTerminalStderr } from './
|
|
55
|
-
import { WasiCliTerminalStdin } from './
|
|
56
|
-
import { WasiCliTerminalStdout } from './
|
|
57
|
-
import { WasiClocksWallClock } from './
|
|
58
|
-
import { WasiFilesystemPreopens } from './
|
|
59
|
-
import { WasiFilesystemTypes } from './
|
|
60
|
-
import { WasiIoStreams } from './
|
|
61
|
-
import { WasiRandomRandom } from './
|
|
62
|
-
export function generate(component: Uint8Array
|
|
48
|
+
import { WasiCliEnvironment } from './interfaces/wasi-cli-environment';
|
|
49
|
+
import { WasiCliExit } from './interfaces/wasi-cli-exit';
|
|
50
|
+
import { WasiCliStderr } from './interfaces/wasi-cli-stderr';
|
|
51
|
+
import { WasiCliStdin } from './interfaces/wasi-cli-stdin';
|
|
52
|
+
import { WasiCliStdout } from './interfaces/wasi-cli-stdout';
|
|
53
|
+
import { WasiCliTerminalInput } from './interfaces/wasi-cli-terminal-input';
|
|
54
|
+
import { WasiCliTerminalOutput } from './interfaces/wasi-cli-terminal-output';
|
|
55
|
+
import { WasiCliTerminalStderr } from './interfaces/wasi-cli-terminal-stderr';
|
|
56
|
+
import { WasiCliTerminalStdin } from './interfaces/wasi-cli-terminal-stdin';
|
|
57
|
+
import { WasiCliTerminalStdout } from './interfaces/wasi-cli-terminal-stdout';
|
|
58
|
+
import { WasiClocksWallClock } from './interfaces/wasi-clocks-wall-clock';
|
|
59
|
+
import { WasiFilesystemPreopens } from './interfaces/wasi-filesystem-preopens';
|
|
60
|
+
import { WasiFilesystemTypes } from './interfaces/wasi-filesystem-types';
|
|
61
|
+
import { WasiIoStreams } from './interfaces/wasi-io-streams';
|
|
62
|
+
import { WasiRandomRandom } from './interfaces/wasi-random-random';
|
|
63
|
+
export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
|
|
63
64
|
export function generateTypes(name: string, options: TypeGenerationOptions): Files;
|
|
64
65
|
|
|
65
66
|
export const $init: Promise<void>;
|