@thi.ng/wasm-api 1.4.18 → 1.4.20
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/CHANGELOG.md +1 -1
- package/README.md +5 -5
- package/bridge.js +2 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ This project is part of the
|
|
|
17
17
|
- [API module auto-initialization](#api-module-auto-initialization)
|
|
18
18
|
- [Object indices & handles](#object-indices--handles)
|
|
19
19
|
- [Using the Zig build system](#using-the-zig-build-system)
|
|
20
|
-
- [Zig v0.11.0
|
|
20
|
+
- [Zig v0.11.0 or newer](#zig-v0110-or-newer)
|
|
21
21
|
- [Example projects](#example-projects)
|
|
22
22
|
- [Naming & structural conventions](#naming--structural-conventions)
|
|
23
23
|
- [Status](#status)
|
|
@@ -312,10 +312,11 @@ This package provides utilities to simplify using hybrid TS/Zig WASM API modules
|
|
|
312
312
|
which are distributed as NPM packages. Using these utils, a build file for Zig's
|
|
313
313
|
built-in build system is as simple as:
|
|
314
314
|
|
|
315
|
-
### Zig v0.11.0
|
|
315
|
+
### Zig v0.11.0 or newer
|
|
316
316
|
|
|
317
|
-
**IMPORTANT:** Due to recent syntax
|
|
318
|
-
v0.
|
|
317
|
+
**IMPORTANT:** Due to recent [syntax & build system changes in Zig
|
|
318
|
+
v0.11.0](https://ziglang.org/download/0.11.0/release-notes.html), support for
|
|
319
|
+
older Zig versions had to be removed...
|
|
319
320
|
|
|
320
321
|
```zig
|
|
321
322
|
const std = @import("std");
|
|
@@ -350,7 +351,6 @@ via this script. **Please find more details/options in the commented source
|
|
|
350
351
|
code:**
|
|
351
352
|
|
|
352
353
|
- [`/zig/build.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/build.zig)
|
|
353
|
-
- [`/zig/build-v0.10.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/build-v0.10.zig)
|
|
354
354
|
|
|
355
355
|
## Naming & structural conventions
|
|
356
356
|
|
package/bridge.js
CHANGED
|
@@ -24,7 +24,7 @@ export const OutOfMemoryError = defError(() => "Out of memory");
|
|
|
24
24
|
* 64bit integers are handled via JS `BigInt` and hence require the host env to
|
|
25
25
|
* support it. No polyfills are provided.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
let WasmBridge = class WasmBridge {
|
|
28
28
|
constructor(modules = [], logger = new ConsoleLogger("wasm")) {
|
|
29
29
|
this.logger = logger;
|
|
30
30
|
this.id = "wasmapi";
|
|
@@ -401,3 +401,4 @@ export let WasmBridge = class WasmBridge {
|
|
|
401
401
|
WasmBridge = __decorate([
|
|
402
402
|
INotifyMixin
|
|
403
403
|
], WasmBridge);
|
|
404
|
+
export { WasmBridge };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/wasm-api",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.20",
|
|
4
4
|
"description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"test:build-zig": "zig build-lib -O ReleaseSmall -target wasm32-freestanding -dynamic --strip --pkg-begin wasmapi zig/lib.zig --pkg-end test/custom.zig && wasm-dis -o custom.wast custom.wasm && cp custom.wasm test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/arrays": "^2.5.
|
|
40
|
-
"@thi.ng/checks": "^3.4.
|
|
41
|
-
"@thi.ng/errors": "^2.3.
|
|
42
|
-
"@thi.ng/hex": "^2.3.
|
|
43
|
-
"@thi.ng/idgen": "^2.2.
|
|
44
|
-
"@thi.ng/logger": "^1.4.
|
|
38
|
+
"@thi.ng/api": "^8.9.5",
|
|
39
|
+
"@thi.ng/arrays": "^2.5.22",
|
|
40
|
+
"@thi.ng/checks": "^3.4.5",
|
|
41
|
+
"@thi.ng/errors": "^2.3.5",
|
|
42
|
+
"@thi.ng/hex": "^2.3.17",
|
|
43
|
+
"@thi.ng/idgen": "^2.2.6",
|
|
44
|
+
"@thi.ng/logger": "^1.4.21"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@microsoft/api-extractor": "^7.36.4",
|
|
48
|
-
"@thi.ng/testament": "^0.3.
|
|
48
|
+
"@thi.ng/testament": "^0.3.23",
|
|
49
49
|
"rimraf": "^5.0.1",
|
|
50
50
|
"tools": "^0.0.1",
|
|
51
|
-
"typedoc": "^0.
|
|
52
|
-
"typescript": "^5.
|
|
51
|
+
"typedoc": "^0.25.0",
|
|
52
|
+
"typescript": "^5.2.2"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"allocator",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"status": "alpha",
|
|
116
116
|
"year": 2022
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "34c3bd36b0133af05abc7fe66affa01dd99704ac\n"
|
|
119
119
|
}
|