@webpodjs/fs-worker 0.0.0-stage → 0.1.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/README.md +88 -2
- package/dist/abi/index.js +3 -0
- package/dist/abi/ring.js +317 -0
- package/dist/pkg/webpod_fs_wasm.d.ts +339 -0
- package/dist/pkg/webpod_fs_wasm.js +1636 -0
- package/dist/pkg/webpod_fs_wasm_bg.wasm +0 -0
- package/dist/pkg/webpod_fs_wasm_bg.wasm.d.ts +71 -0
- package/dist/rpc.js +39 -0
- package/dist/worker.js +334 -0
- package/package.json +34 -4
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The pod's two block devices for the FS Worker: `webpod-root` (lazy read-only base image)
|
|
6
|
+
* and `webpod-data` (persistent writable disk), served from channel-mode block messages.
|
|
7
|
+
*/
|
|
8
|
+
export class BlockVolumes {
|
|
9
|
+
private constructor();
|
|
10
|
+
free(): void;
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
/**
|
|
13
|
+
* Flushes the data disk, closes both and releases the pod lock.
|
|
14
|
+
*/
|
|
15
|
+
close(): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Handles a batch of block request messages for disk `serial`; resolves to the encoded
|
|
18
|
+
* completion messages, in request order.
|
|
19
|
+
*/
|
|
20
|
+
handle(serial: string, msgs: Array<any>): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* `dataBackend`: `"auto" | "opfs" | "idb" | "memory"`; `onConflict`: `"fail" | "ephemeral"`.
|
|
23
|
+
* `manifestUrl` defaults to `imageUrl + ".wpim"` when empty. `packedUrl`: the image's
|
|
24
|
+
* packed form, read instead of the blob when it is there (null: never).
|
|
25
|
+
*/
|
|
26
|
+
static open(pod_id: string, image_url: string, manifest_url: string, data_size: number, data_backend: string, on_conflict: string, packed_url?: string | null): Promise<BlockVolumes>;
|
|
27
|
+
/**
|
|
28
|
+
* Downloads root image chunks ahead of use (into memory and the chunk cache). Call with
|
|
29
|
+
* small batches so guest reads are not held up behind a long prefetch.
|
|
30
|
+
*/
|
|
31
|
+
prefetch(chunks: Uint32Array | number[]): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Replaces the data disk's contents by a snapshot (manifest bytes from `SnapshotStore`).
|
|
34
|
+
* Only before the engine attaches: the guest must not see the disk change under it.
|
|
35
|
+
*/
|
|
36
|
+
restoreData(manifest: Uint8Array | number[]): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Base image download counters (FS-010 / FS-011): resolves to `{fetchedBytes,
|
|
39
|
+
* transferredBytes, packed, packFallback?, fetchRequests, cacheHits, memoryHits}` (queued
|
|
40
|
+
* behind running requests and prefetches). `fetchedBytes` counts image bytes,
|
|
41
|
+
* `transferredBytes` what came over the network (less when reading the packed image).
|
|
42
|
+
*/
|
|
43
|
+
rootStats(): Promise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* The boot profile so far: resolves to `{ manifest, chunks }`, the root image's manifest
|
|
46
|
+
* id and the chunk indices in first-touch order (see `webpod-build prefetch`).
|
|
47
|
+
*/
|
|
48
|
+
rootTrace(): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* The engine's memory (the `SharedArrayBuffer` its rings and guest RAM live in): enables
|
|
51
|
+
* indirect requests, whose data the FS Worker reads from and writes to it in place
|
|
52
|
+
* (`docs/design/blk-indirect.md`).
|
|
53
|
+
*/
|
|
54
|
+
setEngineMemory(memory: any): void;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the largest read one completion can carry for `serial` (ring payload limit - 12).
|
|
57
|
+
*/
|
|
58
|
+
setMaxRead(serial: string, max_read_len: number): void;
|
|
59
|
+
/**
|
|
60
|
+
* Snapshots the data disk into the pod's snapshot store (`webpod-snapshots/<pod>`); resolves
|
|
61
|
+
* to the volume manifest bytes. Block requests wait meanwhile (crash-consistent). Only the
|
|
62
|
+
* chunks written since the previous snapshot or restore are reread.
|
|
63
|
+
*/
|
|
64
|
+
snapshotData(): Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* True when nothing was ever written to the data disk when it was opened: a new pod (a
|
|
67
|
+
* boot snapshot's data disk can be restored onto it without losing anything).
|
|
68
|
+
*/
|
|
69
|
+
readonly dataFresh: boolean;
|
|
70
|
+
readonly dataSize: number;
|
|
71
|
+
/**
|
|
72
|
+
* True when the data disk is in memory (another tab holds the pod, or memory backend).
|
|
73
|
+
*/
|
|
74
|
+
readonly ephemeral: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Manifest id of the root image (to match a prefetch list, and in snapshot bindings). Kept
|
|
77
|
+
* from `open`: the root's server is lent out while it serves a request (a prefetch too).
|
|
78
|
+
*/
|
|
79
|
+
readonly rootManifestId: string;
|
|
80
|
+
readonly rootSize: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The pod's snapshots (`webpod-snapshots/<pod>` in OPFS): named sets of volume manifests.
|
|
85
|
+
*/
|
|
86
|
+
export class SnapshotStore {
|
|
87
|
+
private constructor();
|
|
88
|
+
free(): void;
|
|
89
|
+
[Symbol.dispose](): void;
|
|
90
|
+
/**
|
|
91
|
+
* Mismatching binding keys between snapshot `name` and the machine described by
|
|
92
|
+
* `current` (`{engine, machine, cpus, ram, devices, kernel, cmdline, image}`); empty means
|
|
93
|
+
* the snapshot can resume on it.
|
|
94
|
+
*/
|
|
95
|
+
checkBinding(name: string, current: any): Promise<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Resolves to whether a snapshot was deleted (unreferenced chunks are freed).
|
|
98
|
+
*/
|
|
99
|
+
delete(name: string): Promise<any>;
|
|
100
|
+
/**
|
|
101
|
+
* Forgets the RAM chunks `importBoot` kept unstored (its pod did not resume from them: a
|
|
102
|
+
* later import downloads what the store lacks).
|
|
103
|
+
*/
|
|
104
|
+
discardUnpersisted(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Writes snapshot `name` as one tar file and resolves to it: a `File` in OPFS
|
|
107
|
+
* (`exports/<name>.tar` in the store), or an in-memory `Blob` with the IndexedDB store. Either
|
|
108
|
+
* can be posted to the page and downloaded.
|
|
109
|
+
*/
|
|
110
|
+
exportFile(name: string): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Imports an exported snapshot from a `File`/`Blob` (worker only), optionally renamed.
|
|
113
|
+
*/
|
|
114
|
+
importBlob(blob: Blob, rename?: string | null): Promise<any>;
|
|
115
|
+
/**
|
|
116
|
+
* Imports a published boot snapshot (`webpod-build snapshot` output under `base_url`,
|
|
117
|
+
* ending in `/`) as snapshot `name`: downloads the RAM and data disk chunks this store lacks
|
|
118
|
+
* over range requests and the device state, verifies everything, and records the binding
|
|
119
|
+
* metadata. Resolves to `{ info, fetchedBytes }`; a second import of the same snapshot
|
|
120
|
+
* downloads nothing but `boot.json` and the manifests.
|
|
121
|
+
*/
|
|
122
|
+
importBoot(base_url: string, name: string): Promise<any>;
|
|
123
|
+
/**
|
|
124
|
+
* `[{name, created, volumes: {name: manifestId}, meta}]`.
|
|
125
|
+
*/
|
|
126
|
+
list(): Promise<any>;
|
|
127
|
+
/**
|
|
128
|
+
* The manifest bytes of volume `volume` of snapshot `name`, for `restoreData` / `restore`.
|
|
129
|
+
*/
|
|
130
|
+
manifest(name: string, volume: string): Promise<any>;
|
|
131
|
+
static open(pod_id: string): Promise<SnapshotStore>;
|
|
132
|
+
/**
|
|
133
|
+
* Stores the RAM chunks `importBoot` kept in memory, a few at a time with the Worker's other
|
|
134
|
+
* tasks in between (call it once the pod has resumed). Anything that reads RAM chunks from
|
|
135
|
+
* the store stores them first anyway.
|
|
136
|
+
*/
|
|
137
|
+
persistRam(): Promise<any>;
|
|
138
|
+
/**
|
|
139
|
+
* Writes a RAM snapshot (manifest bytes) into `ram`; `fresh`: the RAM is all zeros (a
|
|
140
|
+
* just-started engine), zero chunks are skipped. Resolves to the bytes written.
|
|
141
|
+
* Reads a RAM volume's chunks ahead (decompressed, in this Worker's memory) so that the
|
|
142
|
+
* next `restoreRam` of the same manifest only copies; resolves to the non-zero bytes held.
|
|
143
|
+
*/
|
|
144
|
+
prefetchRam(manifest: Uint8Array | number[]): Promise<any>;
|
|
145
|
+
/**
|
|
146
|
+
* Reads back bytes stored with `snapshotBytes`.
|
|
147
|
+
*/
|
|
148
|
+
readBytes(manifest: Uint8Array | number[]): Promise<any>;
|
|
149
|
+
restoreRam(manifest: Uint8Array | number[], ram: Uint8Array, fresh: boolean): Promise<any>;
|
|
150
|
+
/**
|
|
151
|
+
* Records snapshot `name` from volume manifests (`{data: Uint8Array, workspace: ...}`,
|
|
152
|
+
* as returned by `snapshotData()` / `WorkspaceFs.snapshot()`) and string metadata.
|
|
153
|
+
*/
|
|
154
|
+
save(name: string, created_ms: number, meta: any, volumes: any): Promise<any>;
|
|
155
|
+
/**
|
|
156
|
+
* Stores an opaque byte string (the engine's device state) as a volume; resolves to its
|
|
157
|
+
* manifest.
|
|
158
|
+
*/
|
|
159
|
+
snapshotBytes(data: Uint8Array | number[]): Promise<any>;
|
|
160
|
+
/**
|
|
161
|
+
* Stores guest RAM (`ram`: a view of the engine's memory) and resolves to its manifest.
|
|
162
|
+
* Call with the guest stopped.
|
|
163
|
+
*/
|
|
164
|
+
snapshotRam(ram: Uint8Array): Promise<any>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The shared workspace, opened in the FS Worker.
|
|
169
|
+
*/
|
|
170
|
+
export class WorkspaceFs {
|
|
171
|
+
private constructor();
|
|
172
|
+
free(): void;
|
|
173
|
+
[Symbol.dispose](): void;
|
|
174
|
+
chmod(path: string, mode: number): Promise<any>;
|
|
175
|
+
/**
|
|
176
|
+
* Syncs, closes OPFS handles and releases the workspace lock.
|
|
177
|
+
*/
|
|
178
|
+
close(): Promise<any>;
|
|
179
|
+
mkdir(path: string, recursive: boolean, mode: number): Promise<any>;
|
|
180
|
+
/**
|
|
181
|
+
* Opens the workspace of `podId` (OPFS, else in memory; see `ephemeral`). Files the page
|
|
182
|
+
* creates are owned by `uid`/`gid`; `msize` bounds 9P messages (ring payload limit).
|
|
183
|
+
*/
|
|
184
|
+
static open(pod_id: string, mount_point: string, uid: number, gid: number, msize: number): Promise<WorkspaceFs>;
|
|
185
|
+
/**
|
|
186
|
+
* Ends the 9P session (guest reboot or disconnect): drops all fids.
|
|
187
|
+
*/
|
|
188
|
+
p9Reset(): Promise<any>;
|
|
189
|
+
/**
|
|
190
|
+
* Answers one 9P request message; resolves to the reply, or `undefined` for a message
|
|
191
|
+
* too short to answer.
|
|
192
|
+
*/
|
|
193
|
+
p9(msg: Uint8Array | number[]): Promise<any>;
|
|
194
|
+
readAt(path: string, offset: number, len: number): Promise<any>;
|
|
195
|
+
readFile(path: string): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* `[{name, type}]`.
|
|
198
|
+
*/
|
|
199
|
+
readdir(path: string): Promise<any>;
|
|
200
|
+
readlink(path: string): Promise<any>;
|
|
201
|
+
rename(from: string, to: string): Promise<any>;
|
|
202
|
+
/**
|
|
203
|
+
* Replaces the workspace by a dump (manifest bytes from `SnapshotStore`). Only before the
|
|
204
|
+
* engine attaches. Without `session` the 9P session is dropped (the guest mounts again);
|
|
205
|
+
* with the one saved by `snapshotWithSession` the resumed guest's fids go on working, open
|
|
206
|
+
* files unlinked before the snapshot included.
|
|
207
|
+
*/
|
|
208
|
+
restore(manifest: Uint8Array | number[], session?: Uint8Array | number[] | null): Promise<any>;
|
|
209
|
+
rm(path: string, recursive: boolean, force: boolean): Promise<any>;
|
|
210
|
+
/**
|
|
211
|
+
* [`WorkspaceFs::snapshot`] and the 9P session at the same moment, for a memory snapshot
|
|
212
|
+
* (guest stopped): resolves to `{ workspace, p9 }`, the dump's manifest bytes and the
|
|
213
|
+
* session (`P9Server::save_session`), which `restore` takes back.
|
|
214
|
+
*/
|
|
215
|
+
snapshotWithSession(): Promise<any>;
|
|
216
|
+
/**
|
|
217
|
+
* Dumps the whole workspace into the pod's snapshot store; resolves to the manifest bytes
|
|
218
|
+
* of the dump. Page and guest requests wait meanwhile.
|
|
219
|
+
*/
|
|
220
|
+
snapshot(): Promise<any>;
|
|
221
|
+
/**
|
|
222
|
+
* `{type, size, mode, uid, gid, mtime (ms), ino}`; `follow` = stat, else lstat.
|
|
223
|
+
*/
|
|
224
|
+
stat(path: string, follow: boolean): Promise<any>;
|
|
225
|
+
symlink(target: string, path: string): Promise<any>;
|
|
226
|
+
/**
|
|
227
|
+
* Flushes contents and metadata (call periodically and before closing).
|
|
228
|
+
*/
|
|
229
|
+
sync(): Promise<any>;
|
|
230
|
+
/**
|
|
231
|
+
* Changes since the last call: `[{origin, type, path}]`, origin `"page"` or `"guest"`.
|
|
232
|
+
*/
|
|
233
|
+
takeEvents(): Array<any>;
|
|
234
|
+
/**
|
|
235
|
+
* Writes `data` at `offset`; `create` makes a missing file with `mode`, `truncate` empties
|
|
236
|
+
* it first. A whole-file write is `write(path, 0, data, true, true, mode)`.
|
|
237
|
+
*/
|
|
238
|
+
write(path: string, offset: number, data: Uint8Array | number[], create: boolean, truncate: boolean, mode: number): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* `""` when persistent, else why not: `"no-opfs"` or `"locked"`.
|
|
241
|
+
*/
|
|
242
|
+
readonly ephemeral: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
246
|
+
|
|
247
|
+
export interface InitOutput {
|
|
248
|
+
readonly memory: WebAssembly.Memory;
|
|
249
|
+
readonly __wbg_blockvolumes_free: (a: number, b: number) => void;
|
|
250
|
+
readonly __wbg_snapshotstore_free: (a: number, b: number) => void;
|
|
251
|
+
readonly __wbg_workspacefs_free: (a: number, b: number) => void;
|
|
252
|
+
readonly blockvolumes_close: (a: number) => any;
|
|
253
|
+
readonly blockvolumes_dataFresh: (a: number) => number;
|
|
254
|
+
readonly blockvolumes_dataSize: (a: number) => number;
|
|
255
|
+
readonly blockvolumes_ephemeral: (a: number) => number;
|
|
256
|
+
readonly blockvolumes_handle: (a: number, b: number, c: number, d: any) => any;
|
|
257
|
+
readonly blockvolumes_open: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
|
|
258
|
+
readonly blockvolumes_prefetch: (a: number, b: number, c: number) => any;
|
|
259
|
+
readonly blockvolumes_restoreData: (a: number, b: number, c: number) => any;
|
|
260
|
+
readonly blockvolumes_rootManifestId: (a: number) => [number, number];
|
|
261
|
+
readonly blockvolumes_rootSize: (a: number) => number;
|
|
262
|
+
readonly blockvolumes_rootStats: (a: number) => any;
|
|
263
|
+
readonly blockvolumes_rootTrace: (a: number) => any;
|
|
264
|
+
readonly blockvolumes_setEngineMemory: (a: number, b: any) => void;
|
|
265
|
+
readonly blockvolumes_setMaxRead: (a: number, b: number, c: number, d: number) => void;
|
|
266
|
+
readonly blockvolumes_snapshotData: (a: number) => any;
|
|
267
|
+
readonly snapshotstore_checkBinding: (a: number, b: number, c: number, d: any) => any;
|
|
268
|
+
readonly snapshotstore_delete: (a: number, b: number, c: number) => any;
|
|
269
|
+
readonly snapshotstore_discardUnpersisted: (a: number) => void;
|
|
270
|
+
readonly snapshotstore_exportFile: (a: number, b: number, c: number) => any;
|
|
271
|
+
readonly snapshotstore_importBlob: (a: number, b: any, c: number, d: number) => any;
|
|
272
|
+
readonly snapshotstore_importBoot: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
273
|
+
readonly snapshotstore_list: (a: number) => any;
|
|
274
|
+
readonly snapshotstore_manifest: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
275
|
+
readonly snapshotstore_open: (a: number, b: number) => any;
|
|
276
|
+
readonly snapshotstore_persistRam: (a: number) => any;
|
|
277
|
+
readonly snapshotstore_prefetchRam: (a: number, b: number, c: number) => any;
|
|
278
|
+
readonly snapshotstore_readBytes: (a: number, b: number, c: number) => any;
|
|
279
|
+
readonly snapshotstore_restoreRam: (a: number, b: number, c: number, d: any, e: number) => any;
|
|
280
|
+
readonly snapshotstore_save: (a: number, b: number, c: number, d: number, e: any, f: any) => any;
|
|
281
|
+
readonly snapshotstore_snapshotBytes: (a: number, b: number, c: number) => any;
|
|
282
|
+
readonly snapshotstore_snapshotRam: (a: number, b: any) => any;
|
|
283
|
+
readonly workspacefs_chmod: (a: number, b: number, c: number, d: number) => any;
|
|
284
|
+
readonly workspacefs_close: (a: number) => any;
|
|
285
|
+
readonly workspacefs_ephemeral: (a: number) => [number, number];
|
|
286
|
+
readonly workspacefs_mkdir: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
287
|
+
readonly workspacefs_open: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
288
|
+
readonly workspacefs_p9: (a: number, b: number, c: number) => any;
|
|
289
|
+
readonly workspacefs_p9Reset: (a: number) => any;
|
|
290
|
+
readonly workspacefs_readAt: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
291
|
+
readonly workspacefs_readFile: (a: number, b: number, c: number) => any;
|
|
292
|
+
readonly workspacefs_readdir: (a: number, b: number, c: number) => any;
|
|
293
|
+
readonly workspacefs_readlink: (a: number, b: number, c: number) => any;
|
|
294
|
+
readonly workspacefs_rename: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
295
|
+
readonly workspacefs_restore: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
296
|
+
readonly workspacefs_rm: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
297
|
+
readonly workspacefs_snapshot: (a: number) => any;
|
|
298
|
+
readonly workspacefs_snapshotWithSession: (a: number) => any;
|
|
299
|
+
readonly workspacefs_stat: (a: number, b: number, c: number, d: number) => any;
|
|
300
|
+
readonly workspacefs_symlink: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
301
|
+
readonly workspacefs_sync: (a: number) => any;
|
|
302
|
+
readonly workspacefs_takeEvents: (a: number) => any;
|
|
303
|
+
readonly workspacefs_write: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
304
|
+
readonly wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___js_sys_173b2b1834468215___Function_fn_wasm_bindgen_5a2380350bab5903___JsValue_____wasm_bindgen_5a2380350bab5903___sys__Undefined___js_sys_173b2b1834468215___Function_fn_wasm_bindgen_5a2380350bab5903___JsValue_____wasm_bindgen_5a2380350bab5903___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
305
|
+
readonly wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_5a2380350bab5903___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
306
|
+
readonly wasm_bindgen_5a2380350bab5903___convert__closures_____invoke___wasm_bindgen_5a2380350bab5903___JsValue__wasm_bindgen_5a2380350bab5903___JsValue__true__1_: (a: number, b: number, c: any) => any;
|
|
307
|
+
readonly wasm_bindgen_5a2380350bab5903___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
308
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
309
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
310
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
311
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
312
|
+
readonly __externref_table_alloc: () => number;
|
|
313
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
314
|
+
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
315
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
316
|
+
readonly __wbindgen_start: () => void;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
323
|
+
* a precompiled `WebAssembly.Module`.
|
|
324
|
+
*
|
|
325
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
326
|
+
*
|
|
327
|
+
* @returns {InitOutput}
|
|
328
|
+
*/
|
|
329
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
333
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
334
|
+
*
|
|
335
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
336
|
+
*
|
|
337
|
+
* @returns {Promise<InitOutput>}
|
|
338
|
+
*/
|
|
339
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|