@francisdb/vpin-wasm 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 ADDED
@@ -0,0 +1,95 @@
1
+ # vpin-wasm
2
+
3
+ WASM bindings for extracting and assembling VPX (Visual Pinball X) table files.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @jsm174/vpin-wasm
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import init, { extract, assemble } from '@jsm174/vpin-wasm';
15
+
16
+ await init();
17
+ ```
18
+
19
+ ### extract(data, callback?)
20
+
21
+ Extracts a VPX file into individual files.
22
+
23
+ ```typescript
24
+ const vpxBytes = new Uint8Array(await file.arrayBuffer());
25
+
26
+ const files = extract(vpxBytes, (message) => {
27
+ console.log(message);
28
+ });
29
+
30
+ // files is an object: { "/vpx/path/to/file": Uint8Array, ... }
31
+ ```
32
+
33
+ **Parameters:**
34
+ - `data: Uint8Array` - VPX file bytes
35
+ - `callback?: (message: string) => void` - Optional progress callback
36
+
37
+ **Returns:** `Record<string, Uint8Array>` - Object mapping file paths to contents
38
+
39
+ ### assemble(files, callback?)
40
+
41
+ Assembles individual files back into a VPX file.
42
+
43
+ ```typescript
44
+ const files = {
45
+ "/vpx/images/ball.png": new Uint8Array([...]),
46
+ "/vpx/sounds/hit.wav": new Uint8Array([...]),
47
+ // ...
48
+ };
49
+
50
+ const vpxBytes = assemble(files, (message) => {
51
+ console.log(message);
52
+ });
53
+
54
+ // vpxBytes is Uint8Array containing the VPX file
55
+ ```
56
+
57
+ **Parameters:**
58
+ - `files: Record<string, Uint8Array>` - Object mapping file paths to contents
59
+ - `callback?: (message: string) => void` - Optional progress callback
60
+
61
+ **Returns:** `Uint8Array` - VPX file bytes
62
+
63
+ ## File Structure
64
+
65
+ Extracted files use paths starting with `/vpx/`:
66
+
67
+ ```
68
+ /vpx/
69
+ gamedata.json # Table metadata
70
+ script.vbs # Table script
71
+ images/ # Image assets
72
+ sounds/ # Sound assets
73
+ gameitems/ # Table objects (bumpers, flippers, etc.)
74
+ collections/ # Object collections
75
+ ```
76
+
77
+ ## Example: Round-trip
78
+
79
+ ```typescript
80
+ import init, { extract, assemble } from '@jsm174/vpin-wasm';
81
+
82
+ await init();
83
+
84
+ // Extract
85
+ const original = new Uint8Array(await fetch('table.vpx').then(r => r.arrayBuffer()));
86
+ const files = extract(original);
87
+
88
+ // Modify a file
89
+ const gamedata = JSON.parse(new TextDecoder().decode(files['/vpx/gamedata.json']));
90
+ gamedata.name = 'Modified Table';
91
+ files['/vpx/gamedata.json'] = new TextEncoder().encode(JSON.stringify(gamedata));
92
+
93
+ // Assemble
94
+ const modified = assemble(files);
95
+ ```
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@francisdb/vpin-wasm",
3
+ "version": "0.1.0",
4
+ "description": "WASM bindings for vpin, a rust library for the visual/virtual pinball ecosystem.",
5
+ "homepage": "https://github.com/francisdb/vpin",
6
+ "bugs": {
7
+ "url": "https://github.com/francisdb/vpin/issues"
8
+ },
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "pinball",
12
+ "vpx",
13
+ "visual-pinball"
14
+ ],
15
+ "main": "vpin.js",
16
+ "types": "vpin.d.ts",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/francisdb/vpin.git"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "files": [
25
+ "vpin.js",
26
+ "vpin.d.ts",
27
+ "vpin_bg.wasm",
28
+ "vpin_bg.wasm.d.ts"
29
+ ]
30
+ }
package/vpin.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export function assemble(files: object, callback?: Function | null): Uint8Array;
5
+
6
+ export function extract(data: Uint8Array, callback?: Function | null): object;
7
+
8
+ export function init(): void;
9
+
10
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
11
+
12
+ export interface InitOutput {
13
+ readonly memory: WebAssembly.Memory;
14
+ readonly assemble: (a: any, b: number) => [number, number, number, number];
15
+ readonly extract: (a: number, b: number, c: number) => [number, number, number];
16
+ readonly init: () => void;
17
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
18
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
19
+ readonly __wbindgen_exn_store: (a: number) => void;
20
+ readonly __externref_table_alloc: () => number;
21
+ readonly __wbindgen_externrefs: WebAssembly.Table;
22
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
23
+ readonly __externref_table_dealloc: (a: number) => void;
24
+ readonly __wbindgen_start: () => void;
25
+ }
26
+
27
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
28
+
29
+ /**
30
+ * Instantiates the given `module`, which can either be bytes or
31
+ * a precompiled `WebAssembly.Module`.
32
+ *
33
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
34
+ *
35
+ * @returns {InitOutput}
36
+ */
37
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
38
+
39
+ /**
40
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
41
+ * for everything else, calls `WebAssembly.instantiate` directly.
42
+ *
43
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
44
+ *
45
+ * @returns {Promise<InitOutput>}
46
+ */
47
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/vpin.js ADDED
@@ -0,0 +1,428 @@
1
+ /* @ts-self-types="./vpin.d.ts" */
2
+
3
+ /**
4
+ * @param {object} files
5
+ * @param {Function | null} [callback]
6
+ * @returns {Uint8Array}
7
+ */
8
+ export function assemble(files, callback) {
9
+ const ret = wasm.assemble(files, isLikeNone(callback) ? 0 : addToExternrefTable0(callback));
10
+ if (ret[3]) {
11
+ throw takeFromExternrefTable0(ret[2]);
12
+ }
13
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
14
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
15
+ return v1;
16
+ }
17
+
18
+ /**
19
+ * @param {Uint8Array} data
20
+ * @param {Function | null} [callback]
21
+ * @returns {object}
22
+ */
23
+ export function extract(data, callback) {
24
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
25
+ const len0 = WASM_VECTOR_LEN;
26
+ const ret = wasm.extract(ptr0, len0, isLikeNone(callback) ? 0 : addToExternrefTable0(callback));
27
+ if (ret[2]) {
28
+ throw takeFromExternrefTable0(ret[1]);
29
+ }
30
+ return takeFromExternrefTable0(ret[0]);
31
+ }
32
+
33
+ export function init() {
34
+ wasm.init();
35
+ }
36
+
37
+ function __wbg_get_imports() {
38
+ const import0 = {
39
+ __proto__: null,
40
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
41
+ const ret = Error(getStringFromWasm0(arg0, arg1));
42
+ return ret;
43
+ },
44
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
45
+ const ret = debugString(arg1);
46
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
47
+ const len1 = WASM_VECTOR_LEN;
48
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
49
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
50
+ },
51
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
52
+ const obj = arg1;
53
+ const ret = typeof(obj) === 'string' ? obj : undefined;
54
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
55
+ var len1 = WASM_VECTOR_LEN;
56
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
57
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
58
+ },
59
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
60
+ throw new Error(getStringFromWasm0(arg0, arg1));
61
+ },
62
+ __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
63
+ const ret = arg0.call(arg1, arg2);
64
+ return ret;
65
+ }, arguments); },
66
+ __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
67
+ let deferred0_0;
68
+ let deferred0_1;
69
+ try {
70
+ deferred0_0 = arg0;
71
+ deferred0_1 = arg1;
72
+ console.error(getStringFromWasm0(arg0, arg1));
73
+ } finally {
74
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
75
+ }
76
+ },
77
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
78
+ const ret = arg0[arg1 >>> 0];
79
+ return ret;
80
+ },
81
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
82
+ const ret = Reflect.get(arg0, arg1);
83
+ return ret;
84
+ }, arguments); },
85
+ __wbg_keys_b50a709a76add04e: function(arg0) {
86
+ const ret = Object.keys(arg0);
87
+ return ret;
88
+ },
89
+ __wbg_length_32ed9a279acd054c: function(arg0) {
90
+ const ret = arg0.length;
91
+ return ret;
92
+ },
93
+ __wbg_length_35a7bace40f36eac: function(arg0) {
94
+ const ret = arg0.length;
95
+ return ret;
96
+ },
97
+ __wbg_new_361308b2356cecd0: function() {
98
+ const ret = new Object();
99
+ return ret;
100
+ },
101
+ __wbg_new_8a6f238a6ece86ea: function() {
102
+ const ret = new Error();
103
+ return ret;
104
+ },
105
+ __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
106
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
107
+ return ret;
108
+ },
109
+ __wbg_now_a3af9a2f4bbaa4d1: function() {
110
+ const ret = Date.now();
111
+ return ret;
112
+ },
113
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
114
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
115
+ },
116
+ __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
117
+ const ret = Reflect.set(arg0, arg1, arg2);
118
+ return ret;
119
+ }, arguments); },
120
+ __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
121
+ const ret = arg1.stack;
122
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
123
+ const len1 = WASM_VECTOR_LEN;
124
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
125
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
126
+ },
127
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
128
+ // Cast intrinsic for `Ref(String) -> Externref`.
129
+ const ret = getStringFromWasm0(arg0, arg1);
130
+ return ret;
131
+ },
132
+ __wbindgen_init_externref_table: function() {
133
+ const table = wasm.__wbindgen_externrefs;
134
+ const offset = table.grow(4);
135
+ table.set(0, undefined);
136
+ table.set(offset + 0, undefined);
137
+ table.set(offset + 1, null);
138
+ table.set(offset + 2, true);
139
+ table.set(offset + 3, false);
140
+ },
141
+ };
142
+ return {
143
+ __proto__: null,
144
+ "./vpin_bg.js": import0,
145
+ };
146
+ }
147
+
148
+ function addToExternrefTable0(obj) {
149
+ const idx = wasm.__externref_table_alloc();
150
+ wasm.__wbindgen_externrefs.set(idx, obj);
151
+ return idx;
152
+ }
153
+
154
+ function debugString(val) {
155
+ // primitive types
156
+ const type = typeof val;
157
+ if (type == 'number' || type == 'boolean' || val == null) {
158
+ return `${val}`;
159
+ }
160
+ if (type == 'string') {
161
+ return `"${val}"`;
162
+ }
163
+ if (type == 'symbol') {
164
+ const description = val.description;
165
+ if (description == null) {
166
+ return 'Symbol';
167
+ } else {
168
+ return `Symbol(${description})`;
169
+ }
170
+ }
171
+ if (type == 'function') {
172
+ const name = val.name;
173
+ if (typeof name == 'string' && name.length > 0) {
174
+ return `Function(${name})`;
175
+ } else {
176
+ return 'Function';
177
+ }
178
+ }
179
+ // objects
180
+ if (Array.isArray(val)) {
181
+ const length = val.length;
182
+ let debug = '[';
183
+ if (length > 0) {
184
+ debug += debugString(val[0]);
185
+ }
186
+ for(let i = 1; i < length; i++) {
187
+ debug += ', ' + debugString(val[i]);
188
+ }
189
+ debug += ']';
190
+ return debug;
191
+ }
192
+ // Test for built-in
193
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
194
+ let className;
195
+ if (builtInMatches && builtInMatches.length > 1) {
196
+ className = builtInMatches[1];
197
+ } else {
198
+ // Failed to match the standard '[object ClassName]'
199
+ return toString.call(val);
200
+ }
201
+ if (className == 'Object') {
202
+ // we're a user defined class or Object
203
+ // JSON.stringify avoids problems with cycles, and is generally much
204
+ // easier than looping through ownProperties of `val`.
205
+ try {
206
+ return 'Object(' + JSON.stringify(val) + ')';
207
+ } catch (_) {
208
+ return 'Object';
209
+ }
210
+ }
211
+ // errors
212
+ if (val instanceof Error) {
213
+ return `${val.name}: ${val.message}\n${val.stack}`;
214
+ }
215
+ // TODO we could test for more things here, like `Set`s and `Map`s.
216
+ return className;
217
+ }
218
+
219
+ function getArrayU8FromWasm0(ptr, len) {
220
+ ptr = ptr >>> 0;
221
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
222
+ }
223
+
224
+ let cachedDataViewMemory0 = null;
225
+ function getDataViewMemory0() {
226
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
227
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
228
+ }
229
+ return cachedDataViewMemory0;
230
+ }
231
+
232
+ function getStringFromWasm0(ptr, len) {
233
+ ptr = ptr >>> 0;
234
+ return decodeText(ptr, len);
235
+ }
236
+
237
+ let cachedUint8ArrayMemory0 = null;
238
+ function getUint8ArrayMemory0() {
239
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
240
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
241
+ }
242
+ return cachedUint8ArrayMemory0;
243
+ }
244
+
245
+ function handleError(f, args) {
246
+ try {
247
+ return f.apply(this, args);
248
+ } catch (e) {
249
+ const idx = addToExternrefTable0(e);
250
+ wasm.__wbindgen_exn_store(idx);
251
+ }
252
+ }
253
+
254
+ function isLikeNone(x) {
255
+ return x === undefined || x === null;
256
+ }
257
+
258
+ function passArray8ToWasm0(arg, malloc) {
259
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
260
+ getUint8ArrayMemory0().set(arg, ptr / 1);
261
+ WASM_VECTOR_LEN = arg.length;
262
+ return ptr;
263
+ }
264
+
265
+ function passStringToWasm0(arg, malloc, realloc) {
266
+ if (realloc === undefined) {
267
+ const buf = cachedTextEncoder.encode(arg);
268
+ const ptr = malloc(buf.length, 1) >>> 0;
269
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
270
+ WASM_VECTOR_LEN = buf.length;
271
+ return ptr;
272
+ }
273
+
274
+ let len = arg.length;
275
+ let ptr = malloc(len, 1) >>> 0;
276
+
277
+ const mem = getUint8ArrayMemory0();
278
+
279
+ let offset = 0;
280
+
281
+ for (; offset < len; offset++) {
282
+ const code = arg.charCodeAt(offset);
283
+ if (code > 0x7F) break;
284
+ mem[ptr + offset] = code;
285
+ }
286
+ if (offset !== len) {
287
+ if (offset !== 0) {
288
+ arg = arg.slice(offset);
289
+ }
290
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
291
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
292
+ const ret = cachedTextEncoder.encodeInto(arg, view);
293
+
294
+ offset += ret.written;
295
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
296
+ }
297
+
298
+ WASM_VECTOR_LEN = offset;
299
+ return ptr;
300
+ }
301
+
302
+ function takeFromExternrefTable0(idx) {
303
+ const value = wasm.__wbindgen_externrefs.get(idx);
304
+ wasm.__externref_table_dealloc(idx);
305
+ return value;
306
+ }
307
+
308
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
309
+ cachedTextDecoder.decode();
310
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
311
+ let numBytesDecoded = 0;
312
+ function decodeText(ptr, len) {
313
+ numBytesDecoded += len;
314
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
315
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
316
+ cachedTextDecoder.decode();
317
+ numBytesDecoded = len;
318
+ }
319
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
320
+ }
321
+
322
+ const cachedTextEncoder = new TextEncoder();
323
+
324
+ if (!('encodeInto' in cachedTextEncoder)) {
325
+ cachedTextEncoder.encodeInto = function (arg, view) {
326
+ const buf = cachedTextEncoder.encode(arg);
327
+ view.set(buf);
328
+ return {
329
+ read: arg.length,
330
+ written: buf.length
331
+ };
332
+ };
333
+ }
334
+
335
+ let WASM_VECTOR_LEN = 0;
336
+
337
+ let wasmModule, wasm;
338
+ function __wbg_finalize_init(instance, module) {
339
+ wasm = instance.exports;
340
+ wasmModule = module;
341
+ cachedDataViewMemory0 = null;
342
+ cachedUint8ArrayMemory0 = null;
343
+ wasm.__wbindgen_start();
344
+ return wasm;
345
+ }
346
+
347
+ async function __wbg_load(module, imports) {
348
+ if (typeof Response === 'function' && module instanceof Response) {
349
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
350
+ try {
351
+ return await WebAssembly.instantiateStreaming(module, imports);
352
+ } catch (e) {
353
+ const validResponse = module.ok && expectedResponseType(module.type);
354
+
355
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
356
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
357
+
358
+ } else { throw e; }
359
+ }
360
+ }
361
+
362
+ const bytes = await module.arrayBuffer();
363
+ return await WebAssembly.instantiate(bytes, imports);
364
+ } else {
365
+ const instance = await WebAssembly.instantiate(module, imports);
366
+
367
+ if (instance instanceof WebAssembly.Instance) {
368
+ return { instance, module };
369
+ } else {
370
+ return instance;
371
+ }
372
+ }
373
+
374
+ function expectedResponseType(type) {
375
+ switch (type) {
376
+ case 'basic': case 'cors': case 'default': return true;
377
+ }
378
+ return false;
379
+ }
380
+ }
381
+
382
+ function initSync(module) {
383
+ if (wasm !== undefined) return wasm;
384
+
385
+
386
+ if (module !== undefined) {
387
+ if (Object.getPrototypeOf(module) === Object.prototype) {
388
+ ({module} = module)
389
+ } else {
390
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
391
+ }
392
+ }
393
+
394
+ const imports = __wbg_get_imports();
395
+ if (!(module instanceof WebAssembly.Module)) {
396
+ module = new WebAssembly.Module(module);
397
+ }
398
+ const instance = new WebAssembly.Instance(module, imports);
399
+ return __wbg_finalize_init(instance, module);
400
+ }
401
+
402
+ async function __wbg_init(module_or_path) {
403
+ if (wasm !== undefined) return wasm;
404
+
405
+
406
+ if (module_or_path !== undefined) {
407
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
408
+ ({module_or_path} = module_or_path)
409
+ } else {
410
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
411
+ }
412
+ }
413
+
414
+ if (module_or_path === undefined) {
415
+ module_or_path = new URL('vpin_bg.wasm', import.meta.url);
416
+ }
417
+ const imports = __wbg_get_imports();
418
+
419
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
420
+ module_or_path = fetch(module_or_path);
421
+ }
422
+
423
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
424
+
425
+ return __wbg_finalize_init(instance, module);
426
+ }
427
+
428
+ export { initSync, __wbg_init as default };
package/vpin_bg.wasm ADDED
Binary file
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const assemble: (a: any, b: number) => [number, number, number, number];
5
+ export const extract: (a: number, b: number, c: number) => [number, number, number];
6
+ export const init: () => void;
7
+ export const __wbindgen_malloc: (a: number, b: number) => number;
8
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
9
+ export const __wbindgen_exn_store: (a: number) => void;
10
+ export const __externref_table_alloc: () => number;
11
+ export const __wbindgen_externrefs: WebAssembly.Table;
12
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
13
+ export const __externref_table_dealloc: (a: number) => void;
14
+ export const __wbindgen_start: () => void;