@bytecodealliance/jco 1.16.1 → 1.17.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/README.md +6 -6
- package/obj/interfaces/wasi-filesystem-types.d.ts +29 -28
- 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.js +7821 -5929
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.core2.wasm +0 -0
- package/obj/wasm-tools.js +7827 -5805
- package/package.json +94 -95
- package/src/api.js +5 -14
- package/src/browser.js +1 -1
- package/src/cmd/componentize.d.ts +1 -1
- package/src/cmd/componentize.js +14 -18
- package/src/cmd/opt.d.ts +10 -7
- package/src/cmd/opt.js +44 -96
- package/src/cmd/run.d.ts +1 -1
- package/src/cmd/run.js +31 -48
- package/src/cmd/transpile.d.ts +44 -39
- package/src/cmd/transpile.js +253 -316
- package/src/cmd/types.d.ts +15 -12
- package/src/cmd/types.js +27 -36
- package/src/cmd/wasm-tools.d.ts +1 -1
- package/src/cmd/wasm-tools.js +27 -44
- package/src/common.js +43 -57
- package/src/jco.js +200 -347
- package/types/api.d.ts.map +1 -1
- package/types/common.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<strong>JavaScript toolchain for working with <a href="https://github.com/WebAssembly/component-model">WebAssembly Components</a></strong>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
|
|
9
9
|
|
|
10
10
|
<p>
|
|
11
11
|
<a href="https://github.com/bytecodealliance/jco/actions?query=workflow%3ACI"><img src="https://github.com/bytecodealliance/jco/workflows/CI/badge.svg" alt="build status" /></a>
|
|
@@ -24,11 +24,11 @@ Jco provides a fully native JS toolchain for working with [WebAssembly Component
|
|
|
24
24
|
|
|
25
25
|
Features include:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
- "Transpiling" Wasm Component binaries into ES modules that can run in any JS environment.
|
|
28
|
+
- WASI Preview2 support in Node.js & browsers (experimental).
|
|
29
|
+
- Component builds of [Wasm Tools](https://github.com/bytecodealliance/wasm-tools) helpers, available for use as a library or CLI commands for use in native JS environments, as well as optimization helper for Components via Binaryen.
|
|
30
|
+
- Run and serve commands like Wasmtime, as JS implementations of the Command and HTTP Proxy worlds.
|
|
31
|
+
- "Componentize" command to easily create components written in JavaScript (wrapper of [ComponentizeJS](https://github.com/bytecodealliance/ComponentizeJS)).
|
|
32
32
|
|
|
33
33
|
For creating components in other languages, see the [Component Model Book](https://component-model.bytecodealliance.org/language-support.html) and [Wit Bindgen](https://github.com/bytecodealliance/wit-bindgen) for various guest bindgen helpers.
|
|
34
34
|
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
/** @module Interface wasi:filesystem/types@0.2.3 **/
|
|
2
2
|
export function filesystemErrorCode(err: Error): ErrorCode | undefined;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
* ## `"directory"`
|
|
13
|
-
*
|
|
14
|
-
* ## `"fifo"`
|
|
15
|
-
*
|
|
16
|
-
* ## `"symbolic-link"`
|
|
17
|
-
*
|
|
18
|
-
* ## `"regular-file"`
|
|
19
|
-
*
|
|
20
|
-
* ## `"socket"`
|
|
21
|
-
*/
|
|
22
|
-
export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
|
|
3
|
+
export interface DescriptorFlags {
|
|
4
|
+
read?: boolean,
|
|
5
|
+
write?: boolean,
|
|
6
|
+
fileIntegritySync?: boolean,
|
|
7
|
+
dataIntegritySync?: boolean,
|
|
8
|
+
requestedWriteSync?: boolean,
|
|
9
|
+
mutateDirectory?: boolean,
|
|
10
|
+
}
|
|
23
11
|
/**
|
|
24
12
|
* # Variants
|
|
25
13
|
*
|
|
@@ -98,6 +86,26 @@ export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | '
|
|
|
98
86
|
* ## `"cross-device"`
|
|
99
87
|
*/
|
|
100
88
|
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';
|
|
89
|
+
/**
|
|
90
|
+
* # Variants
|
|
91
|
+
*
|
|
92
|
+
* ## `"unknown"`
|
|
93
|
+
*
|
|
94
|
+
* ## `"block-device"`
|
|
95
|
+
*
|
|
96
|
+
* ## `"character-device"`
|
|
97
|
+
*
|
|
98
|
+
* ## `"directory"`
|
|
99
|
+
*
|
|
100
|
+
* ## `"fifo"`
|
|
101
|
+
*
|
|
102
|
+
* ## `"symbolic-link"`
|
|
103
|
+
*
|
|
104
|
+
* ## `"regular-file"`
|
|
105
|
+
*
|
|
106
|
+
* ## `"socket"`
|
|
107
|
+
*/
|
|
108
|
+
export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
|
|
101
109
|
export interface MetadataHashValue {
|
|
102
110
|
lower: bigint,
|
|
103
111
|
upper: bigint,
|
|
@@ -125,14 +133,6 @@ export interface OpenFlags {
|
|
|
125
133
|
exclusive?: boolean,
|
|
126
134
|
truncate?: boolean,
|
|
127
135
|
}
|
|
128
|
-
export interface DescriptorFlags {
|
|
129
|
-
read?: boolean,
|
|
130
|
-
write?: boolean,
|
|
131
|
-
fileIntegritySync?: boolean,
|
|
132
|
-
dataIntegritySync?: boolean,
|
|
133
|
-
requestedWriteSync?: boolean,
|
|
134
|
-
mutateDirectory?: boolean,
|
|
135
|
-
}
|
|
136
136
|
export interface DirectoryEntry {
|
|
137
137
|
type: DescriptorType,
|
|
138
138
|
name: string,
|
|
@@ -146,6 +146,7 @@ export class Descriptor {
|
|
|
146
146
|
readViaStream(offset: Filesize): InputStream;
|
|
147
147
|
writeViaStream(offset: Filesize): OutputStream;
|
|
148
148
|
appendViaStream(): OutputStream;
|
|
149
|
+
getFlags(): DescriptorFlags;
|
|
149
150
|
getType(): DescriptorType;
|
|
150
151
|
readDirectory(): DirectoryEntryStream;
|
|
151
152
|
stat(): DescriptorStat;
|
|
Binary file
|
|
Binary file
|