@thi.ng/wasm-api 2.3.11 → 2.3.12
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 +7 -1
- package/README.md +7 -4
- package/package.json +2 -2
- package/zig/lib.zig +1 -1
- package/zig/managed-index.zig +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-03-
|
|
3
|
+
- **Last updated**: 2025-03-11T13:30:45Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [2.3.12](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@2.3.12) (2025-03-11)
|
|
15
|
+
|
|
16
|
+
#### ♻️ Refactoring
|
|
17
|
+
|
|
18
|
+
- minor update core lib (Zig v0.14.0) ([ebe1533](https://github.com/thi-ng/umbrella/commit/ebe1533))
|
|
19
|
+
|
|
14
20
|
### [2.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@2.3.1) (2025-01-14)
|
|
15
21
|
|
|
16
22
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- [API module auto-initialization](#api-module-auto-initialization)
|
|
23
23
|
- [Object indices & handles](#object-indices--handles)
|
|
24
24
|
- [Using the Zig build system](#using-the-zig-build-system)
|
|
25
|
-
- [Zig v0.
|
|
25
|
+
- [Zig v0.14 or newer](#zig-v014-or-newer)
|
|
26
26
|
- [Example projects](#example-projects)
|
|
27
27
|
- [Naming & structural conventions](#naming--structural-conventions)
|
|
28
28
|
- [Status](#status)
|
|
@@ -379,15 +379,18 @@ This package provides utilities to simplify using hybrid TS/Zig WASM API modules
|
|
|
379
379
|
which are distributed as NPM packages. Using these utils, a build file for Zig's
|
|
380
380
|
built-in build system is as simple as:
|
|
381
381
|
|
|
382
|
-
### Zig v0.
|
|
382
|
+
### Zig v0.14 or newer
|
|
383
383
|
|
|
384
384
|
**IMPORTANT:** Due to recent syntax & build system changes in Zig
|
|
385
|
-
[v0.12.0](https://ziglang.org/download/0.12.0/release-notes.html)
|
|
386
|
-
[v0.13.0](https://ziglang.org/download/0.13.0/release-notes.html)
|
|
385
|
+
[v0.12.0](https://ziglang.org/download/0.12.0/release-notes.html),
|
|
386
|
+
[v0.13.0](https://ziglang.org/download/0.13.0/release-notes.html) and
|
|
387
|
+
[v0.14.0](https://ziglang.org/download/0.14.0/release-notes.html), older Zig
|
|
387
388
|
versions are not actively supported anymore (however, [build files for older
|
|
388
389
|
versions are still
|
|
389
390
|
included](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig))
|
|
390
391
|
|
|
392
|
+
Please see [bundled examples](#usage-examples) for more details...
|
|
393
|
+
|
|
391
394
|
```zig
|
|
392
395
|
const std = @import("std");
|
|
393
396
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/wasm-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"tag": "wasm",
|
|
127
127
|
"year": 2022
|
|
128
128
|
},
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "b5172cfde94e2fa078638f25405b65043b8d8ae7\n"
|
|
130
130
|
}
|
package/zig/lib.zig
CHANGED
|
@@ -13,7 +13,7 @@ pub const ManagedIndex = @import("managed-index.zig").ManagedIndex;
|
|
|
13
13
|
pub fn ptrCast(comptime T: type, ptr: ?*anyopaque) ?T {
|
|
14
14
|
if (ptr == null) return null;
|
|
15
15
|
const info = @typeInfo(T);
|
|
16
|
-
if (info != .
|
|
16
|
+
if (info != .pointer) @compileError("require pointer type");
|
|
17
17
|
return @ptrCast(@alignCast(ptr));
|
|
18
18
|
}
|
|
19
19
|
|
package/zig/managed-index.zig
CHANGED
|
@@ -13,7 +13,7 @@ const Allocator = std.mem.Allocator;
|
|
|
13
13
|
/// unused items and mark their slot IDs for re-use.
|
|
14
14
|
pub fn ManagedIndex(comptime T: type, comptime I: type) type {
|
|
15
15
|
const info = @typeInfo(I);
|
|
16
|
-
if (!(info == .
|
|
16
|
+
if (!(info == .int and info.int.bits > 0 and info.int.signedness == std.builtin.Signedness.unsigned)) {
|
|
17
17
|
@compileError("require unsigned int as index type");
|
|
18
18
|
}
|
|
19
19
|
const Item = union(enum) {
|