@thi.ng/wasm-api 2.4.23 → 2.4.24
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/README.md +1 -1
- package/bridge.js +1 -0
- package/package.json +11 -11
- package/pointer.js +6 -0
- package/string.js +7 -0
package/README.md
CHANGED
package/bridge.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/wasm-api",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.24",
|
|
4
4
|
"description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@thi.ng/api": "^8.12.
|
|
47
|
-
"@thi.ng/arrays": "^2.14.
|
|
48
|
-
"@thi.ng/checks": "^3.8.
|
|
49
|
-
"@thi.ng/errors": "^2.6.
|
|
50
|
-
"@thi.ng/hex": "^2.4.
|
|
51
|
-
"@thi.ng/idgen": "^2.2.
|
|
52
|
-
"@thi.ng/logger": "^3.3.
|
|
46
|
+
"@thi.ng/api": "^8.12.19",
|
|
47
|
+
"@thi.ng/arrays": "^2.14.15",
|
|
48
|
+
"@thi.ng/checks": "^3.8.9",
|
|
49
|
+
"@thi.ng/errors": "^2.6.8",
|
|
50
|
+
"@thi.ng/hex": "^2.4.11",
|
|
51
|
+
"@thi.ng/idgen": "^2.2.93",
|
|
52
|
+
"@thi.ng/logger": "^3.3.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"esbuild": "^0.
|
|
56
|
-
"typedoc": "^0.28.
|
|
55
|
+
"esbuild": "^0.28.0",
|
|
56
|
+
"typedoc": "^0.28.18",
|
|
57
57
|
"typescript": "^5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"tag": "wasm",
|
|
128
128
|
"year": 2022
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "a780d4a5f6f5fc595c9d28527686f63534927d32"
|
|
131
131
|
}
|
package/pointer.js
CHANGED
|
@@ -4,6 +4,9 @@ class Pointer {
|
|
|
4
4
|
this.base = base;
|
|
5
5
|
this.fn = fn;
|
|
6
6
|
}
|
|
7
|
+
mem;
|
|
8
|
+
base;
|
|
9
|
+
fn;
|
|
7
10
|
get addr() {
|
|
8
11
|
this.mem.ensureMemory();
|
|
9
12
|
return this.mem.u32[this.base >>> 2];
|
|
@@ -26,6 +29,9 @@ class Pointer64 {
|
|
|
26
29
|
this.base = base;
|
|
27
30
|
this.fn = fn;
|
|
28
31
|
}
|
|
32
|
+
mem;
|
|
33
|
+
base;
|
|
34
|
+
fn;
|
|
29
35
|
get addr() {
|
|
30
36
|
this.mem.ensureMemory();
|
|
31
37
|
return this.mem.u64[Number(this.base >> BigInt(3))];
|
package/string.js
CHANGED
|
@@ -8,6 +8,10 @@ class WasmStringSlice {
|
|
|
8
8
|
this.terminated = terminated;
|
|
9
9
|
this.maxLen = this.length;
|
|
10
10
|
}
|
|
11
|
+
mem;
|
|
12
|
+
base;
|
|
13
|
+
isConst;
|
|
14
|
+
terminated;
|
|
11
15
|
maxLen;
|
|
12
16
|
/**
|
|
13
17
|
* Returns string start address (deref'd pointer).
|
|
@@ -108,6 +112,9 @@ class WasmStringPtr {
|
|
|
108
112
|
this.base = base;
|
|
109
113
|
this.isConst = isConst;
|
|
110
114
|
}
|
|
115
|
+
mem;
|
|
116
|
+
base;
|
|
117
|
+
isConst;
|
|
111
118
|
/**
|
|
112
119
|
* Returns string start address (deref'd pointer).
|
|
113
120
|
*/
|