@bytecodealliance/jco 0.12.2 → 0.13.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.
Files changed (30) hide show
  1. package/lib/wasi_snapshot_preview1.command.wasm +0 -0
  2. package/lib/wasi_snapshot_preview1.reactor.wasm +0 -0
  3. package/obj/interfaces/wasi-cli-environment-0.2.0-rc-2023-11-05.d.ts +3 -0
  4. package/obj/interfaces/wasi-cli-exit-0.2.0-rc-2023-11-05.d.ts +4 -0
  5. package/obj/interfaces/wasi-cli-stderr-0.2.0-rc-2023-11-05.d.ts +5 -0
  6. package/obj/interfaces/wasi-cli-stdin-0.2.0-rc-2023-11-05.d.ts +5 -0
  7. package/obj/interfaces/wasi-cli-stdout-0.2.0-rc-2023-11-05.d.ts +5 -0
  8. package/obj/interfaces/wasi-cli-terminal-input-0.2.0-rc-2023-11-05.d.ts +2 -0
  9. package/obj/interfaces/wasi-cli-terminal-output-0.2.0-rc-2023-11-05.d.ts +2 -0
  10. package/obj/interfaces/wasi-cli-terminal-stderr-0.2.0-rc-2023-11-05.d.ts +5 -0
  11. package/obj/interfaces/wasi-cli-terminal-stdin-0.2.0-rc-2023-11-05.d.ts +5 -0
  12. package/obj/interfaces/wasi-cli-terminal-stdout-0.2.0-rc-2023-11-05.d.ts +5 -0
  13. package/obj/interfaces/wasi-clocks-wall-clock-0.2.0-rc-2023-11-05.d.ts +6 -0
  14. package/obj/interfaces/wasi-filesystem-preopens-0.2.0-rc-2023-11-05.d.ts +5 -0
  15. package/obj/interfaces/wasi-filesystem-types-0.2.0-rc-2023-11-05.d.ts +156 -0
  16. package/obj/interfaces/wasi-io-streams-0.2.0-rc-2023-11-05.d.ts +24 -0
  17. package/obj/interfaces/wasi-random-random-0.2.0-rc-2023-11-05.d.ts +3 -0
  18. package/obj/interfaces/wasi-sockets-tcp-0.2.0-rc-2023-11-05.d.ts +2 -0
  19. package/obj/js-component-bindgen-component.component.wasm +0 -0
  20. package/obj/js-component-bindgen-component.core.wasm +0 -0
  21. package/obj/js-component-bindgen-component.core2.wasm +0 -0
  22. package/obj/js-component-bindgen-component.d.ts +16 -15
  23. package/obj/js-component-bindgen-component.js +992 -682
  24. package/obj/wasm-tools.component.wasm +0 -0
  25. package/obj/wasm-tools.core.wasm +0 -0
  26. package/obj/wasm-tools.core2.wasm +0 -0
  27. package/obj/wasm-tools.d.ts +16 -15
  28. package/obj/wasm-tools.js +992 -682
  29. package/package.json +2 -2
  30. package/src/jco.js +1 -1
