@lute-lang/runtime 0.0.0-stage → 0.40.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.
- package/dist/Bundle.d.ts +17 -0
- package/dist/BundleSource.d.ts +21 -0
- package/dist/Errors.d.ts +122 -0
- package/dist/InputLog.d.ts +474 -0
- package/dist/LuteRuntime.d.ts +20 -0
- package/dist/LuteWasm.d.ts +26 -0
- package/dist/Program.d.ts +48 -0
- package/dist/Replay.d.ts +17 -0
- package/dist/Session.d.ts +56 -0
- package/dist/browser.d.ts +25 -0
- package/dist/browser.js +28 -0
- package/dist/bun.d.ts +21 -0
- package/dist/bun.js +28 -0
- package/dist/generated/Contract.d.ts +1791 -0
- package/dist/generated/Ir.d.ts +2535 -0
- package/dist/index-wshk3yvw.js +918 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1031 -0
- package/dist/wasm/lute_runtime_wasm.d.ts +167 -0
- package/dist/wasm/lute_runtime_wasm.js +624 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm +0 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm.d.ts +35 -0
- package/package.json +63 -4
- package/README.md +0 -3
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The result of loading a bundle.
|
|
6
|
+
*/
|
|
7
|
+
export class LoadResult {
|
|
8
|
+
private constructor();
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
readonly ok: boolean;
|
|
12
|
+
readonly program: Program | undefined;
|
|
13
|
+
readonly rejected: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A loaded execution bundle.
|
|
18
|
+
*/
|
|
19
|
+
export class Program {
|
|
20
|
+
private constructor();
|
|
21
|
+
free(): void;
|
|
22
|
+
[Symbol.dispose](): void;
|
|
23
|
+
/**
|
|
24
|
+
* Begin a run from a JSON seed.
|
|
25
|
+
*/
|
|
26
|
+
begin(seed: string): StepResult;
|
|
27
|
+
/**
|
|
28
|
+
* The candidates of `occasion` (for `target`) in selection order, as a
|
|
29
|
+
* JSON array of `Candidate`.
|
|
30
|
+
*/
|
|
31
|
+
candidates(state: State, occasion: string, target?: string | null): string;
|
|
32
|
+
/**
|
|
33
|
+
* The clock position, as `ClockAt` JSON or `null` without a clock.
|
|
34
|
+
*/
|
|
35
|
+
clock(state: State): string;
|
|
36
|
+
/**
|
|
37
|
+
* The verdict of `beat` (for `member`), as `Candidate` JSON or `null`.
|
|
38
|
+
*/
|
|
39
|
+
eligibility(state: State, beat: string, member?: string | null): string;
|
|
40
|
+
/**
|
|
41
|
+
* Load a `project.index.json` and an object mapping artifact paths to IR.
|
|
42
|
+
*
|
|
43
|
+
* Bundle decoding and validation failures are returned as a rejected value
|
|
44
|
+
* rather than escaping into JavaScript as an exception.
|
|
45
|
+
*/
|
|
46
|
+
static load(index: string, artifacts: string): LoadResult;
|
|
47
|
+
/**
|
|
48
|
+
* Restore a state from a versioned snapshot JSON.
|
|
49
|
+
*/
|
|
50
|
+
restore(snapshot: string): RestoreResult;
|
|
51
|
+
/**
|
|
52
|
+
* Serialize a state to its versioned snapshot JSON (keys sorted, the
|
|
53
|
+
* contract's canonical form).
|
|
54
|
+
*/
|
|
55
|
+
snapshot(state: State): string;
|
|
56
|
+
/**
|
|
57
|
+
* The persistent presentation stage as canonical JSON.
|
|
58
|
+
*/
|
|
59
|
+
stage(state: State): string;
|
|
60
|
+
/**
|
|
61
|
+
* Apply a JSON input without invalidating the supplied state handle.
|
|
62
|
+
*/
|
|
63
|
+
step(state: State, input: string): StepResult;
|
|
64
|
+
/**
|
|
65
|
+
* Whether this state is terminal.
|
|
66
|
+
*/
|
|
67
|
+
terminal(state: State): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The world view, as `WorldView` JSON (facts only when `with_facts`).
|
|
70
|
+
*/
|
|
71
|
+
view(state: State, with_facts: boolean): string;
|
|
72
|
+
readonly fingerprint: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The result of restoring a snapshot.
|
|
77
|
+
*/
|
|
78
|
+
export class RestoreResult {
|
|
79
|
+
private constructor();
|
|
80
|
+
free(): void;
|
|
81
|
+
[Symbol.dispose](): void;
|
|
82
|
+
readonly ok: boolean;
|
|
83
|
+
readonly rejected: string | undefined;
|
|
84
|
+
readonly state: State | undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* An opaque immutable state handle.
|
|
89
|
+
*/
|
|
90
|
+
export class State {
|
|
91
|
+
private constructor();
|
|
92
|
+
free(): void;
|
|
93
|
+
[Symbol.dispose](): void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The result of beginning or stepping a program.
|
|
98
|
+
*/
|
|
99
|
+
export class StepResult {
|
|
100
|
+
private constructor();
|
|
101
|
+
free(): void;
|
|
102
|
+
[Symbol.dispose](): void;
|
|
103
|
+
readonly ok: boolean;
|
|
104
|
+
readonly output: string | undefined;
|
|
105
|
+
readonly rejected: string | undefined;
|
|
106
|
+
readonly state: State | undefined;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
110
|
+
|
|
111
|
+
export interface InitOutput {
|
|
112
|
+
readonly memory: WebAssembly.Memory;
|
|
113
|
+
readonly __wbg_loadresult_free: (a: number, b: number) => void;
|
|
114
|
+
readonly __wbg_program_free: (a: number, b: number) => void;
|
|
115
|
+
readonly __wbg_restoreresult_free: (a: number, b: number) => void;
|
|
116
|
+
readonly __wbg_state_free: (a: number, b: number) => void;
|
|
117
|
+
readonly __wbg_stepresult_free: (a: number, b: number) => void;
|
|
118
|
+
readonly loadresult_ok: (a: number) => number;
|
|
119
|
+
readonly loadresult_program: (a: number) => number;
|
|
120
|
+
readonly loadresult_rejected: (a: number) => [number, number];
|
|
121
|
+
readonly program_begin: (a: number, b: number, c: number) => number;
|
|
122
|
+
readonly program_candidates: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
123
|
+
readonly program_clock: (a: number, b: number) => [number, number];
|
|
124
|
+
readonly program_eligibility: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
125
|
+
readonly program_fingerprint: (a: number) => [number, number];
|
|
126
|
+
readonly program_load: (a: number, b: number, c: number, d: number) => number;
|
|
127
|
+
readonly program_restore: (a: number, b: number, c: number) => number;
|
|
128
|
+
readonly program_snapshot: (a: number, b: number) => [number, number];
|
|
129
|
+
readonly program_stage: (a: number, b: number) => [number, number];
|
|
130
|
+
readonly program_step: (a: number, b: number, c: number, d: number) => number;
|
|
131
|
+
readonly program_terminal: (a: number, b: number) => number;
|
|
132
|
+
readonly program_view: (a: number, b: number, c: number) => [number, number];
|
|
133
|
+
readonly restoreresult_ok: (a: number) => number;
|
|
134
|
+
readonly restoreresult_rejected: (a: number) => [number, number];
|
|
135
|
+
readonly restoreresult_state: (a: number) => number;
|
|
136
|
+
readonly stepresult_ok: (a: number) => number;
|
|
137
|
+
readonly stepresult_output: (a: number) => [number, number];
|
|
138
|
+
readonly stepresult_rejected: (a: number) => [number, number];
|
|
139
|
+
readonly stepresult_state: (a: number) => number;
|
|
140
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
141
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
142
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
143
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
144
|
+
readonly __wbindgen_start: () => void;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
151
|
+
* a precompiled `WebAssembly.Module`.
|
|
152
|
+
*
|
|
153
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
154
|
+
*
|
|
155
|
+
* @returns {InitOutput}
|
|
156
|
+
*/
|
|
157
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
161
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
162
|
+
*
|
|
163
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
164
|
+
*
|
|
165
|
+
* @returns {Promise<InitOutput>}
|
|
166
|
+
*/
|
|
167
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|