@bytecodealliance/jco 0.12.3 → 0.13.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/interfaces/wasi-cli-stderr.d.ts +1 -1
- package/obj/interfaces/wasi-cli-stdin.d.ts +1 -1
- package/obj/interfaces/wasi-cli-stdout.d.ts +1 -1
- package/obj/interfaces/wasi-cli-terminal-input.d.ts +4 -2
- package/obj/interfaces/wasi-cli-terminal-output.d.ts +4 -2
- package/obj/interfaces/wasi-cli-terminal-stderr.d.ts +1 -1
- package/obj/interfaces/wasi-cli-terminal-stdin.d.ts +1 -1
- package/obj/interfaces/wasi-cli-terminal-stdout.d.ts +1 -1
- package/obj/interfaces/wasi-filesystem-preopens.d.ts +1 -1
- package/obj/interfaces/wasi-filesystem-types.d.ts +24 -17
- package/obj/interfaces/wasi-io-streams.d.ts +26 -26
- package/obj/interfaces/wasi-sockets-tcp.d.ts +4 -0
- 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 +1 -0
- package/obj/js-component-bindgen-component.js +992 -682
- 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 +1 -0
- package/obj/wasm-tools.js +992 -682
- package/package.json +4 -4
- package/src/cmd/run.js +21 -27
- package/src/jco.js +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace WasiCliTerminalStderr {
|
|
2
2
|
export function getTerminalStderr(): TerminalOutput | undefined;
|
|
3
3
|
}
|
|
4
|
-
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output';
|
|
4
|
+
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output.js';
|
|
5
5
|
export { TerminalOutput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace WasiCliTerminalStdin {
|
|
2
2
|
export function getTerminalStdin(): TerminalInput | undefined;
|
|
3
3
|
}
|
|
4
|
-
import type { TerminalInput } from '../interfaces/wasi-cli-terminal-input';
|
|
4
|
+
import type { TerminalInput } from '../interfaces/wasi-cli-terminal-input.js';
|
|
5
5
|
export { TerminalInput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace WasiCliTerminalStdout {
|
|
2
2
|
export function getTerminalStdout(): TerminalOutput | undefined;
|
|
3
3
|
}
|
|
4
|
-
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output';
|
|
4
|
+
import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output.js';
|
|
5
5
|
export { TerminalOutput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export namespace WasiFilesystemPreopens {
|
|
2
2
|
export function getDirectories(): [Descriptor, string][];
|
|
3
3
|
}
|
|
4
|
-
import type { Descriptor } from '../interfaces/wasi-filesystem-types';
|
|
4
|
+
import type { Descriptor } from '../interfaces/wasi-filesystem-types.js';
|
|
5
5
|
export { Descriptor };
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
export namespace WasiFilesystemTypes {
|
|
2
|
-
export
|
|
3
|
-
export function
|
|
4
|
-
export
|
|
5
|
-
export function getType(this_: Descriptor): DescriptorType;
|
|
6
|
-
export function stat(this_: Descriptor): DescriptorStat;
|
|
7
|
-
export function openAt(this_: Descriptor, pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor;
|
|
8
|
-
export function dropDescriptor(this_: Descriptor): void;
|
|
9
|
-
export function dropDirectoryEntryStream(this_: DirectoryEntryStream): void;
|
|
10
|
-
export function metadataHash(this_: Descriptor): MetadataHashValue;
|
|
2
|
+
export { Descriptor };
|
|
3
|
+
export function filesystemErrorCode(err: Error): ErrorCode | undefined;
|
|
4
|
+
export { DirectoryEntryStream };
|
|
11
5
|
}
|
|
12
|
-
export type Descriptor = number;
|
|
13
6
|
export type Filesize = bigint;
|
|
14
|
-
import type { InputStream } from '../interfaces/wasi-io-streams';
|
|
7
|
+
import type { InputStream } from '../interfaces/wasi-io-streams.js';
|
|
15
8
|
export { InputStream };
|
|
16
9
|
/**
|
|
17
10
|
* # Variants
|
|
@@ -91,7 +84,7 @@ export { InputStream };
|
|
|
91
84
|
* ## `"cross-device"`
|
|
92
85
|
*/
|
|
93
86
|
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 '../interfaces/wasi-io-streams';
|
|
87
|
+
import type { OutputStream } from '../interfaces/wasi-io-streams.js';
|
|
95
88
|
export { OutputStream };
|
|
96
89
|
/**
|
|
97
90
|
* # Variants
|
|
@@ -114,15 +107,15 @@ export { OutputStream };
|
|
|
114
107
|
*/
|
|
115
108
|
export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
|
|
116
109
|
export type LinkCount = bigint;
|
|
117
|
-
import type { Datetime } from '../interfaces/wasi-clocks-wall-clock';
|
|
110
|
+
import type { Datetime } from '../interfaces/wasi-clocks-wall-clock.js';
|
|
118
111
|
export { Datetime };
|
|
119
112
|
export interface DescriptorStat {
|
|
120
113
|
type: DescriptorType,
|
|
121
114
|
linkCount: LinkCount,
|
|
122
115
|
size: Filesize,
|
|
123
|
-
dataAccessTimestamp
|
|
124
|
-
dataModificationTimestamp
|
|
125
|
-
statusChangeTimestamp
|
|
116
|
+
dataAccessTimestamp?: Datetime,
|
|
117
|
+
dataModificationTimestamp?: Datetime,
|
|
118
|
+
statusChangeTimestamp?: Datetime,
|
|
126
119
|
}
|
|
127
120
|
export interface PathFlags {
|
|
128
121
|
symlinkFollow?: boolean,
|
|
@@ -146,8 +139,22 @@ export interface Modes {
|
|
|
146
139
|
writable?: boolean,
|
|
147
140
|
executable?: boolean,
|
|
148
141
|
}
|
|
149
|
-
export type DirectoryEntryStream = number;
|
|
150
142
|
export interface MetadataHashValue {
|
|
151
143
|
lower: bigint,
|
|
152
144
|
upper: bigint,
|
|
153
145
|
}
|
|
146
|
+
import type { Error } from '../interfaces/wasi-io-streams.js';
|
|
147
|
+
export { Error };
|
|
148
|
+
|
|
149
|
+
export class Descriptor {
|
|
150
|
+
readViaStream(offset: Filesize): InputStream;
|
|
151
|
+
writeViaStream(offset: Filesize): OutputStream;
|
|
152
|
+
appendViaStream(): OutputStream;
|
|
153
|
+
getType(): DescriptorType;
|
|
154
|
+
stat(): DescriptorStat;
|
|
155
|
+
openAt(pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor;
|
|
156
|
+
metadataHash(): MetadataHashValue;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export class DirectoryEntryStream {
|
|
160
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export namespace WasiIoStreams {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
export { InputStream };
|
|
3
|
+
export { OutputStream };
|
|
4
|
+
export { Error };
|
|
5
|
+
}
|
|
6
|
+
export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
|
|
7
|
+
export interface StreamErrorLastOperationFailed {
|
|
8
|
+
tag: 'last-operation-failed',
|
|
9
|
+
val: Error,
|
|
10
|
+
}
|
|
11
|
+
export interface StreamErrorClosed {
|
|
12
|
+
tag: 'closed',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class InputStream {
|
|
16
|
+
read(len: bigint): Uint8Array;
|
|
17
|
+
blockingRead(len: bigint): Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class OutputStream {
|
|
21
|
+
checkWrite(): bigint;
|
|
22
|
+
write(contents: Uint8Array): void;
|
|
23
|
+
blockingWriteAndFlush(contents: Uint8Array): void;
|
|
24
|
+
blockingFlush(): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class Error {
|
|
10
28
|
}
|
|
11
|
-
export type InputStream = number;
|
|
12
|
-
/**
|
|
13
|
-
* # Variants
|
|
14
|
-
*
|
|
15
|
-
* ## `"open"`
|
|
16
|
-
*
|
|
17
|
-
* ## `"ended"`
|
|
18
|
-
*/
|
|
19
|
-
export type StreamStatus = 'open' | 'ended';
|
|
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
|
|
@@ -60,6 +60,7 @@ import { WasiFilesystemPreopens } from './interfaces/wasi-filesystem-preopens';
|
|
|
60
60
|
import { WasiFilesystemTypes } from './interfaces/wasi-filesystem-types';
|
|
61
61
|
import { WasiIoStreams } from './interfaces/wasi-io-streams';
|
|
62
62
|
import { WasiRandomRandom } from './interfaces/wasi-random-random';
|
|
63
|
+
import { WasiSocketsTcp } from './interfaces/wasi-sockets-tcp';
|
|
63
64
|
export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
|
|
64
65
|
export function generateTypes(name: string, options: TypeGenerationOptions): Files;
|
|
65
66
|
|