@arborium/php 0.3.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.
Binary file
package/grammar.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ // world root:component/root
2
+ import type * as ArboriumGrammarTypes from './interfaces/arborium-grammar-types.js'; // arborium:grammar/types@0.1.0
3
+ import type * as WasiCliEnvironment from './interfaces/wasi-cli-environment.js'; // wasi:cli/environment@0.2.3
4
+ import type * as WasiCliExit from './interfaces/wasi-cli-exit.js'; // wasi:cli/exit@0.2.3
5
+ import type * as WasiCliStderr from './interfaces/wasi-cli-stderr.js'; // wasi:cli/stderr@0.2.3
6
+ import type * as WasiCliStdin from './interfaces/wasi-cli-stdin.js'; // wasi:cli/stdin@0.2.3
7
+ import type * as WasiCliStdout from './interfaces/wasi-cli-stdout.js'; // wasi:cli/stdout@0.2.3
8
+ import type * as WasiClocksWallClock from './interfaces/wasi-clocks-wall-clock.js'; // wasi:clocks/wall-clock@0.2.3
9
+ import type * as WasiFilesystemPreopens from './interfaces/wasi-filesystem-preopens.js'; // wasi:filesystem/preopens@0.2.3
10
+ import type * as WasiFilesystemTypes from './interfaces/wasi-filesystem-types.js'; // wasi:filesystem/types@0.2.3
11
+ import type * as WasiIoError from './interfaces/wasi-io-error.js'; // wasi:io/error@0.2.3
12
+ import type * as WasiIoStreams from './interfaces/wasi-io-streams.js'; // wasi:io/streams@0.2.3
13
+ import type * as WasiRandomRandom from './interfaces/wasi-random-random.js'; // wasi:random/random@0.2.3
14
+ import type * as ArboriumGrammarPlugin from './interfaces/arborium-grammar-plugin.js'; // arborium:grammar/plugin@0.1.0
15
+ export interface ImportObject {
16
+ 'arborium:grammar/types@0.1.0': typeof ArboriumGrammarTypes,
17
+ 'wasi:cli/environment@0.2.3': typeof WasiCliEnvironment,
18
+ 'wasi:cli/exit@0.2.3': typeof WasiCliExit,
19
+ 'wasi:cli/stderr@0.2.3': typeof WasiCliStderr,
20
+ 'wasi:cli/stdin@0.2.3': typeof WasiCliStdin,
21
+ 'wasi:cli/stdout@0.2.3': typeof WasiCliStdout,
22
+ 'wasi:clocks/wall-clock@0.2.3': typeof WasiClocksWallClock,
23
+ 'wasi:filesystem/preopens@0.2.3': typeof WasiFilesystemPreopens,
24
+ 'wasi:filesystem/types@0.2.3': typeof WasiFilesystemTypes,
25
+ 'wasi:io/error@0.2.3': typeof WasiIoError,
26
+ 'wasi:io/streams@0.2.3': typeof WasiIoStreams,
27
+ 'wasi:random/random@0.2.3': typeof WasiRandomRandom,
28
+ }
29
+ export interface Root {
30
+ 'arborium:grammar/plugin@0.1.0': typeof ArboriumGrammarPlugin,
31
+ plugin: typeof ArboriumGrammarPlugin,
32
+ }
33
+
34
+ /**
35
+ * Instantiates this component with the provided imports and
36
+ * returns a map of all the exports of the component.
37
+ *
38
+ * This function is intended to be similar to the
39
+ * `WebAssembly.instantiate` function. The second `imports`
40
+ * argument is the "import object" for wasm, except here it
41
+ * uses component-model-layer types instead of core wasm
42
+ * integers/numbers/etc.
43
+ *
44
+ * The first argument to this function, `getCoreModule`, is
45
+ * used to compile core wasm modules within the component.
46
+ * Components are composed of core wasm modules and this callback
47
+ * will be invoked per core wasm module. The caller of this
48
+ * function is responsible for reading the core wasm module
49
+ * identified by `path` and returning its compiled
50
+ * `WebAssembly.Module` object. This would use `compileStreaming`
51
+ * on the web, for example.
52
+ */
53
+ export function instantiate(
54
+ getCoreModule: (path: string) => WebAssembly.Module,
55
+ imports: ImportObject,
56
+ instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance
57
+ ): Root;
58
+ export function instantiate(
59
+ getCoreModule: (path: string) => WebAssembly.Module | Promise<WebAssembly.Module>,
60
+ imports: ImportObject,
61
+ instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance | Promise<WebAssembly.Instance>
62
+ ): Root | Promise<Root>;
63
+