@vulfram/transport-wasm 0.16.10-alpha → 0.17.1-alpha
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/lib/vulfram_core.d.ts +2 -2
- package/lib/vulfram_core.js +9 -12
- package/lib/vulfram_core_bg.wasm +0 -0
- package/lib/vulfram_core_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/lib/vulfram_core.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export class BufferResult {
|
|
|
5
5
|
private constructor();
|
|
6
6
|
free(): void;
|
|
7
7
|
[Symbol.dispose](): void;
|
|
8
|
-
|
|
8
|
+
takeBuffer(): Uint8Array;
|
|
9
9
|
readonly result: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -52,8 +52,8 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
52
52
|
export interface InitOutput {
|
|
53
53
|
readonly memory: WebAssembly.Memory;
|
|
54
54
|
readonly __wbg_bufferresult_free: (a: number, b: number) => void;
|
|
55
|
-
readonly bufferresult_buffer: (a: number, b: number) => void;
|
|
56
55
|
readonly bufferresult_result: (a: number) => number;
|
|
56
|
+
readonly bufferresult_takeBuffer: (a: number, b: number) => void;
|
|
57
57
|
readonly vulfram_dispose: () => number;
|
|
58
58
|
readonly vulfram_get_profiling: () => number;
|
|
59
59
|
readonly vulfram_init: () => number;
|
package/lib/vulfram_core.js
CHANGED
|
@@ -296,10 +296,10 @@ export class BufferResult {
|
|
|
296
296
|
/**
|
|
297
297
|
* @returns {Uint8Array}
|
|
298
298
|
*/
|
|
299
|
-
|
|
299
|
+
takeBuffer() {
|
|
300
300
|
try {
|
|
301
301
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
302
|
-
wasm.
|
|
302
|
+
wasm.bufferresult_takeBuffer(retptr, this.__wbg_ptr);
|
|
303
303
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
304
304
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
305
305
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
@@ -570,9 +570,6 @@ function __wbg_get_imports() {
|
|
|
570
570
|
imports.wbg.__wbg_copyBufferToBuffer_3e2b8d1e524281f5 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
571
571
|
getObject(arg0).copyBufferToBuffer(getObject(arg1), arg2, getObject(arg3), arg4, arg5);
|
|
572
572
|
}, arguments) };
|
|
573
|
-
imports.wbg.__wbg_copyTextureToTexture_bf93074b99536fcf = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
574
|
-
getObject(arg0).copyTextureToTexture(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
575
|
-
}, arguments) };
|
|
576
573
|
imports.wbg.__wbg_createBindGroupLayout_f543b79f894eed2e = function() { return handleError(function (arg0, arg1) {
|
|
577
574
|
const ret = getObject(arg0).createBindGroupLayout(getObject(arg1));
|
|
578
575
|
return addHeapObject(ret);
|
|
@@ -1411,18 +1408,18 @@ function __wbg_get_imports() {
|
|
|
1411
1408
|
imports.wbg.__wbg_writeTexture_0466bf7d7d35e04e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1412
1409
|
getObject(arg0).writeTexture(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
|
|
1413
1410
|
}, arguments) };
|
|
1411
|
+
imports.wbg.__wbindgen_cast_0c7634bb955eb75b = function(arg0, arg1) {
|
|
1412
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 40, function: Function { arguments: [NamedExternref("Event")], shim_idx: 41, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1413
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1290, __wasm_bindgen_func_elem_1291);
|
|
1414
|
+
return addHeapObject(ret);
|
|
1415
|
+
};
|
|
1414
1416
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1415
1417
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1416
1418
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1417
1419
|
return addHeapObject(ret);
|
|
1418
1420
|
};
|
|
1419
|
-
imports.wbg.
|
|
1420
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1421
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1290, __wasm_bindgen_func_elem_1291);
|
|
1422
|
-
return addHeapObject(ret);
|
|
1423
|
-
};
|
|
1424
|
-
imports.wbg.__wbindgen_cast_c821b8d28ac8e93b = function(arg0, arg1) {
|
|
1425
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 43, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1421
|
+
imports.wbg.__wbindgen_cast_c6111fef16576abb = function(arg0, arg1) {
|
|
1422
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 40, function: Function { arguments: [Externref], shim_idx: 41, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1426
1423
|
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1290, __wasm_bindgen_func_elem_1291);
|
|
1427
1424
|
return addHeapObject(ret);
|
|
1428
1425
|
};
|
package/lib/vulfram_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_bufferresult_free: (a: number, b: number) => void;
|
|
5
|
-
export const bufferresult_buffer: (a: number, b: number) => void;
|
|
6
5
|
export const bufferresult_result: (a: number) => number;
|
|
6
|
+
export const bufferresult_takeBuffer: (a: number, b: number) => void;
|
|
7
7
|
export const vulfram_dispose: () => number;
|
|
8
8
|
export const vulfram_get_profiling: () => number;
|
|
9
9
|
export const vulfram_init: () => number;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -37,7 +37,7 @@ function unwrapBufferResult(result: WasmBufferResult): {
|
|
|
37
37
|
buffer: Uint8Array;
|
|
38
38
|
result: number;
|
|
39
39
|
} {
|
|
40
|
-
const buffer = result.
|
|
40
|
+
const buffer = result.takeBuffer();
|
|
41
41
|
const code = result.result;
|
|
42
42
|
result.free();
|
|
43
43
|
return { buffer, result: code };
|