@@ -0,0 +1,3 @@
1
+ export namespace WasiCliEnvironment020rc20231105 {
2
+ export function getEnvironment(): [string, string][];
3
+ }
@@ -0,0 +1,4 @@
1
+ export namespace WasiCliExit020rc20231105 {
2
+ export function exit(status: Result<void, void>): void;
3
+ }
4
+ export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E };
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliStderr020rc20231105 {
2
+ export function getStderr(): OutputStream;
3
+ }
4
+ import type { OutputStream } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
5
+ export { OutputStream };
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliStdin020rc20231105 {
2
+ export function getStdin(): InputStream;
3
+ }
4
+ import type { InputStream } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
5
+ export { InputStream };
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliStdout020rc20231105 {
2
+ export function getStdout(): OutputStream;
3
+ }
4
+ import type { OutputStream } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
5
+ export { OutputStream };
@@ -0,0 +1,2 @@
1
+ export namespace WasiCliTerminalInput020rc20231105 {
2
+ }
@@ -0,0 +1,2 @@
1
+ export namespace WasiCliTerminalOutput020rc20231105 {
2
+ }
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliTerminalStderr020rc20231105 {
2
+ export function getTerminalStderr(): TerminalOutput | undefined;
3
+ }
4
+ import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output-0.2.0-rc-2023-11-05';
5
+ export { TerminalOutput };
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliTerminalStdin020rc20231105 {
2
+ export function getTerminalStdin(): TerminalInput | undefined;
3
+ }
4
+ import type { TerminalInput } from '../interfaces/wasi-cli-terminal-input-0.2.0-rc-2023-11-05';
5
+ export { TerminalInput };
@@ -0,0 +1,5 @@
1
+ export namespace WasiCliTerminalStdout020rc20231105 {
2
+ export function getTerminalStdout(): TerminalOutput | undefined;
3
+ }
4
+ import type { TerminalOutput } from '../interfaces/wasi-cli-terminal-output-0.2.0-rc-2023-11-05';
5
+ export { TerminalOutput };
@@ -0,0 +1,6 @@
1
+ export namespace WasiClocksWallClock020rc20231105 {
2
+ }
3
+ export interface Datetime {
4
+ seconds: bigint,
5
+ nanoseconds: number,
6
+ }
@@ -0,0 +1,5 @@
1
+ export namespace WasiFilesystemPreopens020rc20231105 {
2
+ export function getDirectories(): [Descriptor, string][];
3
+ }
4
+ import type { Descriptor } from '../interfaces/wasi-filesystem-types-0.2.0-rc-2023-11-05';
5
+ export { Descriptor };
@@ -0,0 +1,156 @@
1
+ export namespace WasiFilesystemTypes020rc20231105 {
2
+ export { Descriptor };
3
+ export function filesystemErrorCode(err: Error): ErrorCode | undefined;
4
+ }
5
+ export type Filesize = bigint;
6
+ import type { InputStream } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
7
+ export { InputStream };
8
+ /**
9
+ * # Variants
10
+ *
11
+ * ## `"access"`
12
+ *
13
+ * ## `"would-block"`
14
+ *
15
+ * ## `"already"`
16
+ *
17
+ * ## `"bad-descriptor"`
18
+ *
19
+ * ## `"busy"`
20
+ *
21
+ * ## `"deadlock"`
22
+ *
23
+ * ## `"quota"`
24
+ *
25
+ * ## `"exist"`
26
+ *
27
+ * ## `"file-too-large"`
28
+ *
29
+ * ## `"illegal-byte-sequence"`
30
+ *
31
+ * ## `"in-progress"`
32
+ *
33
+ * ## `"interrupted"`
34
+ *
35
+ * ## `"invalid"`
36
+ *
37
+ * ## `"io"`
38
+ *
39
+ * ## `"is-directory"`
40
+ *
41
+ * ## `"loop"`
42
+ *
43
+ * ## `"too-many-links"`
44
+ *
45
+ * ## `"message-size"`
46
+ *
47
+ * ## `"name-too-long"`
48
+ *
49
+ * ## `"no-device"`
50
+ *
51
+ * ## `"no-entry"`
52
+ *
53
+ * ## `"no-lock"`
54
+ *
55
+ * ## `"insufficient-memory"`
56
+ *
57
+ * ## `"insufficient-space"`
58
+ *
59
+ * ## `"not-directory"`
60
+ *
61
+ * ## `"not-empty"`
62
+ *
63
+ * ## `"not-recoverable"`
64
+ *
65
+ * ## `"unsupported"`
66
+ *
67
+ * ## `"no-tty"`
68
+ *
69
+ * ## `"no-such-device"`
70
+ *
71
+ * ## `"overflow"`
72
+ *
73
+ * ## `"not-permitted"`
74
+ *
75
+ * ## `"pipe"`
76
+ *
77
+ * ## `"read-only"`
78
+ *
79
+ * ## `"invalid-seek"`
80
+ *
81
+ * ## `"text-file-busy"`
82
+ *
83
+ * ## `"cross-device"`
84
+ */
85
+ 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';
86
+ import type { OutputStream } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
87
+ export { OutputStream };
88
+ /**
89
+ * # Variants
90
+ *
91
+ * ## `"unknown"`
92
+ *
93
+ * ## `"block-device"`
94
+ *
95
+ * ## `"character-device"`
96
+ *
97
+ * ## `"directory"`
98
+ *
99
+ * ## `"fifo"`
100
+ *
101
+ * ## `"symbolic-link"`
102
+ *
103
+ * ## `"regular-file"`
104
+ *
105
+ * ## `"socket"`
106
+ */
107
+ export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
108
+ export type LinkCount = bigint;
109
+ import type { Datetime } from '../interfaces/wasi-clocks-wall-clock-0.2.0-rc-2023-11-05';
110
+ export { Datetime };
111
+ export interface DescriptorStat {
112
+ type: DescriptorType,
113
+ linkCount: LinkCount,
114
+ size: Filesize,
115
+ dataAccessTimestamp?: Datetime,
116
+ dataModificationTimestamp?: Datetime,
117
+ statusChangeTimestamp?: Datetime,
118
+ }
119
+ export interface PathFlags {
120
+ symlinkFollow?: boolean,
121
+ }
122
+ export interface OpenFlags {
123
+ create?: boolean,
124
+ directory?: boolean,
125
+ exclusive?: boolean,
126
+ truncate?: boolean,
127
+ }
128
+ export interface DescriptorFlags {
129
+ read?: boolean,
130
+ write?: boolean,
131
+ fileIntegritySync?: boolean,
132
+ dataIntegritySync?: boolean,
133
+ requestedWriteSync?: boolean,
134
+ mutateDirectory?: boolean,
135
+ }
136
+ export interface Modes {
137
+ readable?: boolean,
138
+ writable?: boolean,
139
+ executable?: boolean,
140
+ }
141
+ export interface MetadataHashValue {
142
+ lower: bigint,
143
+ upper: bigint,
144
+ }
145
+ import type { Error } from '../interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
146
+ export { Error };
147
+
148
+ export class Descriptor {
149
+ readViaStream(offset: Filesize): InputStream;
150
+ writeViaStream(offset: Filesize): OutputStream;
151
+ appendViaStream(): OutputStream;
152
+ getType(): DescriptorType;
153
+ stat(): DescriptorStat;
154
+ openAt(pathFlags: PathFlags, path: string, openFlags: OpenFlags, flags: DescriptorFlags, modes: Modes): Descriptor;
155
+ metadataHash(): MetadataHashValue;
156
+ }
@@ -0,0 +1,24 @@
1
+ export namespace WasiIoStreams020rc20231105 {
2
+ export { InputStream };
3
+ export { OutputStream };
4
+ }
5
+ export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
6
+ export interface StreamErrorLastOperationFailed {
7
+ tag: 'last-operation-failed',
8
+ val: Error,
9
+ }
10
+ export interface StreamErrorClosed {
11
+ tag: 'closed',
12
+ }
13
+
14
+ export class InputStream {
15
+ read(len: bigint): Uint8Array;
16
+ blockingRead(len: bigint): Uint8Array;
17
+ }
18
+
19
+ export class OutputStream {
20
+ checkWrite(): bigint;
21
+ write(contents: Uint8Array): void;
22
+ blockingWriteAndFlush(contents: Uint8Array): void;
23
+ blockingFlush(): void;
24
+ }
@@ -0,0 +1,3 @@
1
+ export namespace WasiRandomRandom020rc20231105 {
2
+ export function getRandomBytes(len: bigint): Uint8Array;
3
+ }
@@ -0,0 +1,2 @@
1
+ export namespace WasiSocketsTcp020rc20231105 {
2
+ }
@@ -45,21 +45,22 @@ export interface Transpiled {
45
45
  imports: string[],
46
46
  exports: [string, ExportType][],
47
47
  }
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';
48
+ import { WasiCliEnvironment020rc20231105 } from './interfaces/wasi-cli-environment-0.2.0-rc-2023-11-05';
49
+ import { WasiCliExit020rc20231105 } from './interfaces/wasi-cli-exit-0.2.0-rc-2023-11-05';
50
+ import { WasiCliStderr020rc20231105 } from './interfaces/wasi-cli-stderr-0.2.0-rc-2023-11-05';
51
+ import { WasiCliStdin020rc20231105 } from './interfaces/wasi-cli-stdin-0.2.0-rc-2023-11-05';
52
+ import { WasiCliStdout020rc20231105 } from './interfaces/wasi-cli-stdout-0.2.0-rc-2023-11-05';
53
+ import { WasiCliTerminalInput020rc20231105 } from './interfaces/wasi-cli-terminal-input-0.2.0-rc-2023-11-05';
54
+ import { WasiCliTerminalOutput020rc20231105 } from './interfaces/wasi-cli-terminal-output-0.2.0-rc-2023-11-05';
55
+ import { WasiCliTerminalStderr020rc20231105 } from './interfaces/wasi-cli-terminal-stderr-0.2.0-rc-2023-11-05';
56
+ import { WasiCliTerminalStdin020rc20231105 } from './interfaces/wasi-cli-terminal-stdin-0.2.0-rc-2023-11-05';
57
+ import { WasiCliTerminalStdout020rc20231105 } from './interfaces/wasi-cli-terminal-stdout-0.2.0-rc-2023-11-05';
58
+ import { WasiClocksWallClock020rc20231105 } from './interfaces/wasi-clocks-wall-clock-0.2.0-rc-2023-11-05';
59
+ import { WasiFilesystemPreopens020rc20231105 } from './interfaces/wasi-filesystem-preopens-0.2.0-rc-2023-11-05';
60
+ import { WasiFilesystemTypes020rc20231105 } from './interfaces/wasi-filesystem-types-0.2.0-rc-2023-11-05';
61
+ import { WasiIoStreams020rc20231105 } from './interfaces/wasi-io-streams-0.2.0-rc-2023-11-05';
62
+ import { WasiRandomRandom020rc20231105 } from './interfaces/wasi-random-random-0.2.0-rc-2023-11-05';
63
+ import { WasiSocketsTcp020rc20231105 } from './interfaces/wasi-sockets-tcp-0.2.0-rc-2023-11-05';
63
64
  export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
64
65
  export function generateTypes(name: string, options: TypeGenerationOptions): Files;
65
66