@oh-my-pi/pi-natives 8.12.4 → 8.12.5
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/package.json +2 -2
- package/wasm/pi_natives.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-natives",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.5",
|
|
4
4
|
"description": "Native Rust functionality compiled to WebAssembly via wasm-bindgen",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"directory": "packages/natives"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@oh-my-pi/pi-utils": "8.12.
|
|
33
|
+
"@oh-my-pi/pi-utils": "8.12.5"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^25.0.10"
|
package/wasm/pi_natives.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* @ts-self-types="./pi_natives.d.ts" */
|
|
2
2
|
|
|
3
|
+
import wasmPath from "./pi_natives_bg.wasm";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* A compiled regex matcher that can be reused across multiple searches.
|
|
5
7
|
*/
|
|
@@ -651,6 +653,6 @@ const cachedTextEncoder = new TextEncoder();
|
|
|
651
653
|
|
|
652
654
|
let WASM_VECTOR_LEN = 0;
|
|
653
655
|
|
|
654
|
-
const wasmUrl =
|
|
656
|
+
const wasmUrl = import.meta.resolve(wasmPath);
|
|
655
657
|
const wasmInstantiated = await WebAssembly.instantiateStreaming(fetch(wasmUrl), __wbg_get_imports());
|
|
656
658
|
const wasm = wasmInstantiated.instance.exports;
|