@thi.ng/wasm-api-schedule 0.3.83 → 0.3.85

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-04-11T12:32:44Z
3
+ - **Last updated**: 2024-04-22T09:56:21Z
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
@@ -51,7 +51,7 @@ const schedule = @import("wasm-api-schedule");
51
51
  try schedule.init(customAllocator);
52
52
 
53
53
  // user callback function
54
- fn exampleCallback(raw: ?*anyopaque) void {
54
+ fn exampleCallback(raw: ?*anyopaque) callconv(.C) void {
55
55
  if (wasm.ptrCast(*u32, raw)) |state| {
56
56
  // do something ...
57
57
  }
@@ -72,6 +72,10 @@ const listenerID = try schedule.schedule(
72
72
  schedule.cancel(listenerID);
73
73
  ```
74
74
 
75
+ **IMPORTANT: In Zig v0.12+ all event handlers must explicitly specify
76
+ `callconv(.C)`** [See docs for more
77
+ reference](https://docs.thi.ng/umbrella/wasm-api-bindgen/interfaces/FuncPointer.html).
78
+
75
79
  Also see the
76
80
  [zig-counter](https://github.com/thi-ng/umbrella/blob/develop/examples/zig-counter/)
77
81
  and
@@ -99,10 +103,10 @@ import * as was from "@thi.ng/wasm-api-schedule";
99
103
  Browser ESM import:
100
104
 
101
105
  ```html
102
- <script type="module" src="https://cdn.skypack.dev/@thi.ng/wasm-api-schedule"></script>
106
+ <script type="module" src="https://esm.run/@thi.ng/wasm-api-schedule"></script>
103
107
  ```
104
108
 
105
- [Skypack documentation](https://docs.skypack.dev/)
109
+ [JSDelivr documentation](https://www.jsdelivr.com/)
106
110
 
107
111
  Package sizes (brotli'd, pre-treeshake): ESM: 491 bytes
108
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api-schedule",
3
- "version": "0.3.83",
3
+ "version": "0.3.85",
4
4
  "description": "Delayed & scheduled function execution (via setTimeout() etc.) for hybrid WASM apps",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,12 +37,12 @@
37
37
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.10.1",
41
- "@thi.ng/wasm-api": "^1.4.68"
40
+ "@thi.ng/api": "^8.11.0",
41
+ "@thi.ng/wasm-api": "^1.5.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.43.0",
45
- "@thi.ng/wasm-api-bindgen": "^0.4.68",
45
+ "@thi.ng/wasm-api-bindgen": "^0.5.0",
46
46
  "esbuild": "^0.20.2",
47
47
  "rimraf": "^5.0.5",
48
48
  "typedoc": "^0.25.12",
@@ -96,5 +96,5 @@
96
96
  "status": "alpha",
97
97
  "year": 2022
98
98
  },
99
- "gitHead": "18a0c063a7b33d790e5bc2486c106f45f663ac28\n"
99
+ "gitHead": "4e2bf6b12e35192e678b525fa699429370e357d3\n"
100
100
  }