@bytecodealliance/jco 1.10.2 → 1.11.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 (52) hide show
  1. package/package.json +18 -6
  2. package/src/cmd/componentize.js +64 -18
  3. package/src/cmd/opt.js +233 -202
  4. package/src/cmd/run.js +117 -73
  5. package/src/cmd/transpile.js +643 -530
  6. package/src/cmd/wasm-tools.js +130 -95
  7. package/src/jco.js +5 -1
  8. package/obj/interfaces/local-wasm-tools-tools.d.ts +0 -52
  9. package/obj/interfaces/wasi-cli-environment.d.ts +0 -2
  10. package/obj/interfaces/wasi-cli-exit.d.ts +0 -3
  11. package/obj/interfaces/wasi-cli-stderr.d.ts +0 -3
  12. package/obj/interfaces/wasi-cli-stdin.d.ts +0 -3
  13. package/obj/interfaces/wasi-cli-stdout.d.ts +0 -3
  14. package/obj/interfaces/wasi-cli-terminal-input.d.ts +0 -8
  15. package/obj/interfaces/wasi-cli-terminal-output.d.ts +0 -8
  16. package/obj/interfaces/wasi-cli-terminal-stderr.d.ts +0 -3
  17. package/obj/interfaces/wasi-cli-terminal-stdin.d.ts +0 -3
  18. package/obj/interfaces/wasi-cli-terminal-stdout.d.ts +0 -3
  19. package/obj/interfaces/wasi-clocks-wall-clock.d.ts +0 -5
  20. package/obj/interfaces/wasi-filesystem-preopens.d.ts +0 -3
  21. package/obj/interfaces/wasi-filesystem-types.d.ts +0 -164
  22. package/obj/interfaces/wasi-io-error.d.ts +0 -8
  23. package/obj/interfaces/wasi-io-streams.d.ts +0 -30
  24. package/obj/interfaces/wasi-random-random.d.ts +0 -2
  25. package/obj/js-component-bindgen-component.core.wasm +0 -0
  26. package/obj/js-component-bindgen-component.core2.wasm +0 -0
  27. package/obj/js-component-bindgen-component.d.ts +0 -116
  28. package/obj/js-component-bindgen-component.js +0 -4302
  29. package/obj/wasm-tools.core.wasm +0 -0
  30. package/obj/wasm-tools.core2.wasm +0 -0
  31. package/obj/wasm-tools.d.ts +0 -20
  32. package/obj/wasm-tools.js +0 -4369
  33. package/src/api.d.ts +0 -42
  34. package/src/api.d.ts.map +0 -1
  35. package/src/browser.d.ts +0 -4
  36. package/src/browser.d.ts.map +0 -1
  37. package/src/cmd/componentize.d.ts +0 -2
  38. package/src/cmd/componentize.d.ts.map +0 -1
  39. package/src/cmd/opt.d.ts +0 -20
  40. package/src/cmd/opt.d.ts.map +0 -1
  41. package/src/cmd/run.d.ts +0 -3
  42. package/src/cmd/run.d.ts.map +0 -1
  43. package/src/cmd/transpile.d.ts +0 -89
  44. package/src/cmd/transpile.d.ts.map +0 -1
  45. package/src/cmd/wasm-tools.d.ts +0 -8
  46. package/src/cmd/wasm-tools.d.ts.map +0 -1
  47. package/src/common.d.ts +0 -16
  48. package/src/common.d.ts.map +0 -1
  49. package/src/jco.d.ts +0 -3
  50. package/src/jco.d.ts.map +0 -1
  51. package/src/ora-shim.d.ts +0 -7
  52. package/src/ora-shim.d.ts.map +0 -1
@@ -1,116 +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
- }
53
- export type Wit = WitSource | WitBinary | WitPath;
54
- export interface WitSource {
55
- tag: 'source',
56
- val: string,
57
- }
58
- export interface WitBinary {
59
- tag: 'binary',
60
- val: Uint8Array,
61
- }
62
- export interface WitPath {
63
- tag: 'path',
64
- val: string,
65
- }
66
- export type EnabledFeatureSet = EnabledFeatureSetList | EnabledFeatureSetAll;
67
- export interface EnabledFeatureSetList {
68
- tag: 'list',
69
- val: Array<string>,
70
- }
71
- export interface EnabledFeatureSetAll {
72
- tag: 'all',
73
- }
74
- export interface TypeGenerationOptions {
75
- wit: Wit,
76
- world?: string,
77
- tlaCompat?: boolean,
78
- instantiation?: InstantiationMode,
79
- map?: Maps,
80
- features?: EnabledFeatureSet,
81
- guest?: boolean,
82
- asyncMode?: AsyncMode,
83
- }
84
- /**
85
- * # Variants
86
- *
87
- * ## `"function"`
88
- *
89
- * ## `"instance"`
90
- */
91
- export type ExportType = 'function' | 'instance';
92
- export interface Transpiled {
93
- files: Files,
94
- imports: Array<string>,
95
- exports: Array<[string, ExportType]>,
96
- }
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
113
- export function generate(component: Uint8Array, options: GenerateOptions): Transpiled;
114
- export function generateTypes(name: string, options: TypeGenerationOptions): Files;
115
-
116
- export const $init: Promise<void>;