@thi.ng/wasm-api-schedule 0.3.84 → 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-20T14:42:45Z
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api-schedule",
3
- "version": "0.3.84",
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",
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@thi.ng/api": "^8.11.0",
41
- "@thi.ng/wasm-api": "^1.4.69"
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.69",
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": "8339d05ecc857e529c7325a9839c0063b89e728d\n"
99
+ "gitHead": "4e2bf6b12e35192e678b525fa699429370e357d3\n"
100
100
  }