@thi.ng/wasm-api-bindgen 1.2.61 → 1.2.64
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 +2 -2
- package/c11.js +3 -3
- package/package.json +17 -16
- package/typescript.js +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 214 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -882,7 +882,7 @@ For Node.js REPL:
|
|
|
882
882
|
const wab = await import("@thi.ng/wasm-api-bindgen");
|
|
883
883
|
```
|
|
884
884
|
|
|
885
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 6.
|
|
885
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 6.26 KB
|
|
886
886
|
|
|
887
887
|
## Dependencies
|
|
888
888
|
|
package/c11.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { topoSort } from "@thi.ng/arrays/topo-sort";
|
|
2
2
|
import { isString } from "@thi.ng/checks/is-string";
|
|
3
|
-
import {
|
|
3
|
+
import { unsupportedOp } from "@thi.ng/errors/unsupported";
|
|
4
4
|
import { capitalize } from "@thi.ng/strings/case";
|
|
5
5
|
import { classifyField } from "./internal/classify.js";
|
|
6
6
|
import {
|
|
@@ -92,7 +92,7 @@ typedef ${type.type} ${name} ${name};`);
|
|
|
92
92
|
},
|
|
93
93
|
enum: (e, _, acc, opts2) => {
|
|
94
94
|
if (!(e.tag === "i32" || e.tag === "u32")) {
|
|
95
|
-
|
|
95
|
+
unsupportedOp(
|
|
96
96
|
`enum ${e.name} must be a i32/u32 in C, but got '${e.tag}'`
|
|
97
97
|
);
|
|
98
98
|
}
|
|
@@ -270,7 +270,7 @@ const __fieldType = (f, coll, opts, prefix) => {
|
|
|
270
270
|
}
|
|
271
271
|
break;
|
|
272
272
|
case "vec":
|
|
273
|
-
|
|
273
|
+
unsupportedOp("C doesn't support vector");
|
|
274
274
|
default:
|
|
275
275
|
decl = `${type} ${f.name}`;
|
|
276
276
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/wasm-api-bindgen",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.64",
|
|
4
4
|
"description": "Polyglot bindings code generators (TS/JS, Zig, C11) for hybrid WebAssembly projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
|
+
"url": "git+https://github.com/thi-ng/umbrella.git",
|
|
13
|
+
"directory": "packages/wasm-api-bindgen"
|
|
13
14
|
},
|
|
14
15
|
"homepage": "https://thi.ng/wasm-api-bindgen",
|
|
15
16
|
"funding": [
|
|
@@ -41,19 +42,19 @@
|
|
|
41
42
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@thi.ng/api": "^8.12.
|
|
45
|
-
"@thi.ng/args": "^3.2.
|
|
46
|
-
"@thi.ng/arrays": "^2.14.
|
|
47
|
-
"@thi.ng/binary": "^3.6.
|
|
48
|
-
"@thi.ng/checks": "^3.8.
|
|
49
|
-
"@thi.ng/compare": "^2.
|
|
50
|
-
"@thi.ng/defmulti": "^3.0.
|
|
51
|
-
"@thi.ng/errors": "^2.6.
|
|
52
|
-
"@thi.ng/file-io": "^2.2.
|
|
53
|
-
"@thi.ng/logger": "^3.2.
|
|
54
|
-
"@thi.ng/paths": "^5.2.
|
|
55
|
-
"@thi.ng/strings": "^3.9.
|
|
56
|
-
"@thi.ng/wasm-api": "^2.4.
|
|
45
|
+
"@thi.ng/api": "^8.12.15",
|
|
46
|
+
"@thi.ng/args": "^3.2.10",
|
|
47
|
+
"@thi.ng/arrays": "^2.14.9",
|
|
48
|
+
"@thi.ng/binary": "^3.6.4",
|
|
49
|
+
"@thi.ng/checks": "^3.8.5",
|
|
50
|
+
"@thi.ng/compare": "^2.5.1",
|
|
51
|
+
"@thi.ng/defmulti": "^3.0.91",
|
|
52
|
+
"@thi.ng/errors": "^2.6.4",
|
|
53
|
+
"@thi.ng/file-io": "^2.2.25",
|
|
54
|
+
"@thi.ng/logger": "^3.2.14",
|
|
55
|
+
"@thi.ng/paths": "^5.2.34",
|
|
56
|
+
"@thi.ng/strings": "^3.9.36",
|
|
57
|
+
"@thi.ng/wasm-api": "^2.4.18"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@types/node": "^24.10.9",
|
|
@@ -128,5 +129,5 @@
|
|
|
128
129
|
"tag": "wasm",
|
|
129
130
|
"year": 2022
|
|
130
131
|
},
|
|
131
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "8f50352caab9ec7757d645c0afa605dfb5427abe\n"
|
|
132
133
|
}
|
package/typescript.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
TYPEDARRAY_CTORS
|
|
5
5
|
} from "@thi.ng/api/typedarray";
|
|
6
6
|
import { isString } from "@thi.ng/checks/is-string";
|
|
7
|
-
import {
|
|
7
|
+
import { unsupportedFeature } from "@thi.ng/errors/unsupported";
|
|
8
8
|
import { classifyField } from "./internal/classify.js";
|
|
9
9
|
import {
|
|
10
10
|
ensureLines,
|
|
@@ -362,7 +362,7 @@ const __generateField = (field, coll, opts) => {
|
|
|
362
362
|
case "pad":
|
|
363
363
|
return;
|
|
364
364
|
default:
|
|
365
|
-
|
|
365
|
+
unsupportedFeature(`TODO: ${classifier} - please report as issue`);
|
|
366
366
|
}
|
|
367
367
|
return {
|
|
368
368
|
field,
|