payid-rule-engine 0.1.7 → 0.1.9
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 +1 -1
- package/src/wasm.ts +6 -2
package/package.json
CHANGED
package/src/wasm.ts
CHANGED
|
@@ -10,7 +10,11 @@ export async function loadWasm(
|
|
|
10
10
|
wasi_snapshot_preview1: wasi.wasiImport
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// rule_engine.wasm adalah reactor module — bukan command module.
|
|
14
|
+
// Node.js punya wasi.initialize(), tapi Bun belum support.
|
|
15
|
+
// Solusi: panggil _initialize export langsung dari WASM instance (portable).
|
|
16
|
+
const _init = instance.exports._initialize as (() => void) | undefined;
|
|
17
|
+
if (_init) _init();
|
|
14
18
|
|
|
15
19
|
return instance;
|
|
16
|
-
}
|
|
20
|
+
}
|