@thi.ng/wasm-api 2.3.11 → 2.3.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-03-09T19:21:53Z
3
+ - **Last updated**: 2025-03-17T13:40:35Z
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
@@ -1,6 +1,6 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
  <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
- # ![@thi.ng/wasm-api](https://media.thi.ng/umbrella/banners-20230807/thing-wasm-api.svg?a4addfc6)
3
+ # ![@thi.ng/wasm-api](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/banners/thing-wasm-api.svg?a4addfc6)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/wasm-api.svg)](https://www.npmjs.com/package/@thi.ng/wasm-api)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/wasm-api.svg)
@@ -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.13 or newer](#zig-v013-or-newer)
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.13 or newer
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), older 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) 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.11",
3
+ "version": "2.3.13",
4
4
  "description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -42,18 +42,18 @@
42
42
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@thi.ng/api": "^8.11.22",
46
- "@thi.ng/arrays": "^2.10.19",
47
- "@thi.ng/checks": "^3.7.2",
48
- "@thi.ng/errors": "^2.5.28",
49
- "@thi.ng/hex": "^2.3.66",
50
- "@thi.ng/idgen": "^2.2.62",
51
- "@thi.ng/logger": "^3.1.3"
45
+ "@thi.ng/api": "^8.11.23",
46
+ "@thi.ng/arrays": "^2.10.20",
47
+ "@thi.ng/checks": "^3.7.3",
48
+ "@thi.ng/errors": "^2.5.29",
49
+ "@thi.ng/hex": "^2.3.67",
50
+ "@thi.ng/idgen": "^2.2.63",
51
+ "@thi.ng/logger": "^3.1.4"
52
52
  },
53
53
  "devDependencies": {
54
- "esbuild": "^0.25.0",
55
- "typedoc": "^0.27.7",
56
- "typescript": "^5.7.3"
54
+ "esbuild": "^0.25.1",
55
+ "typedoc": "^0.28.0",
56
+ "typescript": "^5.8.2"
57
57
  },
58
58
  "keywords": [
59
59
  "allocator",
@@ -126,5 +126,5 @@
126
126
  "tag": "wasm",
127
127
  "year": 2022
128
128
  },
129
- "gitHead": "55987d581e4985b1c3091ba6be3f9b53a0c5eeea\n"
129
+ "gitHead": "dfecb91b5b6a05db32d96f261e0c0ac6319240b9\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 != .Pointer) @compileError("require pointer type");
16
+ if (info != .pointer) @compileError("require pointer type");
17
17
  return @ptrCast(@alignCast(ptr));
18
18
  }
19
19
 
@@ -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 == .Int and info.Int.bits > 0 and info.Int.signedness == std.builtin.Signedness.unsigned)) {
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) {