@bytecodealliance/jco 1.10.0 → 1.10.2

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.
@@ -1,12 +1,11 @@
1
- export namespace LocalWasmToolsTools {
2
- export function parse(wat: string): Uint8Array;
3
- export function print(binary: Uint8Array): string;
4
- export function componentNew(binary: Uint8Array, adapters: Array<[string, Uint8Array]> | undefined): Uint8Array;
5
- export function componentWit(binary: Uint8Array): string;
6
- export function componentEmbed(embedOpts: EmbedOpts): Uint8Array;
7
- export function metadataShow(binary: Uint8Array): Array<ModuleMetadata>;
8
- export function metadataAdd(binary: Uint8Array, metadata: ProducersFields): Uint8Array;
9
- }
1
+ /** @module Interface local:wasm-tools/tools **/
2
+ export function parse(wat: string): Uint8Array;
3
+ export function print(binary: Uint8Array): string;
4
+ export function componentNew(binary: Uint8Array, adapters: Array<[string, Uint8Array]> | undefined): Uint8Array;
5
+ export function componentWit(binary: Uint8Array): string;
6
+ export function componentEmbed(embedOpts: EmbedOpts): Uint8Array;
7
+ export function metadataShow(binary: Uint8Array): Array<ModuleMetadata>;
8
+ export function metadataAdd(binary: Uint8Array, metadata: ProducersFields): Uint8Array;
10
9
  /**
11
10
  * # Variants
12
11
  *
@@ -1,3 +1,2 @@
1
- export namespace WasiCliEnvironment {
2
- export function getEnvironment(): Array<[string, string]>;
3
- }
1
+ /** @module Interface wasi:cli/environment@0.2.3 **/
2
+ export function getEnvironment(): Array<[string, string]>;
@@ -1,4 +1,3 @@
1
- export namespace WasiCliExit {
2
- export function exit(status: Result<void, void>): void;
3
- }
1
+ /** @module Interface wasi:cli/exit@0.2.3 **/
2
+ export function exit(status: Result<void, void>): void;
4
3
  export type Result<T, E> = { tag: 'ok', val: T } | { tag: 'err', val: E };
@@ -1,5 +1,3 @@
1
- export namespace WasiCliStderr {
2
- export function getStderr(): OutputStream;
3
- }
4
- import type { OutputStream } from './wasi-io-streams.js';
5
- export { OutputStream };
1
+ /** @module Interface wasi:cli/stderr@0.2.3 **/
2
+ export function getStderr(): OutputStream;
3
+ export type OutputStream = import('./wasi-io-streams.js').OutputStream;
@@ -1,5 +1,3 @@
1
- export namespace WasiCliStdin {
2
- export function getStdin(): InputStream;
3
- }
4
- import type { InputStream } from './wasi-io-streams.js';
5
- export { InputStream };
1
+ /** @module Interface wasi:cli/stdin@0.2.3 **/
2
+ export function getStdin(): InputStream;
3
+ export type InputStream = import('./wasi-io-streams.js').InputStream;
@@ -1,5 +1,3 @@
1
- export namespace WasiCliStdout {
2
- export function getStdout(): OutputStream;
3
- }
4
- import type { OutputStream } from './wasi-io-streams.js';
5
- export { OutputStream };
1
+ /** @module Interface wasi:cli/stdout@0.2.3 **/
2
+ export function getStdout(): OutputStream;
3
+ export type OutputStream = import('./wasi-io-streams.js').OutputStream;
@@ -1,6 +1,4 @@
1
- export namespace WasiCliTerminalInput {
2
- export { TerminalInput };
3
- }
1
+ /** @module Interface wasi:cli/terminal-input@0.2.3 **/
4
2
 
