@bytecodealliance/jco 1.9.1 → 1.10.0
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/local-wasm-tools-tools.d.ts +1 -0
- package/obj/interfaces/wasi-cli-terminal-input.d.ts +4 -0
- package/obj/interfaces/wasi-cli-terminal-output.d.ts +4 -0
- package/obj/interfaces/wasi-filesystem-types.d.ts +8 -0
- package/obj/interfaces/wasi-io-error.d.ts +4 -0
- package/obj/interfaces/wasi-io-streams.d.ts +8 -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 +14 -0
- package/obj/js-component-bindgen-component.js +515 -389
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.core2.wasm +0 -0
- package/obj/wasm-tools.js +432 -375
- package/package.json +5 -5
- package/src/cmd/componentize.d.ts.map +1 -1
- package/src/cmd/opt.d.ts +7 -2
- package/src/cmd/opt.d.ts.map +1 -1
- package/src/cmd/opt.js +196 -82
- package/src/cmd/run.js +3 -3
- package/src/cmd/transpile.d.ts +15 -0
- package/src/cmd/transpile.d.ts.map +1 -1
- package/src/cmd/transpile.js +56 -0
- package/src/jco.js +11 -0
|
Binary file
|
|
Binary file
|
|
@@ -146,6 +146,10 @@ import type { Error } from './wasi-io-streams.js';
|
|
|
146
146
|
export { Error };
|
|
147
147
|
|
|
148
148
|
export class Descriptor {
|
|
149
|
+
/**
|
|
150
|
+
* This type does not have a public constructor.
|
|
151
|
+
*/
|
|
152
|
+
private constructor();
|
|
149
153
|
readViaStream(offset: Filesize): InputStream;
|
|
150
154
|
writeViaStream(offset: Filesize): OutputStream;
|
|
151
155
|
appendViaStream(): OutputStream;
|
|
@@ -159,5 +163,9 @@ export class Descriptor {
|
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
export class DirectoryEntryStream {
|
|
166
|
+
/**
|
|
167
|
+
* This type does not have a public constructor.
|
|
168
|
+
*/
|
|
169
|
+
private constructor();
|
|
162
170
|
readDirectoryEntry(): DirectoryEntry | undefined;
|
|
163
171
|
}
|
|
@@ -14,11 +14,19 @@ export interface StreamErrorClosed {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export class InputStream {
|
|
17
|
+
/**
|
|
18
|
+
* This type does not have a public constructor.
|
|
19
|
+
*/
|
|
20
|
+
private constructor();
|
|
17
21
|
read(len: bigint): Uint8Array;
|
|
18
22
|
blockingRead(len: bigint): Uint8Array;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
export class OutputStream {
|
|
26
|
+
/**
|
|
27
|
+
* This type does not have a public constructor.
|
|
28
|
+
*/
|
|
29
|
+
private constructor();
|
|
22
30
|
checkWrite(): bigint;
|
|
23
31
|
write(contents: Uint8Array): void;
|
|
24
32
|
blockingWriteAndFlush(contents: Uint8Array): void;
|
|
Binary file
|
|
Binary file
|
|
@@ -20,6 +20,18 @@ export interface BindingsModeOptimized {
|
|
|
20
20
|
export interface BindingsModeDirectOptimized {
|
|
21
21
|
tag: 'direct-optimized',
|
|
22
22
|
}
|
|
23
|
+
export interface AsyncImportsExports {
|
|
24
|
+
imports: Array<string>,
|
|
25
|
+
exports: Array<string>,
|
|
26
|
+
}
|
|
27
|
+
export type AsyncMode = AsyncModeSync | AsyncModeJspi;
|
|
28
|
+
export interface AsyncModeSync {
|
|
29
|
+
tag: 'sync',
|
|
30
|
+
}
|
|
31
|
+
export interface AsyncModeJspi {
|
|
32
|
+
tag: 'jspi',
|
|
33
|
+
val: AsyncImportsExports,
|
|
34
|
+
}
|
|
23
35
|
export interface GenerateOptions {
|
|
24
36
|
name: string,
|
|
25
37
|
noTypescript?: boolean,
|
|
@@ -35,6 +47,7 @@ export interface GenerateOptions {
|
|
|
35
47
|
noNamespacedExports?: boolean,
|
|
36
48
|
guest?: boolean,
|
|
37
49
|
multiMemory?: boolean,
|
|
50
|
+
asyncMode?: AsyncMode,
|
|
38
51
|
}
|
|
39
52
|
export type Wit = WitSource | WitBinary | WitPath;
|
|
40
53
|
export interface WitSource {
|
|
@@ -65,6 +78,7 @@ export interface TypeGenerationOptions {
|
|
|
65
78
|
map?: Maps,
|
|
66
79
|
features?: EnabledFeatureSet,
|
|
67
80
|
guest?: boolean,
|
|
81
|
+
asyncMode?: AsyncMode,
|
|
68
82
|
}
|
|
69
83
|
/**
|
|
70
84
|
* # Variants
|