File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @picovoice/web-utils" ,
3
- "version" : " 1.3.2 " ,
3
+ "version" : " 1.3.3 " ,
4
4
"description" : " Picovoice web utility functions" ,
5
5
"author" : " Picovoice" ,
6
6
"license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change @@ -35,12 +35,14 @@ export type pv_free_type = (ptr: number) => Promise<void>;
35
35
* @param memory Initialized WebAssembly memory object.
36
36
* @param wasm The wasm file in base64 string or stream to public path (i.e. fetch("file.wasm")) to initialize.
37
37
* @param pvError The PvError object to store error details.
38
+ * @param additionalImports Extra WASM imports.
38
39
* @returns An object containing the exported functions from WASM.
39
40
*/
40
41
export async function buildWasm (
41
42
memory : WebAssembly . Memory ,
42
43
wasm : string | Promise < Response > ,
43
- pvError ?: PvError
44
+ pvError ?: PvError ,
45
+ additionalImports : Record < string , any > = { } ,
44
46
) : Promise < any > {
45
47
const memoryBufferUint8 = new Uint8Array ( memory . buffer ) ;
46
48
const memoryBufferInt32 = new Int32Array ( memory . buffer ) ;
@@ -376,7 +378,8 @@ export async function buildWasm(
376
378
pv_file_write_wasm : pvFileWriteWasm ,
377
379
pv_file_seek_wasm : pvFileSeekWasm ,
378
380
pv_file_tell_wasm : pvFileTellWasm ,
379
- pv_file_remove_wasm : pvFileRemoveWasm
381
+ pv_file_remove_wasm : pvFileRemoveWasm ,
382
+ ...additionalImports
380
383
} ,
381
384
} ;
382
385
You can’t perform that action at this time.
0 commit comments