@bytecodealliance/jco 1.24.1 → 1.24.3
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/package.json +4 -7
- package/src/api.js +9 -61
- package/src/cmd/componentize.js +2 -7
- package/src/cmd/opt.js +5 -7
- package/src/cmd/run.js +2 -2
- package/src/cmd/transpile.js +36 -604
- package/src/cmd/types.js +18 -9
- package/src/cmd/wasm-tools.js +17 -24
- package/src/jco.js +3 -3
- package/types/api.d.ts +1 -31
- package/types/api.d.ts.map +1 -1
- package/types/cmd/componentize.d.ts.map +1 -1
- package/types/cmd/opt.d.ts.map +1 -1
- package/types/cmd/transpile.d.ts +25 -15
- package/types/cmd/transpile.d.ts.map +1 -1
- package/types/cmd/types.d.ts.map +1 -1
- package/types/cmd/wasm-tools.d.ts.map +1 -1
- package/obj/interfaces/local-wasm-tools-tools.d.ts +0 -79
- package/obj/interfaces/wasi-cli-environment.d.ts +0 -2
- package/obj/interfaces/wasi-cli-exit.d.ts +0 -3
- package/obj/interfaces/wasi-cli-stderr.d.ts +0 -3
- package/obj/interfaces/wasi-cli-stdin.d.ts +0 -3
- package/obj/interfaces/wasi-cli-stdout.d.ts +0 -3
- package/obj/interfaces/wasi-cli-terminal-input.d.ts +0 -8
- package/obj/interfaces/wasi-cli-terminal-output.d.ts +0 -8
- package/obj/interfaces/wasi-cli-terminal-stderr.d.ts +0 -3
- package/obj/interfaces/wasi-cli-terminal-stdin.d.ts +0 -3
- package/obj/interfaces/wasi-cli-terminal-stdout.d.ts +0 -3
- package/obj/interfaces/wasi-clocks-wall-clock.d.ts +0 -5
- package/obj/interfaces/wasi-filesystem-preopens.d.ts +0 -3
- package/obj/interfaces/wasi-filesystem-types.d.ts +0 -165
- package/obj/interfaces/wasi-io-error.d.ts +0 -8
- package/obj/interfaces/wasi-io-streams.d.ts +0 -30
- package/obj/interfaces/wasi-random-random.d.ts +0 -2
- 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 +0 -120
- package/obj/js-component-bindgen-component.js +0 -13637
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.core2.wasm +0 -0
- package/obj/wasm-tools.d.ts +0 -20
- package/obj/wasm-tools.js +0 -14389
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** @module Interface wasi:io/streams@0.2.3 **/
|
|
2
|
-
export type Error = import('./wasi-io-error.js').Error;
|
|
3
|
-
export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
|
|
4
|
-
export interface StreamErrorLastOperationFailed {
|
|
5
|
-
tag: 'last-operation-failed',
|
|
6
|
-
val: Error,
|
|
7
|
-
}
|
|
8
|
-
export interface StreamErrorClosed {
|
|
9
|
-
tag: 'closed',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class InputStream {
|
|
13
|
-
/**
|
|
14
|
-
* This type does not have a public constructor.
|
|
15
|
-
*/
|
|
16
|
-
private constructor();
|
|
17
|
-
read(len: bigint): Uint8Array;
|
|
18
|
-
blockingRead(len: bigint): Uint8Array;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class OutputStream {
|
|
22
|
-
/**
|
|
23
|
-
* This type does not have a public constructor.
|
|
24
|
-
*/
|
|
25
|
-
private constructor();
|
|
26
|
-
checkWrite(): bigint;
|
|
27
|
-
write(contents: Uint8Array): void;
|
|
28
|
-
blockingWriteAndFlush(contents: Uint8Array): void;
|
|
29
|
-
blockingFlush(): void;
|
|
30
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// world root:component/root
|
|
2
|
-
export type Files = Array<[string, Uint8Array]>;
|
|
3
|
-
export type Maps = Array<[string, string]>;
|
|
4
|
-
export type InstantiationMode = InstantiationModeAsync | InstantiationModeSync;
|
|
5
|
-
export interface InstantiationModeAsync {
|
|
6
|
-
tag: 'async',
|
|
7
|
-
}
|
|
8
|
-
export interface InstantiationModeSync {
|
|
9
|
-
tag: 'sync',
|
|
10
|
-
}
|
|
11
|
-
export type BindingsMode = BindingsModeJs | BindingsModeHybrid | BindingsModeOptimized | BindingsModeDirectOptimized;
|
|
12
|
-
export interface BindingsModeJs {
|
|
13
|
-
tag: 'js',
|
|
14
|
-
}
|
|
15
|
-
export interface BindingsModeHybrid {
|
|
16
|
-
tag: 'hybrid',
|
|
17
|
-
}
|
|
18
|
-
export interface BindingsModeOptimized {
|
|
19
|
-
tag: 'optimized',
|
|
20
|
-
}
|
|
21
|
-
export interface BindingsModeDirectOptimized {
|
|
22
|
-
tag: 'direct-optimized',
|
|
23
|
-
}
|
|
24
|
-
export interface AsyncImportsExports {
|
|
25
|
-
imports: Array<string>,
|
|
26
|
-
exports: Array<string>,
|
|
27
|
-
}
|
|
28
|
-
export type AsyncMode = AsyncModeSync | AsyncModeJspi;
|
|
29
|
-
export interface AsyncModeSync {
|
|
30
|
-
tag: 'sync',
|
|
31
|
-
}
|
|
32
|
-
export interface AsyncModeJspi {
|
|
33
|
-
tag: 'jspi',
|
|
34
|
-
val: AsyncImportsExports,
|
|
35
|
-
}
|
|
36
|
-
export interface GenerateOptions {
|
|
37
|
-
name: string,
|
|
38
|
-
noTypescript?: boolean,
|
|
39
|
-
instantiation?: InstantiationMode,
|
|
40
|
-
importBindings?: BindingsMode,
|
|
41
|
-
map?: Maps,
|
|
42
|
-
compat?: boolean,
|
|
43
|
-
noNodejsCompat?: boolean,
|
|
44
|
-
base64Cutoff?: number,
|
|
45
|
-
tlaCompat?: boolean,
|
|
46
|
-
validLiftingOptimization?: boolean,
|
|
47
|
-
tracing?: boolean,
|
|
48
|
-
noNamespacedExports?: boolean,
|
|
49
|
-
guest?: boolean,
|
|
50
|
-
multiMemory?: boolean,
|
|
51
|
-
asyncMode?: AsyncMode,
|
|
52
|
-
strict?: boolean,
|
|
53
|
-
asmjs?: boolean,
|
|
54
|
-
}
|
|
55
|
-
export type Wit = WitSource | WitBinary | WitPath;
|
|
56
|
-
export interface WitSource {
|
|
57
|
-
tag: 'source',
|
|
58
|
-
val: string,
|
|
59
|
-
}
|
|
60
|
-
export interface WitBinary {
|
|
61
|
-
tag: 'binary',
|
|
62
|
-
val: Uint8Array,
|
|
63
|
-
}
|
|
64
|
-
export interface WitPath {
|
|
65
|
-
tag: 'path',
|
|
66
|
-
val: string,
|
|
67
|
-
}
|
|
68
|
-
export type EnabledFeatureSet = EnabledFeatureSetList | EnabledFeatureSetAll;
|
|
69
|
-
export interface EnabledFeatureSetList {
|
|
70
|
-
tag: 'list',
|
|
71
|
-
val: Array<string>,
|
|
72
|
-
}
|
|
73
|
-
export interface EnabledFeatureSetAll {
|
|
74
|
-
tag: 'all',
|
|
75
|
-
}
|
|
76
|
-
export interface TypeGenerationOptions {
|
|
77
|
-
wit: Wit,
|
|
78
|
-
world?: string,
|
|
79
|
-
tlaCompat?: boolean,
|
|
80
|
-
instantiation?: InstantiationMode,
|
|
81
|
-
map?: Maps,
|
|
82
|
-
features?: EnabledFeatureSet,
|
|
83
|
-
guest?: boolean,
|
|
84
|
-
asyncMode?: AsyncMode,
|
|
85
|
-
strict?: boolean,
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* # Variants
|
|
89
|
-
*
|
|
90
|
-
* ## `"function"`
|
|
91
|
-
*
|
|
92
|
-
* ## `"instance"`
|
|
93
|
-
*/
|
|
94
|
-
export type ExportType = 'function' | 'instance';
|
|
95
|
-
export interface Transpiled {
|
|
96
|
-
files: Files,
|
|
97
|
-
imports: Array<string>,
|
|
98
|
-
exports: Array<[string, ExportType]>,
|
|
99
|
-
}
|
|
100
|
-
export type * as WasiCliEnvironment023 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.3
|
|
101
|
-
export type * as WasiCliExit023 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.3
|
|
102
|
-
export type * as WasiCliStderr023 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.3
|
|
103
|
-
export type * as WasiCliStdin023 from './interfaces/wasi-cli-stdin.js'; // import wasi:cli/stdin@0.2.3
|
|
104
|
-
export type * as WasiCliStdout023 from './interfaces/wasi-cli-stdout.js'; // import wasi:cli/stdout@0.2.3
|
|
105
|
-
export type * as WasiCliTerminalInput023 from './interfaces/wasi-cli-terminal-input.js'; // import wasi:cli/terminal-input@0.2.3
|
|
106
|
-
export type * as WasiCliTerminalOutput023 from './interfaces/wasi-cli-terminal-output.js'; // import wasi:cli/terminal-output@0.2.3
|
|
107
|
-
export type * as WasiCliTerminalStderr023 from './interfaces/wasi-cli-terminal-stderr.js'; // import wasi:cli/terminal-stderr@0.2.3
|
|
108
|
-
export type * as WasiCliTerminalStdin023 from './interfaces/wasi-cli-terminal-stdin.js'; // import wasi:cli/terminal-stdin@0.2.3
|
|
109
|
-
export type * as WasiCliTerminalStdout023 from './interfaces/wasi-cli-terminal-stdout.js'; // import wasi:cli/terminal-stdout@0.2.3
|
|
110
|
-
export type * as WasiClocksWallClock023 from './interfaces/wasi-clocks-wall-clock.js'; // import wasi:clocks/wall-clock@0.2.3
|
|
111
|
-
export type * as WasiFilesystemPreopens023 from './interfaces/wasi-filesystem-preopens.js'; // import wasi:filesystem/preopens@0.2.3
|
|
112
|
-
export type * as WasiFilesystemTypes023 from './interfaces/wasi-filesystem-types.js'; // import wasi:filesystem/types@0.2.3
|
|
113
|
-
export type * as WasiIoError023 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.3
|
|
114
|
-
export type * as WasiIoStreams023 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.3
|
|
115
|
-
export type * as WasiRandomRandom023 from './interfaces/wasi-random-random.js'; // import wasi:random/random@0.2.3
|
|
116
|
-
export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
|
|
117
|
-
export function generateTypes(name: string, options: TypeGenerationOptions): Files;
|
|
118
|
-
export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E };
|
|
119
|
-
|
|
120
|
-
export const $init: Promise<void>;
|