@thi.ng/wasm-api 2.4.22 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
- <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
- # ![@thi.ng/wasm-api](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/banners/thing-wasm-api.svg?a4addfc6)
2
+ <!-- Please see: https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
+ # ![@thi.ng/wasm-api](https://codeberg.org/thi.ng/umbrella/media/branch/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)
@@ -8,11 +8,12 @@
8
8
 
9
9
  > [!NOTE]
10
10
  > This is one of 214 standalone projects, maintained as part
11
- > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
11
+ > of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
12
12
  > and anti-framework.
13
13
  >
14
- > 🚀 Please help me to work full-time on these projects by [sponsoring me on
15
- > GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
14
+ > 🚀 Please help me to work full-time on these projects by [sponsoring
15
+ > me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
16
+ > Thank you! ❤️
16
17
 
17
18
  - [About](#about)
18
19
  - [Polyglot bindings generator](#polyglot-bindings-generator)
@@ -44,7 +45,7 @@ Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAs
44
45
 
45
46
  | Quasiflock | Danza | S-TRACE | Voxelscape |
46
47
  |---------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
47
- | <a href="https://www.fxhash.xyz/generative/6671"><img src="https://github.com/thi-ng/umbrella/raw/develop/assets/fxhash/quasiflock-240.jpg"/></a> | <a href="https://mastodon.thi.ng/@toxi/tagged/DANZA"><img src="https://github.com/thi-ng/umbrella/raw/develop/assets/fxhash/danza-240.jpg"/></a> | <a href="https://mastodon.thi.ng/@toxi/tagged/STRACE"><img src="https://github.com/thi-ng/umbrella/raw/develop/assets/fxhash/s-trace-240.jpg"/></a> | <a href="https://twitter.com/search?q=from%3A%40toxi+voxel+ziglang"><img src="https://github.com/thi-ng/umbrella/raw/develop/assets/fxhash/voxelscape-240.jpg"/></a> |
48
+ | <a href="https://www.fxhash.xyz/generative/6671"><img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/fxhash/quasiflock-240.jpg"/></a> | <a href="https://mastodon.thi.ng/@toxi/tagged/DANZA"><img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/fxhash/danza-240.jpg"/></a> | <a href="https://mastodon.thi.ng/@toxi/tagged/STRACE"><img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/fxhash/s-trace-240.jpg"/></a> | <a href="https://twitter.com/search?q=from%3A%40toxi+voxel+ziglang"><img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/fxhash/voxelscape-240.jpg"/></a> |
48
49
 
49
50
  (Screenshots of selected projects made with Zig & TypeScript using the interop features provided by this package. Images link to respective project info)
50
51
 
@@ -60,16 +61,16 @@ JS/WebAssembly applications.
60
61
  3. A minimal core API for debug output, string/pointer/typedarray accessors for
61
62
  8/16/32/64 bit (u)ints and 32/64 bit floats. Additionally, a number of support
62
63
  modules for [DOM
63
- manipulation](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-dom/),
64
+ manipulation](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-dom/),
64
65
  [scheduled function
65
- execution](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-schedule/),
66
+ execution](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-schedule/),
66
67
  WebGL, WebGPU, WebAudio etc. is being actively worked on.
67
68
  4. Different types of memory-mapped (UTF-8) string abstractions (slice or pointer based)
68
69
  5. Shared (opt-in) memory allocation mechanism, also accessible from JS/TS side
69
70
  6. Include files for
70
- [Zig](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api/zig),
71
+ [Zig](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig),
71
72
  and
72
- [C/C++](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api/include)
73
+ [C/C++](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/include)
73
74
  defining glue code for the TypeScript [core
74
75
  API](https://docs.thi.ng/umbrella/wasm-api/interfaces/CoreAPI.html) defined
75
76
  by this package
@@ -79,13 +80,13 @@ WebGL, WebGPU, WebAudio etc. is being actively worked on.
79
80
  ## Polyglot bindings generator
80
81
 
81
82
  The toolkit includes an extensible [code
82
- generator](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-bindgen/)
83
+ generator](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-bindgen/)
83
84
  for shared datatypes and (currently) supports Zig & TypeScript and C11. For TS
84
85
  fully type checked and memory-mapped (mostly zero-copy) accessors of WASM-side
85
86
  data are generated. In principle, all languages with a WASM target are
86
87
  supported, however currently only bindings for the languages mentioned are
87
88
  included. The codegen also includes a [CLI
88
- frontend/utility](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-bindgen/README.md#cli-generator).
89
+ frontend/utility](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-bindgen/README.md#cli-generator).
89
90
 
90
91
  ## Custom API modules
91
92
 
@@ -95,7 +96,7 @@ can be extented via custom defined API modules. Such child modules will consist
95
96
  of a collection of JS/TS functions & variables, their related counterparts
96
97
  (import definitions) for the WASM target and (optionally) some shared data types
97
98
  ([bindings for which can be generated via
98
- thi.ng/wasm-api-bindgen](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-bindgen)).
99
+ thi.ng/wasm-api-bindgen](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-bindgen)).
99
100
 
100
101
  On the JS side, custom API extensions can be easily integrated and exposed via
101
102
  the [`IWasmAPI`
@@ -246,7 +247,7 @@ Furthermore, the package provides these string wrapper types:
246
247
  - [`WasmStringSlice`](https://docs.thi.ng/umbrella/wasm-api/classes/WasmStringSlice.html)
247
248
 
248
249
  Finally, see more information in the
249
- [@thi.ng/wasm-api-bindgen](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-bindgen/README.md#string-handling)
250
+ [@thi.ng/wasm-api-bindgen](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-bindgen/README.md#string-handling)
250
251
  package readme.
251
252
 
252
253
  ## Memory allocations
@@ -258,9 +259,9 @@ The actual allocator is implementation specific and suitable generic mechanisms
258
259
  are defined for both the included Zig & C bindings. Please see for further
259
260
  reference:
260
261
 
261
- - [`/zig/lib.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/lib.zig#L34-L68):
262
+ - [`/zig/lib.zig`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig/lib.zig#L34-L68):
262
263
  comments about WASM-side allocator handling in Zig
263
- - [`/include/wasmapi.h`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/include/wasmapi.h#L18-L28):
264
+ - [`/include/wasmapi.h`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/include/wasmapi.h#L18-L28):
264
265
  comments about WASM-side allocator handling in C/C++
265
266
  - [`WasmBridge.allocate()`](https://docs.thi.ng/umbrella/wasm-api/classes/WasmBridge.html#allocate):
266
267
  allocating memory from JS side
@@ -271,7 +272,7 @@ Note: The provided Zig library supports the idiomatic (Zig) pattern of working
271
272
  with multiple allocators in different parts of the application and supports
272
273
  dynamic assignments/swapping of the exposed allocator. See comments in source
273
274
  file and
274
- [tests](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api/test)
275
+ [tests](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/test)
275
276
  for more details...
276
277
 
277
278
  ```ts
@@ -300,8 +301,8 @@ try {
300
301
  ### API module auto-initialization
301
302
 
302
303
  The supplied child APIs
303
- ([wasm-api-dom](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-dom),
304
- [wasm-api-schedule](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-schedule)
304
+ ([wasm-api-dom](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-dom),
305
+ [wasm-api-schedule](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-schedule)
305
306
  etc.) use an auto-intialization hook related to the above `WASM_ALLOCATOR`
306
307
  mechanism: If that allocator is available, the WASM side of these modules will
307
308
  auto initialize and thus reduce boilerplate. However, if no such central
@@ -316,7 +317,7 @@ be managed manually in JS. For this purpose the [`ObjectIndex`
316
317
  class](https://docs.thi.ng/umbrella/wasm-api/classes/ObjectIndex.html) can be
317
318
  used by API modules to handle the indexing of different types of JS
318
319
  objects/values and their ID generation (incl. recycling of IDs, using
319
- [@thi.ng/idgen](https://github.com/thi-ng/umbrella/tree/develop/packages/idgen)).
320
+ [@thi.ng/idgen](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/idgen)).
320
321
  Using this approach, only the numeric IDs (handles) will then need to be
321
322
  exchanged with the WASM module...
322
323
 
@@ -365,12 +366,12 @@ canvases.delete(0);
365
366
  ```
366
367
 
367
368
  The supplied Zig core library also includes a
368
- [`ManagedIndex`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/managed-index.zig)
369
+ [`ManagedIndex`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig/managed-index.zig)
369
370
  for similar resource management on the Zig side of the application. For example,
370
371
  in the
371
- [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-dom/)
372
+ [@thi.ng/wasm-api-dom](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-dom/)
372
373
  &
373
- [@thi.ng/wasm-api-schedule](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-schedule/)
374
+ [@thi.ng/wasm-api-schedule](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-schedule/)
374
375
  packages this is used to manage Zig-side event listeners.
375
376
 
376
377
  ## Using the Zig build system
@@ -385,7 +386,7 @@ built-in build system is as simple as:
385
386
  versions, older Zig versions than
386
387
  [v0.15.1](https://ziglang.org/download/0.15.1/release-notes.html), are not
387
388
  actively supported anymore (however, [build files for older versions are still
388
- included](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig)).
389
+ included](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig)).
389
390
 
390
391
  Please see [bundled examples](#usage-examples) for more details...
391
392
 
@@ -420,27 +421,27 @@ pub fn build(b: *std.Build) void {
420
421
  All bundled example projects (see [list below](#usage-examples)) are being built
421
422
  via this script. **More details/options in the commented source code:**
422
423
 
423
- - [`/zig/build.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/build.zig)
424
+ - [`/zig/build.zig`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig/build.zig)
424
425
 
425
426
  ## Naming & structural conventions
426
427
 
427
428
  To avoid guesswork about the internals of any of the supplied WASM API modules,
428
429
  please also consult the information in
429
- [#368](https://github.com/thi-ng/umbrella/issues/368).
430
+ [#368](https://codeberg.org/thi.ng/umbrella/issues/368).
430
431
 
431
432
  ## Status
432
433
 
433
434
  **ALPHA** - bleeding edge / work-in-progress
434
435
 
435
- [Search or submit any issues for this package](https://github.com/thi-ng/umbrella/issues?q=%5Bwasm-api%5D+in%3Atitle)
436
+ [Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Bwasm-api%5D)
436
437
 
437
438
  ## Support packages
438
439
 
439
- - [@thi.ng/wasm-api-bindgen](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-bindgen) - Polyglot bindings code generators (TS/JS, Zig, C11) for hybrid WebAssembly projects
440
- - [@thi.ng/wasm-api-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-canvas) - HTML Canvas2D bridge API for hybrid TypeScript & WASM (Zig) applications
441
- - [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-dom) - Browser DOM bridge API for hybrid TypeScript & WASM (Zig) applications
442
- - [@thi.ng/wasm-api-schedule](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-schedule) - Delayed & scheduled function execution (via setTimeout() etc.) for hybrid WASM apps
443
- - [@thi.ng/wasm-api-webgl](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-webgl) - WebGL bridge API for hybrid TypeScript & WASM (Zig) applications
440
+ - [@thi.ng/wasm-api-bindgen](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-bindgen) - Polyglot bindings code generators (TS/JS, Zig, C11) for hybrid WebAssembly projects
441
+ - [@thi.ng/wasm-api-canvas](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-canvas) - HTML Canvas2D bridge API for hybrid TypeScript & WASM (Zig) applications
442
+ - [@thi.ng/wasm-api-dom](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-dom) - Browser DOM bridge API for hybrid TypeScript & WASM (Zig) applications
443
+ - [@thi.ng/wasm-api-schedule](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-schedule) - Delayed & scheduled function execution (via setTimeout() etc.) for hybrid WASM apps
444
+ - [@thi.ng/wasm-api-webgl](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api-webgl) - WebGL bridge API for hybrid TypeScript & WASM (Zig) applications
444
445
 
445
446
  ### Third party modules
446
447
 
@@ -466,33 +467,33 @@ Browser ESM import:
466
467
 
467
468
  [JSDelivr documentation](https://www.jsdelivr.com/)
468
469
 
469
- Package sizes (brotli'd, pre-treeshake): ESM: 3.13 KB
470
+ Package sizes (brotli'd, pre-treeshake): ESM: 3.15 KB
470
471
 
471
472
  ## Dependencies
472
473
 
473
- - [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api)
474
- - [@thi.ng/arrays](https://github.com/thi-ng/umbrella/tree/develop/packages/arrays)
475
- - [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/develop/packages/checks)
476
- - [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
477
- - [@thi.ng/hex](https://github.com/thi-ng/umbrella/tree/develop/packages/hex)
478
- - [@thi.ng/idgen](https://github.com/thi-ng/umbrella/tree/develop/packages/idgen)
479
- - [@thi.ng/logger](https://github.com/thi-ng/umbrella/tree/develop/packages/logger)
474
+ - [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)
475
+ - [@thi.ng/arrays](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/arrays)
476
+ - [@thi.ng/checks](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/checks)
477
+ - [@thi.ng/errors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/errors)
478
+ - [@thi.ng/hex](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hex)
479
+ - [@thi.ng/idgen](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/idgen)
480
+ - [@thi.ng/logger](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/logger)
480
481
 
481
482
  Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
482
483
 
483
484
  ## Usage examples
484
485
 
485
486
  Five projects in this repo's
486
- [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
487
+ [/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
487
488
  directory are using this package:
488
489
 
489
- | Screenshot | Description | Live demo | Source |
490
- |:---------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|:----------------------------------------------------|:---------------------------------------------------------------------------------|
491
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-canvas.png" width="240"/> | Zig-based DOM creation & canvas drawing app | [Demo](https://demo.thi.ng/umbrella/zig-canvas/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-canvas) |
492
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-cellular.jpg" width="240"/> | Zig-based 2D multi-behavior cellular automata | [Demo](https://demo.thi.ng/umbrella/zig-cellular/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-cellular) |
493
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-counter.png" width="240"/> | Simple Zig/WASM click counter DOM component | [Demo](https://demo.thi.ng/umbrella/zig-counter/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-counter) |
494
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-todo-list.png" width="240"/> | Zig-based To-Do list, DOM creation, local storage task persistence | [Demo](https://demo.thi.ng/umbrella/zig-todo-list/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-todo-list) |
495
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/zig-webgl.avif" width="240"/> | Basic Zig/WebAssembly WebGL demo | [Demo](https://demo.thi.ng/umbrella/zig-webgl/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-webgl) |
490
+ | Screenshot | Description | Live demo | Source |
491
+ |:---------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|:----------------------------------------------------|:-----------------------------------------------------------------------------------------|
492
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/zig-canvas.png" width="240"/> | Zig-based DOM creation & canvas drawing app | [Demo](https://demo.thi.ng/umbrella/zig-canvas/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/zig-canvas) |
493
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/zig-cellular.jpg" width="240"/> | Zig-based 2D multi-behavior cellular automata | [Demo](https://demo.thi.ng/umbrella/zig-cellular/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/zig-cellular) |
494
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/zig-counter.png" width="240"/> | Simple Zig/WASM click counter DOM component | [Demo](https://demo.thi.ng/umbrella/zig-counter/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/zig-counter) |
495
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/zig-todo-list.png" width="240"/> | Zig-based To-Do list, DOM creation, local storage task persistence | [Demo](https://demo.thi.ng/umbrella/zig-todo-list/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/zig-todo-list) |
496
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/zig-webgl.avif" width="240"/> | Basic Zig/WebAssembly WebGL demo | [Demo](https://demo.thi.ng/umbrella/zig-webgl/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/zig-webgl) |
496
497
 
497
498
  ## API
498
499
 
package/api.d.ts CHANGED
@@ -251,7 +251,7 @@ export interface IWasmMemoryAccess {
251
251
  *
252
252
  * @remarks
253
253
  * Zig API:
254
- * https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/lib.zig
254
+ * https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/wasm-api/zig/lib.zig
255
255
  */
256
256
  export interface CoreAPI extends WebAssembly.ModuleImports {
257
257
  printI8: Fn<number, void>;
package/bridge.js CHANGED
@@ -72,6 +72,7 @@ let WasmBridge = class {
72
72
  };
73
73
  this._buildModuleGraph(modules);
74
74
  }
75
+ logger;
75
76
  id = "wasmapi";
76
77
  i8;
77
78
  u8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api",
3
- "version": "2.4.22",
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",
@@ -8,7 +8,7 @@
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/thi-ng/umbrella.git",
11
+ "url": "git+https://codeberg.org/thi.ng/umbrella.git",
12
12
  "directory": "packages/wasm-api"
13
13
  },
14
14
  "homepage": "https://thi.ng/wasm-api",
@@ -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.17",
47
- "@thi.ng/arrays": "^2.14.13",
48
- "@thi.ng/checks": "^3.8.7",
49
- "@thi.ng/errors": "^2.6.6",
50
- "@thi.ng/hex": "^2.4.9",
51
- "@thi.ng/idgen": "^2.2.91",
52
- "@thi.ng/logger": "^3.3.0"
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.27.2",
56
- "typedoc": "^0.28.16",
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": "1107498d31504dc63d1a457b5def387d7a134f69\n"
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
  */