5
3
  export class TerminalInput {
6
4
  /**
@@ -1,6 +1,4 @@
1
- export namespace WasiCliTerminalOutput {
2
- export { TerminalOutput };
3
- }
1
+ /** @module Interface wasi:cli/terminal-output@0.2.3 **/
4
2
 
5
3
  export class TerminalOutput {
6
4
  /**
@@ -1,5 +1,3 @@
1
- export namespace WasiCliTerminalStderr {
2
- export function getTerminalStderr(): TerminalOutput | undefined;
3
- }
4
- import type { TerminalOutput } from './wasi-cli-terminal-output.js';
5
- export { TerminalOutput };
1
+ /** @module Interface wasi:cli/terminal-stderr@0.2.3 **/
2
+ export function getTerminalStderr(): TerminalOutput | undefined;
3
+ export type TerminalOutput = import('./wasi-cli-terminal-output.js').TerminalOutput;
@@ -1,5 +1,3 @@
1
- export namespace WasiCliTerminalStdin {
2
- export function getTerminalStdin(): TerminalInput | undefined;
3
- }
4
- import type { TerminalInput } from './wasi-cli-terminal-input.js';
5
- export { TerminalInput };
1
+ /** @module Interface wasi:cli/terminal-stdin@0.2.3 **/
2
+ export function getTerminalStdin(): TerminalInput | undefined;
3
+ export type TerminalInput = import('./wasi-cli-terminal-input.js').TerminalInput;
@@ -1,5 +1,3 @@
1
- export namespace WasiCliTerminalStdout {
2
- export function getTerminalStdout(): TerminalOutput | undefined;
3
- }
4
- import type { TerminalOutput } from './wasi-cli-terminal-output.js';
5
- export { TerminalOutput };
1
+ /** @module Interface wasi:cli/terminal-stdout@0.2.3 **/
2
+ export function getTerminalStdout(): TerminalOutput | undefined;
3
+ export type TerminalOutput = import('./wasi-cli-terminal-output.js').TerminalOutput;
@@ -1,5 +1,4 @@
1
- export namespace WasiClocksWallClock {
2
- }
1
+ /** @module Interface wasi:clocks/wall-clock@0.2.3 **/
3
2
  export interface Datetime {
4
3
  seconds: bigint,
5
4
  nanoseconds: number,
@@ -1,5 +1,3 @@
1
- export namespace WasiFilesystemPreopens {
2
- export function getDirectories(): Array<[Descriptor, string]>;
3
- }
4
- import type { Descriptor } from './wasi-filesystem-types.js';
5
- export { Descriptor };
1
+ /** @module Interface wasi:filesystem/preopens@0.2.3 **/
2
+ export function getDirectories(): Array<[Descriptor, string]>;
3
+ export type Descriptor = import('./wasi-filesystem-types.js').Descriptor;
@@ -1,11 +1,7 @@
1
- export namespace WasiFilesystemTypes {
2
- export { Descriptor };
3
- export { DirectoryEntryStream };
4
- export function filesystemErrorCode(err: Error): ErrorCode | undefined;
5
- }
1
+ /** @module Interface wasi:filesystem/types@0.2.3 **/
2
+ export function filesystemErrorCode(err: Error): ErrorCode | undefined;
6
3
  export type Filesize = bigint;
7
- import type { InputStream } from './wasi-io-streams.js';
8
- export { InputStream };
4
+ export type InputStream = import('./wasi-io-streams.js').InputStream;
9
5
  /**
10
6
  * # Variants
11
7
  *
@@ -84,8 +80,7 @@ export { InputStream };
84
80
  * ## `"cross-device"`
85
81
  */
86
82
  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';
87
- import type { OutputStream } from './wasi-io-streams.js';
88
- export { OutputStream };
83
+ export type OutputStream = import('./wasi-io-streams.js').OutputStream;
89
84
  /**
90
85
  * # Variants
91
86
  *
@@ -107,8 +102,7 @@ export { OutputStream };
107
102
  */
108
103
  export type DescriptorType = 'unknown' | 'block-device' | 'character-device' | 'directory' | 'fifo' | 'symbolic-link' | 'regular-file' | 'socket';
109
104
  export type LinkCount = bigint;
110
- import type { Datetime } from './wasi-clocks-wall-clock.js';
111
- export { Datetime };
105
+ export type Datetime = import('./wasi-clocks-wall-clock.js').Datetime;
112
106
  export interface DescriptorStat {
113
107
  type: DescriptorType,
114
108
  linkCount: LinkCount,
@@ -142,8 +136,7 @@ export interface DirectoryEntry {
142
136
  type: DescriptorType,
143
137
  name: string,
144
138
  }
145
- import type { Error } from './wasi-io-streams.js';
146
- export { Error };
139
+ export type Error = import('./wasi-io-streams.js').Error;
147
140
 
148
141
  export class Descriptor {
149
142
  /**
@@ -1,6 +1,4 @@
1
- export namespace WasiIoError {
2
- export { Error };
3
- }
1
+ /** @module Interface wasi:io/error@0.2.3 **/
4
2
 
5
3
  export class Error {
6
4
  /**
@@ -1,9 +1,5 @@
1
- export namespace WasiIoStreams {
2
- export { InputStream };
3
- export { OutputStream };
4
- }
5
- import type { Error } from './wasi-io-error.js';
6
- export { Error };
1
+ /** @module Interface wasi:io/streams@0.2.3 **/
2
+ export type Error = import('./wasi-io-error.js').Error;
7
3
  export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
8
4
  export interface StreamErrorLastOperationFailed {
9
5
  tag: 'last-operation-failed',
@@ -1,3 +1,2 @@
1
- export namespace WasiRandomRandom {
2
- export function getRandomBytes(len: bigint): Uint8Array;
3
- }
1
+ /** @module Interface wasi:random/random@0.2.3 **/
2
+ export function getRandomBytes(len: bigint): Uint8Array;
@@ -1,3 +1,4 @@
1
+ // world root:component/root
1
2
  export type Files = Array<[string, Uint8Array]>;
2
3
  export type Maps = Array<[string, string]>;
3
4
  export type InstantiationMode = InstantiationModeAsync | InstantiationModeSync;
@@ -93,22 +94,22 @@ export interface Transpiled {
93
94
  imports: Array<string>,
94
95
  exports: Array<[string, ExportType]>,
95
96
  }
96
- import { WasiCliEnvironment } from './interfaces/wasi-cli-environment.js';
97
- import { WasiCliExit } from './interfaces/wasi-cli-exit.js';
98
- import { WasiCliStderr } from './interfaces/wasi-cli-stderr.js';
99
- import { WasiCliStdin } from './interfaces/wasi-cli-stdin.js';
100
- import { WasiCliStdout } from './interfaces/wasi-cli-stdout.js';
101
- import { WasiCliTerminalInput } from './interfaces/wasi-cli-terminal-input.js';
102
- import { WasiCliTerminalOutput } from './interfaces/wasi-cli-terminal-output.js';
103
- import { WasiCliTerminalStderr } from './interfaces/wasi-cli-terminal-stderr.js';
104
- import { WasiCliTerminalStdin } from './interfaces/wasi-cli-terminal-stdin.js';
105
- import { WasiCliTerminalStdout } from './interfaces/wasi-cli-terminal-stdout.js';
106
- declare const WasiClocksWallClock: {};
107
- import { WasiFilesystemPreopens } from './interfaces/wasi-filesystem-preopens.js';
108
- import { WasiFilesystemTypes } from './interfaces/wasi-filesystem-types.js';
109
- import { WasiIoError } from './interfaces/wasi-io-error.js';
110
- import { WasiIoStreams } from './interfaces/wasi-io-streams.js';
111
- import { WasiRandomRandom } from './interfaces/wasi-random-random.js';
97
+ export type * as WasiCliEnvironment023 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.3
98
+ export type * as WasiCliExit023 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.3
99
+ export type * as WasiCliStderr023 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.3
100
+ export type * as WasiCliStdin023 from './interfaces/wasi-cli-stdin.js'; // import wasi:cli/stdin@0.2.3
101
+ export type * as WasiCliStdout023 from './interfaces/wasi-cli-stdout.js'; // import wasi:cli/stdout@0.2.3
102
+ export type * as WasiCliTerminalInput023 from './interfaces/wasi-cli-terminal-input.js'; // import wasi:cli/terminal-input@0.2.3
103
+ export type * as WasiCliTerminalOutput023 from './interfaces/wasi-cli-terminal-output.js'; // import wasi:cli/terminal-output@0.2.3
104
+ export type * as WasiCliTerminalStderr023 from './interfaces/wasi-cli-terminal-stderr.js'; // import wasi:cli/terminal-stderr@0.2.3
105
+ export type * as WasiCliTerminalStdin023 from './interfaces/wasi-cli-terminal-stdin.js'; // import wasi:cli/terminal-stdin@0.2.3
106
+ export type * as WasiCliTerminalStdout023 from './interfaces/wasi-cli-terminal-stdout.js'; // import wasi:cli/terminal-stdout@0.2.3
107
+ export type * as WasiClocksWallClock023 from './interfaces/wasi-clocks-wall-clock.js'; // import wasi:clocks/wall-clock@0.2.3
108
+ export type * as WasiFilesystemPreopens023 from './interfaces/wasi-filesystem-preopens.js'; // import wasi:filesystem/preopens@0.2.3
109
+ export type * as WasiFilesystemTypes023 from './interfaces/wasi-filesystem-types.js'; // import wasi:filesystem/types@0.2.3
110
+ export type * as WasiIoError023 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.3
111
+ export type * as WasiIoStreams023 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.3
112
+ export type * as WasiRandomRandom023 from './interfaces/wasi-random-random.js'; // import wasi:random/random@0.2.3
112
113
  export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
113
114
  export function generateTypes(name: string, options: TypeGenerationOptions): Files;
114
115
 
@@ -3492,6 +3492,97 @@ let exports3;
3492
3492
  let realloc1;
3493
3493
  let postReturn0;
3494
3494
  let postReturn1;
3495
+ function trampoline0(handle) {
3496
+ const handleEntry = rscTableRemove(handleTable6, handle);
3497
+ if (handleEntry.own) {
3498
+
3499
+ const rsc = captureTable6.get(handleEntry.rep);
3500
+ if (rsc) {
3501
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3502
+ captureTable6.delete(handleEntry.rep);
3503
+ } else if (DirectoryEntryStream[symbolCabiDispose]) {
3504
+ DirectoryEntryStream[symbolCabiDispose](handleEntry.rep);
3505
+ }
3506
+ }
3507
+ }
3508
+ function trampoline1(handle) {
3509
+ const handleEntry = rscTableRemove(handleTable2, handle);
3510
+ if (handleEntry.own) {
3511
+
3512
+ const rsc = captureTable2.get(handleEntry.rep);
3513
+ if (rsc) {
3514
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3515
+ captureTable2.delete(handleEntry.rep);
3516
+ } else if (OutputStream[symbolCabiDispose]) {
3517
+ OutputStream[symbolCabiDispose](handleEntry.rep);
3518
+ }
3519
+ }
3520
+ }
3521
+ function trampoline2(handle) {
3522
+ const handleEntry = rscTableRemove(handleTable0, handle);
3523
+ if (handleEntry.own) {
3524
+
3525
+ const rsc = captureTable0.get(handleEntry.rep);
3526
+ if (rsc) {
3527
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3528
+ captureTable0.delete(handleEntry.rep);
3529
+ } else if (Error$1[symbolCabiDispose]) {
3530
+ Error$1[symbolCabiDispose](handleEntry.rep);
3531
+ }
3532
+ }
3533
+ }
3534
+ function trampoline3(handle) {
3535
+ const handleEntry = rscTableRemove(handleTable1, handle);
3536
+ if (handleEntry.own) {
3537
+
3538
+ const rsc = captureTable1.get(handleEntry.rep);
3539
+ if (rsc) {
3540
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3541
+ captureTable1.delete(handleEntry.rep);
3542
+ } else if (InputStream[symbolCabiDispose]) {
3543
+ InputStream[symbolCabiDispose](handleEntry.rep);
3544
+ }
3545
+ }
3546
+ }
3547
+ function trampoline4(handle) {
3548
+ const handleEntry = rscTableRemove(handleTable5, handle);
3549
+ if (handleEntry.own) {
3550
+
3551
+ const rsc = captureTable5.get(handleEntry.rep);
3552
+ if (rsc) {
3553
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3554
+ captureTable5.delete(handleEntry.rep);
3555
+ } else if (Descriptor[symbolCabiDispose]) {
3556
+ Descriptor[symbolCabiDispose](handleEntry.rep);
3557
+ }
3558
+ }
3559
+ }
3560
+ function trampoline6(handle) {
3561
+ const handleEntry = rscTableRemove(handleTable3, handle);
3562
+ if (handleEntry.own) {
3563
+
3564
+ const rsc = captureTable3.get(handleEntry.rep);
3565
+ if (rsc) {
3566
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3567
+ captureTable3.delete(handleEntry.rep);
3568
+ } else if (TerminalInput[symbolCabiDispose]) {
3569
+ TerminalInput[symbolCabiDispose](handleEntry.rep);
3570
+ }
3571
+ }
3572
+ }
3573
+ function trampoline7(handle) {
3574
+ const handleEntry = rscTableRemove(handleTable4, handle);
3575
+ if (handleEntry.own) {
3576
+
3577
+ const rsc = captureTable4.get(handleEntry.rep);
3578
+ if (rsc) {
3579
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3580
+ captureTable4.delete(handleEntry.rep);
3581
+ } else if (TerminalOutput[symbolCabiDispose]) {
3582
+ TerminalOutput[symbolCabiDispose](handleEntry.rep);
3583
+ }
3584
+ }
3585
+ }
3495
3586
  let exports1Generate;
3496
3587
 
3497
3588
  function generate(arg0, arg1) {
@@ -4035,121 +4126,30 @@ function generateTypes(arg0, arg1) {
4035
4126
  }
4036
4127
  return retVal.val;
4037
4128
  }
4038
- function trampoline0(handle) {
4039
- const handleEntry = rscTableRemove(handleTable6, handle);
4040
- if (handleEntry.own) {
4041
-
4042
- const rsc = captureTable6.get(handleEntry.rep);
4043
- if (rsc) {
4044
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4045
- captureTable6.delete(handleEntry.rep);
4046
- } else if (DirectoryEntryStream[symbolCabiDispose]) {
4047
- DirectoryEntryStream[symbolCabiDispose](handleEntry.rep);
4048
- }
4049
- }
4050
- }
4051
- function trampoline1(handle) {
4052
- const handleEntry = rscTableRemove(handleTable2, handle);
4053
- if (handleEntry.own) {
4054
-
4055
- const rsc = captureTable2.get(handleEntry.rep);
4056
- if (rsc) {
4057
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4058
- captureTable2.delete(handleEntry.rep);
4059
- } else if (OutputStream[symbolCabiDispose]) {
4060
- OutputStream[symbolCabiDispose](handleEntry.rep);
4061
- }
4062
- }
4063
- }
4064
- function trampoline2(handle) {
4065
- const handleEntry = rscTableRemove(handleTable0, handle);
4066
- if (handleEntry.own) {
4067
-
4068
- const rsc = captureTable0.get(handleEntry.rep);
4069
- if (rsc) {
4070
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4071
- captureTable0.delete(handleEntry.rep);
4072
- } else if (Error$1[symbolCabiDispose]) {
4073
- Error$1[symbolCabiDispose](handleEntry.rep);
4074
- }
4075
- }
4076
- }
4077
- function trampoline3(handle) {
4078
- const handleEntry = rscTableRemove(handleTable1, handle);
4079
- if (handleEntry.own) {
4080
-
4081
- const rsc = captureTable1.get(handleEntry.rep);
4082
- if (rsc) {
4083
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4084
- captureTable1.delete(handleEntry.rep);
4085
- } else if (InputStream[symbolCabiDispose]) {
4086
- InputStream[symbolCabiDispose](handleEntry.rep);
4087
- }
4088
- }
4089
- }
4090
- function trampoline4(handle) {
4091
- const handleEntry = rscTableRemove(handleTable5, handle);
4092
- if (handleEntry.own) {
4093
-
4094
- const rsc = captureTable5.get(handleEntry.rep);
4095
- if (rsc) {
4096
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4097
- captureTable5.delete(handleEntry.rep);
4098
- } else if (Descriptor[symbolCabiDispose]) {
4099
- Descriptor[symbolCabiDispose](handleEntry.rep);
4100
- }
4101
- }
4102
- }
4103
- function trampoline6(handle) {
4104
- const handleEntry = rscTableRemove(handleTable3, handle);
4105
- if (handleEntry.own) {
4106
-
4107
- const rsc = captureTable3.get(handleEntry.rep);
4108
- if (rsc) {
4109
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4110
- captureTable3.delete(handleEntry.rep);
4111
- } else if (TerminalInput[symbolCabiDispose]) {
4112
- TerminalInput[symbolCabiDispose](handleEntry.rep);
4113
- }
4114
- }
4115
- }
4116
- function trampoline7(handle) {
4117
- const handleEntry = rscTableRemove(handleTable4, handle);
4118
- if (handleEntry.own) {
4119
-
4120
- const rsc = captureTable4.get(handleEntry.rep);
4121
- if (rsc) {
4122
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4123
- captureTable4.delete(handleEntry.rep);
4124
- } else if (TerminalOutput[symbolCabiDispose]) {
4125
- TerminalOutput[symbolCabiDispose](handleEntry.rep);
4126
- }
4127
- }
4128
- }
4129
4129
 
4130
4130
  let _initialized = false;
4131
4131
  export const $init = (() => {
4132
4132
  let gen = (function* init () {
4133
4133
  const module0 = fetchCompile(new URL('./js-component-bindgen-component.core.wasm', import.meta.url));
4134
4134
  const module1 = fetchCompile(new URL('./js-component-bindgen-component.core2.wasm', import.meta.url));
4135
- const module2 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwADJiUEBwgJAgIEAgIKAgsBAQAAAAUDAwAAAAUMAAMDAAYGAA0BAQEBBAUBcAElJQe7ASYBMAAAATEAAQEyAAIBMwADATQABAE1AAUBNgAGATcABwE4AAgBOQAJAjEwAAoCMTEACwIxMgAMAjEzAA0CMTQADgIxNQAPAjE2ABACMTcAEQIxOAASAjE5ABMCMjAAFAIyMQAVAjIyABYCMjMAFwIyNAAYAjI1ABkCMjYAGgIyNwAbAjI4ABwCMjkAHQIzMAAeAjMxAB8CMzIAIAIzMwAhAjM0ACICMzUAIwIzNgAkCCRpbXBvcnRzAQAK+QMlDwAgACABIAIgA0EAEQQACxkAIAAgASACIAMgBCAFIAYgByAIQQERBwALEQAgACABIAIgAyAEQQIRCAALEQAgACABIAIgAyAEQQMRCQALCwAgACABQQQRAgALCwAgACABQQURAgALDwAgACABIAIgA0EGEQQACwsAIAAgAUEHEQIACwsAIAAgAUEIEQIACwkAIABBCREKAAsLACAAIAFBChECAAsNACAAIAEgAkELEQsACwkAIABBDBEBAAsJACAAQQ0RAQALCwAgACABQQ4RAAALCwAgACABQQ8RAAALCwAgACABQRARAAALEQAgACABIAIgAyAEQRERBQALDQAgACABIAJBEhEDAAsNACAAIAEgAkETEQMACwsAIAAgAUEUEQAACwsAIAAgAUEVEQAACwsAIAAgAUEWEQAACxEAIAAgASACIAMgBEEXEQUACxUAIAAgASACIAMgBCAFIAZBGBEMAAsLACAAIAFBGREAAAsNACAAIAEgAkEaEQMACw0AIAAgASACQRsRAwALCwAgACABQRwRAAALDwAgACABIAIgA0EdEQYACw8AIAAgASACIANBHhEGAAsLACAAIAFBHxEAAAsLACAAIAFBIBENAAsJACAAQSERAQALCQAgAEEiEQEACwkAIABBIxEBAAsJACAAQSQRAQALAC8JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQHMC4yMjUuMA');
4136
- const module3 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwAC5AEmAAEwAAQAATEABwABMgAIAAEzAAkAATQAAgABNQACAAE2AAQAATcAAgABOAACAAE5AAoAAjEwAAIAAjExAAsAAjEyAAEAAjEzAAEAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAUAAjE4AAMAAjE5AAMAAjIwAAAAAjIxAAAAAjIyAAAAAjIzAAUAAjI0AAwAAjI1AAAAAjI2AAMAAjI3AAMAAjI4AAAAAjI5AAYAAjMwAAYAAjMxAAAAAjMyAA0AAjMzAAEAAjM0AAEAAjM1AAEAAjM2AAEACCRpbXBvcnRzAXABJSUJKwEAQQALJQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQALwlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAcwLjIyNS4w');
4135
+ const module2 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwADJiUHCAkCAgQEAgIKAgsBAQAAAAUDAwAAAAUMAAMDAAYGAA0BAQEBBAUBcAElJQe7ASYBMAAAATEAAQEyAAIBMwADATQABAE1AAUBNgAGATcABwE4AAgBOQAJAjEwAAoCMTEACwIxMgAMAjEzAA0CMTQADgIxNQAPAjE2ABACMTcAEQIxOAASAjE5ABMCMjAAFAIyMQAVAjIyABYCMjMAFwIyNAAYAjI1ABkCMjYAGgIyNwAbAjI4ABwCMjkAHQIzMAAeAjMxAB8CMzIAIAIzMwAhAjM0ACICMzUAIwIzNgAkCCRpbXBvcnRzAQAK+QMlGQAgACABIAIgAyAEIAUgBiAHIAhBABEHAAsRACAAIAEgAiADIARBAREIAAsRACAAIAEgAiADIARBAhEJAAsLACAAIAFBAxECAAsLACAAIAFBBBECAAsPACAAIAEgAiADQQURBAALDwAgACABIAIgA0EGEQQACwsAIAAgAUEHEQIACwsAIAAgAUEIEQIACwkAIABBCREKAAsLACAAIAFBChECAAsNACAAIAEgAkELEQsACwkAIABBDBEBAAsJACAAQQ0RAQALCwAgACABQQ4RAAALCwAgACABQQ8RAAALCwAgACABQRARAAALEQAgACABIAIgAyAEQRERBQALDQAgACABIAJBEhEDAAsNACAAIAEgAkETEQMACwsAIAAgAUEUEQAACwsAIAAgAUEVEQAACwsAIAAgAUEWEQAACxEAIAAgASACIAMgBEEXEQUACxUAIAAgASACIAMgBCAFIAZBGBEMAAsLACAAIAFBGREAAAsNACAAIAEgAkEaEQMACw0AIAAgASACQRsRAwALCwAgACABQRwRAAALDwAgACABIAIgA0EdEQYACw8AIAAgASACIANBHhEGAAsLACAAIAFBHxEAAAsLACAAIAFBIBENAAsJACAAQSERAQALCQAgAEEiEQEACwkAIABBIxEBAAsJACAAQSQRAQALAC8JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQHMC4yMjUuMA');
4136
+ const module3 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwAC5AEmAAEwAAcAATEACAABMgAJAAEzAAIAATQAAgABNQAEAAE2AAQAATcAAgABOAACAAE5AAoAAjEwAAIAAjExAAsAAjEyAAEAAjEzAAEAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAUAAjE4AAMAAjE5AAMAAjIwAAAAAjIxAAAAAjIyAAAAAjIzAAUAAjI0AAwAAjI1AAAAAjI2AAMAAjI3AAMAAjI4AAAAAjI5AAYAAjMwAAYAAjMxAAAAAjMyAA0AAjMzAAEAAjM0AAEAAjM1AAEAAjM2AAEACCRpbXBvcnRzAXABJSUJKwEAQQALJQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQALwlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAcwLjIyNS4w');
4137
4137
  ({ exports: exports0 } = yield instantiateCore(yield module2));
4138
4138
  ({ exports: exports1 } = yield instantiateCore(yield module0, {
4139
4139
  wasi_snapshot_preview1: {
4140
4140
  environ_get: exports0['7'],
4141
4141
  environ_sizes_get: exports0['8'],
4142
4142
  fd_close: exports0['9'],
4143
- fd_filestat_get: exports0['5'],
4143
+ fd_filestat_get: exports0['4'],
4144
4144
  fd_prestat_dir_name: exports0['11'],
4145
4145
  fd_prestat_get: exports0['10'],
4146
- fd_read: exports0['6'],
4147
- fd_readdir: exports0['2'],
4148
- fd_write: exports0['0'],
4149
- path_filestat_get: exports0['3'],
4150
- path_open: exports0['1'],
4146
+ fd_read: exports0['5'],
4147
+ fd_readdir: exports0['1'],
4148
+ fd_write: exports0['6'],
4149
+ path_filestat_get: exports0['2'],
4150
+ path_open: exports0['0'],
4151
4151
  proc_exit: exports0['12'],
4152
- random_get: exports0['4'],
4152
+ random_get: exports0['3'],
4153
4153
  },
4154
4154
  }));
4155
4155
  ({ exports: exports2 } = yield instantiateCore(yield module1, {
@@ -4230,8 +4230,8 @@ export const $init = (() => {
4230
4230
  ({ exports: exports3 } = yield instantiateCore(yield module3, {
4231
4231
  '': {
4232
4232
  $imports: exports0.$imports,
4233
- '0': exports2.fd_write,
4234
- '1': exports2.path_open,
4233
+ '0': exports2.path_open,
4234
+ '1': exports2.fd_readdir,
4235
4235
  '10': exports2.fd_prestat_get,
4236
4236
  '11': exports2.fd_prestat_dir_name,
4237
4237
  '12': exports2.proc_exit,
@@ -4242,7 +4242,7 @@ export const $init = (() => {
4242
4242
  '17': trampoline15,
4243
4243
  '18': trampoline16,
4244
4244
  '19': trampoline17,
4245
- '2': exports2.fd_readdir,
4245
+ '2': exports2.path_filestat_get,
4246
4246
  '20': trampoline18,
4247
4247
  '21': trampoline19,
4248
4248
  '22': trampoline20,
@@ -4253,7 +4253,7 @@ export const $init = (() => {
4253
4253
  '27': trampoline25,
4254
4254
  '28': trampoline26,
4255
4255
  '29': trampoline27,
4256
- '3': exports2.path_filestat_get,
4256
+ '3': exports2.random_get,
4257
4257
  '30': trampoline28,
4258
4258
  '31': trampoline29,
4259
4259
  '32': trampoline30,
@@ -4261,9 +4261,9 @@ export const $init = (() => {
4261
4261
  '34': trampoline32,
4262
4262
  '35': trampoline33,
4263
4263
  '36': trampoline34,
4264
- '4': exports2.random_get,
4265
- '5': exports2.fd_filestat_get,
4266
- '6': exports2.fd_read,
4264
+ '4': exports2.fd_filestat_get,
4265
+ '5': exports2.fd_read,
4266
+ '6': exports2.fd_write,
4267
4267
  '7': exports2.environ_get,
4268
4268
  '8': exports2.environ_sizes_get,
4269
4269
  '9': exports2.fd_close,
Binary file
@@ -1,20 +1,20 @@
1
- import { WasiCliEnvironment } from './interfaces/wasi-cli-environment.js';
2
- import { WasiCliExit } from './interfaces/wasi-cli-exit.js';
3
- import { WasiCliStderr } from './interfaces/wasi-cli-stderr.js';
4
- import { WasiCliStdin } from './interfaces/wasi-cli-stdin.js';
5
- import { WasiCliStdout } from './interfaces/wasi-cli-stdout.js';
6
- import { WasiCliTerminalInput } from './interfaces/wasi-cli-terminal-input.js';
7
- import { WasiCliTerminalOutput } from './interfaces/wasi-cli-terminal-output.js';
8
- import { WasiCliTerminalStderr } from './interfaces/wasi-cli-terminal-stderr.js';
9
- import { WasiCliTerminalStdin } from './interfaces/wasi-cli-terminal-stdin.js';
10
- import { WasiCliTerminalStdout } from './interfaces/wasi-cli-terminal-stdout.js';
11
- declare const WasiClocksWallClock: {};
12
- import { WasiFilesystemPreopens } from './interfaces/wasi-filesystem-preopens.js';
13
- import { WasiFilesystemTypes } from './interfaces/wasi-filesystem-types.js';
14
- import { WasiIoError } from './interfaces/wasi-io-error.js';
15
- import { WasiIoStreams } from './interfaces/wasi-io-streams.js';
16
- import { WasiRandomRandom } from './interfaces/wasi-random-random.js';
17
- import { LocalWasmToolsTools } from './interfaces/local-wasm-tools-tools.js';
18
- export const tools: typeof LocalWasmToolsTools;
1
+ // world root:component/root
2
+ export type * as WasiCliEnvironment023 from './interfaces/wasi-cli-environment.js'; // import wasi:cli/environment@0.2.3
3
+ export type * as WasiCliExit023 from './interfaces/wasi-cli-exit.js'; // import wasi:cli/exit@0.2.3
4
+ export type * as WasiCliStderr023 from './interfaces/wasi-cli-stderr.js'; // import wasi:cli/stderr@0.2.3
5
+ export type * as WasiCliStdin023 from './interfaces/wasi-cli-stdin.js'; // import wasi:cli/stdin@0.2.3
6
+ export type * as WasiCliStdout023 from './interfaces/wasi-cli-stdout.js'; // import wasi:cli/stdout@0.2.3
7
+ export type * as WasiCliTerminalInput023 from './interfaces/wasi-cli-terminal-input.js'; // import wasi:cli/terminal-input@0.2.3
8
+ export type * as WasiCliTerminalOutput023 from './interfaces/wasi-cli-terminal-output.js'; // import wasi:cli/terminal-output@0.2.3
9
+ export type * as WasiCliTerminalStderr023 from './interfaces/wasi-cli-terminal-stderr.js'; // import wasi:cli/terminal-stderr@0.2.3
10
+ export type * as WasiCliTerminalStdin023 from './interfaces/wasi-cli-terminal-stdin.js'; // import wasi:cli/terminal-stdin@0.2.3
11
+ export type * as WasiCliTerminalStdout023 from './interfaces/wasi-cli-terminal-stdout.js'; // import wasi:cli/terminal-stdout@0.2.3
12
+ export type * as WasiClocksWallClock023 from './interfaces/wasi-clocks-wall-clock.js'; // import wasi:clocks/wall-clock@0.2.3
13
+ export type * as WasiFilesystemPreopens023 from './interfaces/wasi-filesystem-preopens.js'; // import wasi:filesystem/preopens@0.2.3
14
+ export type * as WasiFilesystemTypes023 from './interfaces/wasi-filesystem-types.js'; // import wasi:filesystem/types@0.2.3
15
+ export type * as WasiIoError023 from './interfaces/wasi-io-error.js'; // import wasi:io/error@0.2.3
16
+ export type * as WasiIoStreams023 from './interfaces/wasi-io-streams.js'; // import wasi:io/streams@0.2.3
17
+ export type * as WasiRandomRandom023 from './interfaces/wasi-random-random.js'; // import wasi:random/random@0.2.3
18
+ export * as tools from './interfaces/local-wasm-tools-tools.js'; // export local:wasm-tools/tools
19
19
 
20
20
  export const $init: Promise<void>;
package/obj/wasm-tools.js CHANGED
@@ -3492,6 +3492,97 @@ let exports3;
3492
3492
  let realloc1;
3493
3493
  let postReturn0;
3494
3494
  let postReturn1;
3495
+ function trampoline0(handle) {
3496
+ const handleEntry = rscTableRemove(handleTable6, handle);
3497
+ if (handleEntry.own) {
3498
+
3499
+ const rsc = captureTable6.get(handleEntry.rep);
3500
+ if (rsc) {
3501
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3502
+ captureTable6.delete(handleEntry.rep);
3503
+ } else if (DirectoryEntryStream[symbolCabiDispose]) {
3504
+ DirectoryEntryStream[symbolCabiDispose](handleEntry.rep);
3505
+ }
3506
+ }
3507
+ }
3508
+ function trampoline1(handle) {
3509
+ const handleEntry = rscTableRemove(handleTable2, handle);
3510
+ if (handleEntry.own) {
3511
+
3512
+ const rsc = captureTable2.get(handleEntry.rep);
3513
+ if (rsc) {
3514
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3515
+ captureTable2.delete(handleEntry.rep);
3516
+ } else if (OutputStream[symbolCabiDispose]) {
3517
+ OutputStream[symbolCabiDispose](handleEntry.rep);
3518
+ }
3519
+ }
3520
+ }
3521
+ function trampoline2(handle) {
3522
+ const handleEntry = rscTableRemove(handleTable0, handle);
3523
+ if (handleEntry.own) {
3524
+
3525
+ const rsc = captureTable0.get(handleEntry.rep);
3526
+ if (rsc) {
3527
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3528
+ captureTable0.delete(handleEntry.rep);
3529
+ } else if (Error$1[symbolCabiDispose]) {
3530
+ Error$1[symbolCabiDispose](handleEntry.rep);
3531
+ }
3532
+ }
3533
+ }
3534
+ function trampoline3(handle) {
3535
+ const handleEntry = rscTableRemove(handleTable1, handle);
3536
+ if (handleEntry.own) {
3537
+
3538
+ const rsc = captureTable1.get(handleEntry.rep);
3539
+ if (rsc) {
3540
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3541
+ captureTable1.delete(handleEntry.rep);
3542
+ } else if (InputStream[symbolCabiDispose]) {
3543
+ InputStream[symbolCabiDispose](handleEntry.rep);
3544
+ }
3545
+ }
3546
+ }
3547
+ function trampoline4(handle) {
3548
+ const handleEntry = rscTableRemove(handleTable5, handle);
3549
+ if (handleEntry.own) {
3550
+
3551
+ const rsc = captureTable5.get(handleEntry.rep);
3552
+ if (rsc) {
3553
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3554
+ captureTable5.delete(handleEntry.rep);
3555
+ } else if (Descriptor[symbolCabiDispose]) {
3556
+ Descriptor[symbolCabiDispose](handleEntry.rep);
3557
+ }
3558
+ }
3559
+ }
3560
+ function trampoline6(handle) {
3561
+ const handleEntry = rscTableRemove(handleTable3, handle);
3562
+ if (handleEntry.own) {
3563
+
3564
+ const rsc = captureTable3.get(handleEntry.rep);
3565
+ if (rsc) {
3566
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3567
+ captureTable3.delete(handleEntry.rep);
3568
+ } else if (TerminalInput[symbolCabiDispose]) {
3569
+ TerminalInput[symbolCabiDispose](handleEntry.rep);
3570
+ }
3571
+ }
3572
+ }
3573
+ function trampoline7(handle) {
3574
+ const handleEntry = rscTableRemove(handleTable4, handle);
3575
+ if (handleEntry.own) {
3576
+
3577
+ const rsc = captureTable4.get(handleEntry.rep);
3578
+ if (rsc) {
3579
+ if (rsc[symbolDispose]) rsc[symbolDispose]();
3580
+ captureTable4.delete(handleEntry.rep);
3581
+ } else if (TerminalOutput[symbolCabiDispose]) {
3582
+ TerminalOutput[symbolCabiDispose](handleEntry.rep);
3583
+ }
3584
+ }
3585
+ }
3495
3586
  let toolsParse;
3496
3587
 
3497
3588
  function parse(arg0) {
@@ -4087,121 +4178,30 @@ function metadataAdd(arg0, arg1) {
4087
4178
  }
4088
4179
  return retVal.val;
4089
4180
  }
4090
- function trampoline0(handle) {
4091
- const handleEntry = rscTableRemove(handleTable6, handle);
4092
- if (handleEntry.own) {
4093
-
4094
- const rsc = captureTable6.get(handleEntry.rep);
4095
- if (rsc) {
4096
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4097
- captureTable6.delete(handleEntry.rep);
4098
- } else if (DirectoryEntryStream[symbolCabiDispose]) {
4099
- DirectoryEntryStream[symbolCabiDispose](handleEntry.rep);
4100
- }
4101
- }
4102
- }
4103
- function trampoline1(handle) {
4104
- const handleEntry = rscTableRemove(handleTable2, handle);
4105
- if (handleEntry.own) {
4106
-
4107
- const rsc = captureTable2.get(handleEntry.rep);
4108
- if (rsc) {
4109
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4110
- captureTable2.delete(handleEntry.rep);
4111
- } else if (OutputStream[symbolCabiDispose]) {
4112
- OutputStream[symbolCabiDispose](handleEntry.rep);
4113
- }
4114
- }
4115
- }
4116
- function trampoline2(handle) {
4117
- const handleEntry = rscTableRemove(handleTable0, handle);
4118
- if (handleEntry.own) {
4119
-
4120
- const rsc = captureTable0.get(handleEntry.rep);
4121
- if (rsc) {
4122
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4123
- captureTable0.delete(handleEntry.rep);
4124
- } else if (Error$1[symbolCabiDispose]) {
4125
- Error$1[symbolCabiDispose](handleEntry.rep);
4126
- }
4127
- }
4128
- }
4129
- function trampoline3(handle) {
4130
- const handleEntry = rscTableRemove(handleTable1, handle);
4131
- if (handleEntry.own) {
4132
-
4133
- const rsc = captureTable1.get(handleEntry.rep);
4134
- if (rsc) {
4135
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4136
- captureTable1.delete(handleEntry.rep);
4137
- } else if (InputStream[symbolCabiDispose]) {
4138
- InputStream[symbolCabiDispose](handleEntry.rep);
4139
- }
4140
- }
4141
- }
4142
- function trampoline4(handle) {
4143
- const handleEntry = rscTableRemove(handleTable5, handle);
4144
- if (handleEntry.own) {
4145
-
4146
- const rsc = captureTable5.get(handleEntry.rep);
4147
- if (rsc) {
4148
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4149
- captureTable5.delete(handleEntry.rep);
4150
- } else if (Descriptor[symbolCabiDispose]) {
4151
- Descriptor[symbolCabiDispose](handleEntry.rep);
4152
- }
4153
- }
4154
- }
4155
- function trampoline6(handle) {
4156
- const handleEntry = rscTableRemove(handleTable3, handle);
4157
- if (handleEntry.own) {
4158
-
4159
- const rsc = captureTable3.get(handleEntry.rep);
4160
- if (rsc) {
4161
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4162
- captureTable3.delete(handleEntry.rep);
4163
- } else if (TerminalInput[symbolCabiDispose]) {
4164
- TerminalInput[symbolCabiDispose](handleEntry.rep);
4165
- }
4166
- }
4167
- }
4168
- function trampoline7(handle) {
4169
- const handleEntry = rscTableRemove(handleTable4, handle);
4170
- if (handleEntry.own) {
4171
-
4172
- const rsc = captureTable4.get(handleEntry.rep);
4173
- if (rsc) {
4174
- if (rsc[symbolDispose]) rsc[symbolDispose]();
4175
- captureTable4.delete(handleEntry.rep);
4176
- } else if (TerminalOutput[symbolCabiDispose]) {
4177
- TerminalOutput[symbolCabiDispose](handleEntry.rep);
4178
- }
4179
- }
4180
- }
4181
4181
 
4182
4182
  let _initialized = false;
4183
4183
  export const $init = (() => {
4184
4184
  let gen = (function* init () {
4185
4185
  const module0 = fetchCompile(new URL('./wasm-tools.core.wasm', import.meta.url));
4186
4186
  const module1 = fetchCompile(new URL('./wasm-tools.core2.wasm', import.meta.url));
4187
- const module2 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwADJiUEBwgJAgIEAgIKAgsBAQAAAAUDAwAAAAUMAAMDAAYGAA0BAQEBBAUBcAElJQe7ASYBMAAAATEAAQEyAAIBMwADATQABAE1AAUBNgAGATcABwE4AAgBOQAJAjEwAAoCMTEACwIxMgAMAjEzAA0CMTQADgIxNQAPAjE2ABACMTcAEQIxOAASAjE5ABMCMjAAFAIyMQAVAjIyABYCMjMAFwIyNAAYAjI1ABkCMjYAGgIyNwAbAjI4ABwCMjkAHQIzMAAeAjMxAB8CMzIAIAIzMwAhAjM0ACICMzUAIwIzNgAkCCRpbXBvcnRzAQAK+QMlDwAgACABIAIgA0EAEQQACxkAIAAgASACIAMgBCAFIAYgByAIQQERBwALEQAgACABIAIgAyAEQQIRCAALEQAgACABIAIgAyAEQQMRCQALCwAgACABQQQRAgALCwAgACABQQURAgALDwAgACABIAIgA0EGEQQACwsAIAAgAUEHEQIACwsAIAAgAUEIEQIACwkAIABBCREKAAsLACAAIAFBChECAAsNACAAIAEgAkELEQsACwkAIABBDBEBAAsJACAAQQ0RAQALCwAgACABQQ4RAAALCwAgACABQQ8RAAALCwAgACABQRARAAALEQAgACABIAIgAyAEQRERBQALDQAgACABIAJBEhEDAAsNACAAIAEgAkETEQMACwsAIAAgAUEUEQAACwsAIAAgAUEVEQAACwsAIAAgAUEWEQAACxEAIAAgASACIAMgBEEXEQUACxUAIAAgASACIAMgBCAFIAZBGBEMAAsLACAAIAFBGREAAAsNACAAIAEgAkEaEQMACw0AIAAgASACQRsRAwALCwAgACABQRwRAAALDwAgACABIAIgA0EdEQYACw8AIAAgASACIANBHhEGAAsLACAAIAFBHxEAAAsLACAAIAFBIBENAAsJACAAQSERAQALCQAgAEEiEQEACwkAIABBIxEBAAsJACAAQSQRAQALAC8JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQHMC4yMjUuMA');
4188
- const module3 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwAC5AEmAAEwAAQAATEABwABMgAIAAEzAAkAATQAAgABNQACAAE2AAQAATcAAgABOAACAAE5AAoAAjEwAAIAAjExAAsAAjEyAAEAAjEzAAEAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAUAAjE4AAMAAjE5AAMAAjIwAAAAAjIxAAAAAjIyAAAAAjIzAAUAAjI0AAwAAjI1AAAAAjI2AAMAAjI3AAMAAjI4AAAAAjI5AAYAAjMwAAYAAjMxAAAAAjMyAA0AAjMzAAEAAjM0AAEAAjM1AAEAAjM2AAEACCRpbXBvcnRzAXABJSUJKwEAQQALJQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQALwlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAcwLjIyNS4w');
4187
+ const module2 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwADJiUHCAkCAgQEAgIKAgsBAQAAAAUDAwAAAAUMAAMDAAYGAA0BAQEBBAUBcAElJQe7ASYBMAAAATEAAQEyAAIBMwADATQABAE1AAUBNgAGATcABwE4AAgBOQAJAjEwAAoCMTEACwIxMgAMAjEzAA0CMTQADgIxNQAPAjE2ABACMTcAEQIxOAASAjE5ABMCMjAAFAIyMQAVAjIyABYCMjMAFwIyNAAYAjI1ABkCMjYAGgIyNwAbAjI4ABwCMjkAHQIzMAAeAjMxAB8CMzIAIAIzMwAhAjM0ACICMzUAIwIzNgAkCCRpbXBvcnRzAQAK+QMlGQAgACABIAIgAyAEIAUgBiAHIAhBABEHAAsRACAAIAEgAiADIARBAREIAAsRACAAIAEgAiADIARBAhEJAAsLACAAIAFBAxECAAsLACAAIAFBBBECAAsPACAAIAEgAiADQQURBAALDwAgACABIAIgA0EGEQQACwsAIAAgAUEHEQIACwsAIAAgAUEIEQIACwkAIABBCREKAAsLACAAIAFBChECAAsNACAAIAEgAkELEQsACwkAIABBDBEBAAsJACAAQQ0RAQALCwAgACABQQ4RAAALCwAgACABQQ8RAAALCwAgACABQRARAAALEQAgACABIAIgAyAEQRERBQALDQAgACABIAJBEhEDAAsNACAAIAEgAkETEQMACwsAIAAgAUEUEQAACwsAIAAgAUEVEQAACwsAIAAgAUEWEQAACxEAIAAgASACIAMgBEEXEQUACxUAIAAgASACIAMgBCAFIAZBGBEMAAsLACAAIAFBGREAAAsNACAAIAEgAkEaEQMACw0AIAAgASACQRsRAwALCwAgACABQRwRAAALDwAgACABIAIgA0EdEQYACw8AIAAgASACIANBHhEGAAsLACAAIAFBHxEAAAsLACAAIAFBIBENAAsJACAAQSERAQALCQAgAEEiEQEACwkAIABBIxEBAAsJACAAQSQRAQALAC8JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQHMC4yMjUuMA');
4188
+ const module3 = base64Compile('AGFzbQEAAAABZw5gAn9/AGABfwBgAn9/AX9gA39+fwBgBH9/f38Bf2AFf39/f38AYAR/f39/AGAJf39/f39+fn9/AX9gBX9/f35/AX9gBX9/f39/AX9gAX8Bf2ADf39/AX9gB39/f39/f38AYAJ+fwAC5AEmAAEwAAcAATEACAABMgAJAAEzAAIAATQAAgABNQAEAAE2AAQAATcAAgABOAACAAE5AAoAAjEwAAIAAjExAAsAAjEyAAEAAjEzAAEAAjE0AAAAAjE1AAAAAjE2AAAAAjE3AAUAAjE4AAMAAjE5AAMAAjIwAAAAAjIxAAAAAjIyAAAAAjIzAAUAAjI0AAwAAjI1AAAAAjI2AAMAAjI3AAMAAjI4AAAAAjI5AAYAAjMwAAYAAjMxAAAAAjMyAA0AAjMzAAEAAjM0AAEAAjM1AAEAAjM2AAEACCRpbXBvcnRzAXABJSUJKwEAQQALJQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQALwlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAcwLjIyNS4w');
4189
4189
  ({ exports: exports0 } = yield instantiateCore(yield module2));
4190
4190
  ({ exports: exports1 } = yield instantiateCore(yield module0, {
4191
4191
  wasi_snapshot_preview1: {
4192
4192
  environ_get: exports0['7'],
4193
4193
  environ_sizes_get: exports0['8'],
4194
4194
  fd_close: exports0['9'],
4195
- fd_filestat_get: exports0['5'],
4195
+ fd_filestat_get: exports0['4'],
4196
4196
  fd_prestat_dir_name: exports0['11'],
4197
4197
  fd_prestat_get: exports0['10'],
4198
- fd_read: exports0['6'],
4199
- fd_readdir: exports0['2'],
4200
- fd_write: exports0['0'],
4201
- path_filestat_get: exports0['3'],
4202
- path_open: exports0['1'],
4198
+ fd_read: exports0['5'],
4199
+ fd_readdir: exports0['1'],
4200
+ fd_write: exports0['6'],
4201
+ path_filestat_get: exports0['2'],
4202
+ path_open: exports0['0'],
4203
4203
  proc_exit: exports0['12'],
4204
- random_get: exports0['4'],
4204
+ random_get: exports0['3'],
4205
4205
  },
4206
4206
  }));
4207
4207
  ({ exports: exports2 } = yield instantiateCore(yield module1, {
@@ -4282,8 +4282,8 @@ export const $init = (() => {
4282
4282
  ({ exports: exports3 } = yield instantiateCore(yield module3, {
4283
4283
  '': {
4284
4284
  $imports: exports0.$imports,
4285
- '0': exports2.fd_write,
4286
- '1': exports2.path_open,
4285
+ '0': exports2.path_open,
4286
+ '1': exports2.fd_readdir,
4287
4287
  '10': exports2.fd_prestat_get,
4288
4288
  '11': exports2.fd_prestat_dir_name,
4289
4289
  '12': exports2.proc_exit,
@@ -4294,7 +4294,7 @@ export const $init = (() => {
4294
4294
  '17': trampoline15,
4295
4295
  '18': trampoline16,
4296
4296
  '19': trampoline17,
4297
- '2': exports2.fd_readdir,
4297
+ '2': exports2.path_filestat_get,
4298
4298
  '20': trampoline18,
4299
4299
  '21': trampoline19,
4300
4300
  '22': trampoline20,
@@ -4305,7 +4305,7 @@ export const $init = (() => {
4305
4305
  '27': trampoline25,
4306
4306
  '28': trampoline26,
4307
4307
  '29': trampoline27,
4308
- '3': exports2.path_filestat_get,
4308
+ '3': exports2.random_get,
4309
4309
  '30': trampoline28,
4310
4310
  '31': trampoline29,
4311
4311
  '32': trampoline30,
@@ -4313,9 +4313,9 @@ export const $init = (() => {
4313
4313
  '34': trampoline32,
4314
4314
  '35': trampoline33,
4315
4315
  '36': trampoline34,
4316
- '4': exports2.random_get,
4317
- '5': exports2.fd_filestat_get,
4318
- '6': exports2.fd_read,
4316
+ '4': exports2.fd_filestat_get,
4317
+ '5': exports2.fd_read,
4318
+ '6': exports2.fd_write,
4319
4319
  '7': exports2.environ_get,
4320
4320
  '8': exports2.environ_sizes_get,
4321
4321
  '9': exports2.fd_close,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytecodealliance/jco",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "description": "JavaScript tooling for working with WebAssembly Components",
5
5
  "author": "Guy Bedford",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "type": "module",
26
26
  "dependencies": {
27
27
  "@bytecodealliance/componentize-js": "^0.17.0",
28
- "@bytecodealliance/preview2-shim": "^0.17.1",
28
+ "@bytecodealliance/preview2-shim": "^0.17.2",
29
29
  "binaryen": "^122.0.0",
30
30
  "chalk-template": "^1",
31
31
  "commander": "^12",
package/src/jco.js CHANGED
@@ -11,7 +11,7 @@ program
11
11
  .name('jco')
12
12
  .description(c`{bold jco - WebAssembly JS Component Tools}\n JS Component Transpilation Bindgen & Wasm Tools for JS`)
13
13
  .usage('<command> [options]')
14
- .version('1.9.1');
14
+ .version('1.10.2');
15
15
 
16
16
  function myParseInt(value) {
17
17
  return parseInt(value, 10);