@visiq/core-wasm 0.1.1 → 0.1.3
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/pkg/visiq_core.d.ts +4 -4
- package/pkg/visiq_core.js +17 -17
- package/pkg/visiq_core_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visiq/core-wasm",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "VisIQ governance core (visiq-core-rs) compiled to WASM — the ONE Rust evaluation core, bound to JS. Same core the Go/Java/Ruby/Python SDKs use. evaluate(eventJson, bundleJson) -> decisionJson.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "index.js",
|
package/pkg/visiq_core.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* WASM binding for the granular `dispatch` seam.
|
|
5
|
-
*/
|
|
6
|
-
export function dispatch(op: string, payload_json: string): string;
|
|
7
3
|
/**
|
|
8
4
|
* WASM binding (for `@visiq/core-wasm` → the TS SDK / harness). The SAME
|
|
9
5
|
* `evaluate_json` core, exposed to JS through wasm-bindgen so the TypeScript SDK
|
|
@@ -11,3 +7,7 @@ export function dispatch(op: string, payload_json: string): string;
|
|
|
11
7
|
* `evaluate_json` is fail-closed (G001) on malformed input, so this never throws.
|
|
12
8
|
*/
|
|
13
9
|
export function evaluate(event_json: string, bundle_json: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* WASM binding for the granular `dispatch` seam.
|
|
12
|
+
*/
|
|
13
|
+
export function dispatch(op: string, payload_json: string): string;
|
package/pkg/visiq_core.js
CHANGED
|
@@ -78,20 +78,23 @@ function getStringFromWasm0(ptr, len) {
|
|
|
78
78
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* WASM binding for the
|
|
82
|
-
*
|
|
83
|
-
*
|
|
81
|
+
* WASM binding (for `@visiq/core-wasm` → the TS SDK / harness). The SAME
|
|
82
|
+
* `evaluate_json` core, exposed to JS through wasm-bindgen so the TypeScript SDK
|
|
83
|
+
* evaluates through the ONE compiled core exactly like the Go/Java/Ruby bindings.
|
|
84
|
+
* `evaluate_json` is fail-closed (G001) on malformed input, so this never throws.
|
|
85
|
+
* @param {string} event_json
|
|
86
|
+
* @param {string} bundle_json
|
|
84
87
|
* @returns {string}
|
|
85
88
|
*/
|
|
86
|
-
module.exports.
|
|
89
|
+
module.exports.evaluate = function(event_json, bundle_json) {
|
|
87
90
|
let deferred3_0;
|
|
88
91
|
let deferred3_1;
|
|
89
92
|
try {
|
|
90
|
-
const ptr0 = passStringToWasm0(
|
|
93
|
+
const ptr0 = passStringToWasm0(event_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
91
94
|
const len0 = WASM_VECTOR_LEN;
|
|
92
|
-
const ptr1 = passStringToWasm0(
|
|
95
|
+
const ptr1 = passStringToWasm0(bundle_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
93
96
|
const len1 = WASM_VECTOR_LEN;
|
|
94
|
-
const ret = wasm.
|
|
97
|
+
const ret = wasm.evaluate(ptr0, len0, ptr1, len1);
|
|
95
98
|
deferred3_0 = ret[0];
|
|
96
99
|
deferred3_1 = ret[1];
|
|
97
100
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -101,23 +104,20 @@ module.exports.dispatch = function(op, payload_json) {
|
|
|
101
104
|
};
|
|
102
105
|
|
|
103
106
|
/**
|
|
104
|
-
* WASM binding
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* `evaluate_json` is fail-closed (G001) on malformed input, so this never throws.
|
|
108
|
-
* @param {string} event_json
|
|
109
|
-
* @param {string} bundle_json
|
|
107
|
+
* WASM binding for the granular `dispatch` seam.
|
|
108
|
+
* @param {string} op
|
|
109
|
+
* @param {string} payload_json
|
|
110
110
|
* @returns {string}
|
|
111
111
|
*/
|
|
112
|
-
module.exports.
|
|
112
|
+
module.exports.dispatch = function(op, payload_json) {
|
|
113
113
|
let deferred3_0;
|
|
114
114
|
let deferred3_1;
|
|
115
115
|
try {
|
|
116
|
-
const ptr0 = passStringToWasm0(
|
|
116
|
+
const ptr0 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
117
117
|
const len0 = WASM_VECTOR_LEN;
|
|
118
|
-
const ptr1 = passStringToWasm0(
|
|
118
|
+
const ptr1 = passStringToWasm0(payload_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
119
119
|
const len1 = WASM_VECTOR_LEN;
|
|
120
|
-
const ret = wasm.
|
|
120
|
+
const ret = wasm.dispatch(ptr0, len0, ptr1, len1);
|
|
121
121
|
deferred3_0 = ret[0];
|
|
122
122
|
deferred3_1 = ret[1];
|
|
123
123
|
return getStringFromWasm0(ret[0], ret[1]);
|
package/pkg/visiq_core_bg.wasm
CHANGED
|
Binary file
|