@thi.ng/wasm-api 1.4.55 → 1.4.57

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**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-03-02T14:05:53Z
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.
package/README.md CHANGED
@@ -1,16 +1,5 @@
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
- > [!IMPORTANT]
4
- > ‼️ Announcing the thi.ng user survey 2024 📋
5
- >
6
- > [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
7
- > (open until end of February)
8
- >
9
- > **To achieve a better sample size, I'd highly appreciate if you could
10
- > circulate the link to this survey in your own networks.**
11
- >
12
- > [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
13
-
14
3
  # ![@thi.ng/wasm-api](https://media.thi.ng/umbrella/banners-20230807/thing-wasm-api.svg?be328da7)
15
4
 
16
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/wasm-api.svg)](https://www.npmjs.com/package/@thi.ng/wasm-api)
@@ -22,7 +11,7 @@
22
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
12
  > and anti-framework.
24
13
  >
25
- > 🚀 Help me to work full-time on these projects by [sponsoring me on
14
+ > 🚀 Please help me to work full-time on these projects by [sponsoring me on
26
15
  > GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
27
16
 
28
17
  - [About](#about)
@@ -139,11 +128,8 @@ export class CustomAPI implements IWasmAPI {
139
128
  };
140
129
  }
141
130
  }
142
- ```
143
-
144
- Now we can supply this custom API when creating the main WASM bridge:
145
131
 
146
- ```ts
132
+ // now we can supply this custom API when creating the main WASM bridge:
147
133
  export const bridge = new WasmBridge([new CustomAPI()]);
148
134
  ```
149
135
 
@@ -234,6 +220,8 @@ file and
234
220
  for more details...
235
221
 
236
222
  ```ts
223
+ // (see sections further below for bridge initialization...)
224
+
237
225
  try {
238
226
  // allocate 256 bytes of memory for passing a string to WASM side
239
227
  // the function returns a tuple of `[address, len]`
package/bridge.d.ts CHANGED
@@ -112,6 +112,8 @@ export declare class WasmBridge<T extends WasmExports = WasmExports> implements
112
112
  * The following creates a bridge with a fictional `custom` API module:
113
113
  *
114
114
  * ```ts
115
+ * import { WasmBridge } from "@thi.ng/wasm-api";
116
+ *
115
117
  * const bridge = new WasmBridge([new CustomAPI()]);
116
118
  *
117
119
  * // get combined imports object
package/bridge.js CHANGED
@@ -187,6 +187,8 @@ let WasmBridge = class {
187
187
  * The following creates a bridge with a fictional `custom` API module:
188
188
  *
189
189
  * ```ts
190
+ * import { WasmBridge } from "@thi.ng/wasm-api";
191
+ *
190
192
  * const bridge = new WasmBridge([new CustomAPI()]);
191
193
  *
192
194
  * // get combined imports object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api",
3
- "version": "1.4.55",
3
+ "version": "1.4.57",
4
4
  "description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,13 +36,13 @@
36
36
  "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"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.9.26",
40
- "@thi.ng/arrays": "^2.8.3",
41
- "@thi.ng/checks": "^3.5.0",
42
- "@thi.ng/errors": "^2.4.18",
43
- "@thi.ng/hex": "^2.3.37",
44
- "@thi.ng/idgen": "^2.2.29",
45
- "@thi.ng/logger": "^3.0.3"
39
+ "@thi.ng/api": "^8.9.27",
40
+ "@thi.ng/arrays": "^2.8.5",
41
+ "@thi.ng/checks": "^3.5.1",
42
+ "@thi.ng/errors": "^2.4.19",
43
+ "@thi.ng/hex": "^2.3.38",
44
+ "@thi.ng/idgen": "^2.2.31",
45
+ "@thi.ng/logger": "^3.0.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@microsoft/api-extractor": "^7.40.1",
@@ -115,5 +115,5 @@
115
115
  "status": "alpha",
116
116
  "year": 2022
117
117
  },
118
- "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
118
+ "gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
119
119
  }