@thi.ng/wasm-api 0.10.0 → 0.12.0
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 +77 -1
- package/README.md +248 -170
- package/api.d.ts +98 -14
- package/bin/wasm-api.mjs_ +17 -0
- package/bridge.d.ts +11 -1
- package/bridge.js +15 -10
- package/cli.js +51 -9
- package/codegen/c.d.ts +33 -0
- package/codegen/c.js +100 -0
- package/codegen/c11.d.ts +22 -0
- package/codegen/c11.js +125 -0
- package/codegen/typescript.d.ts +2 -12
- package/codegen/typescript.js +119 -88
- package/codegen/utils.d.ts +53 -4
- package/codegen/utils.js +63 -5
- package/codegen/zig.d.ts +2 -9
- package/codegen/zig.js +74 -29
- package/codegen.d.ts +1 -23
- package/codegen.js +35 -8
- package/include/wasmapi.h +34 -20
- package/include/wasmapi.zig +53 -46
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +32 -19
- package/pointer.d.ts +23 -0
- package/pointer.js +27 -0
- package/string.d.ts +96 -0
- package/string.js +145 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2022-
|
|
3
|
+
- **Last updated**: 2022-10-03T16:07:55Z
|
|
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.
|
|
@@ -9,6 +9,82 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
## [0.12.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.12.0) (2022-10-03)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- update CLI ([98d2414](https://github.com/thi-ng/umbrella/commit/98d2414))
|
|
17
|
+
- add optional type analytics JSON output
|
|
18
|
+
- add support for including user code via `@`-file references
|
|
19
|
+
- update config `@`-file refs to resolve relative to config file
|
|
20
|
+
- add support for sentinels & user type body injection ([d240046](https://github.com/thi-ng/umbrella/commit/d240046))
|
|
21
|
+
- update sizeOf() to include sentinels
|
|
22
|
+
- add TopLevelType.body for extra user code
|
|
23
|
+
- update Zig codegen to:
|
|
24
|
+
- support array/slice sentinels
|
|
25
|
+
- add optional user code injection
|
|
26
|
+
- add `std` import header
|
|
27
|
+
- add ReadonlyWasmString, update impls ([240a148](https://github.com/thi-ng/umbrella/commit/240a148))
|
|
28
|
+
- add default value support for Zig codegen ([3c37ae7](https://github.com/thi-ng/umbrella/commit/3c37ae7))
|
|
29
|
+
- add doc string word wrapping ([c0b8e15](https://github.com/thi-ng/umbrella/commit/c0b8e15))
|
|
30
|
+
- update prefixLines(), add target line width arg
|
|
31
|
+
- update ICodeGen & CodeGenOpts
|
|
32
|
+
- update all codegens
|
|
33
|
+
- update deps
|
|
34
|
+
|
|
35
|
+
#### 🩹 Bug fixes
|
|
36
|
+
|
|
37
|
+
- update zig panic handler sig for latest zig master version ([cb51bf6](https://github.com/thi-ng/umbrella/commit/cb51bf6))
|
|
38
|
+
- see https://github.com/ziglang/zig/commit/694fab484805088030fa36efe3e6b6e7ee385852
|
|
39
|
+
- minor fix word wrap line width ([053ba0f](https://github.com/thi-ng/umbrella/commit/053ba0f))
|
|
40
|
+
|
|
41
|
+
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.11.0) (2022-09-21)
|
|
42
|
+
|
|
43
|
+
#### 🚀 Features
|
|
44
|
+
|
|
45
|
+
- refactor CodeGenOpts, update CLI config handling ([fa2e30f](https://github.com/thi-ng/umbrella/commit/fa2e30f))
|
|
46
|
+
- extract CodeGenOptsBase interface for common pre/post config
|
|
47
|
+
- update CLI config loading to support loading pre/post contents
|
|
48
|
+
from separate files (if value given as `@path/to-file.ext`)
|
|
49
|
+
- update/fix codegens & config ([87def23](https://github.com/thi-ng/umbrella/commit/87def23))
|
|
50
|
+
- add global `CodeGenOpts.uppercaseEnums` option (migrate from TSOpts)
|
|
51
|
+
- set `i32` as enum default tag (for C compatibility)
|
|
52
|
+
- update C11 codegen, add `typePrefix` option
|
|
53
|
+
- fix C11 enum codegen (use `typedef enum`)
|
|
54
|
+
- add internal enumName() helper
|
|
55
|
+
- minor updates Zig codegen
|
|
56
|
+
- update codegen CLI ([435ad2b](https://github.com/thi-ng/umbrella/commit/435ad2b))
|
|
57
|
+
- add C11 support
|
|
58
|
+
- add support for padding fields (in `validateTypeRefs()`)
|
|
59
|
+
- add CLI arg for forcing string type impl
|
|
60
|
+
- update deps
|
|
61
|
+
- add C11 support, update codegens & config ([590311e](https://github.com/thi-ng/umbrella/commit/590311e))
|
|
62
|
+
- add preliminary C11 codegen
|
|
63
|
+
- add optional `tag` field for structs (extern/packed)
|
|
64
|
+
- add support for auto-labeled padding fields
|
|
65
|
+
- i.e. defined via unnamed fields with `pad` value
|
|
66
|
+
- move debug config option to global `CodeGenOpts`
|
|
67
|
+
- update TS codegen (array pointers) ([30360f2](https://github.com/thi-ng/umbrella/commit/30360f2))
|
|
68
|
+
- update CodeGenOpts ([b9fd7ff](https://github.com/thi-ng/umbrella/commit/b9fd7ff))
|
|
69
|
+
- major update codegens, string & pointer handling ([4f02295](https://github.com/thi-ng/umbrella/commit/4f02295))
|
|
70
|
+
- update/fix string wrappers (`WasmStringSlice/Ptr`)
|
|
71
|
+
- add generic `Pointer` wrapper
|
|
72
|
+
- add `const` field type support
|
|
73
|
+
- add applyIndents() formatter fn, simplify all codegens
|
|
74
|
+
- major update TS & Zig codegens
|
|
75
|
+
- WasmString codegen integration ([97fc318](https://github.com/thi-ng/umbrella/commit/97fc318))
|
|
76
|
+
- update TS codegen to wrap strings using new `WasmString` or `WasmStringPtr`
|
|
77
|
+
- update global codegen options handling, now passed to each codegen
|
|
78
|
+
- update TSOpts & ZigOpts to include custom pre/post
|
|
79
|
+
- add WasmString wrappers ([18d8fcb](https://github.com/thi-ng/umbrella/commit/18d8fcb))
|
|
80
|
+
- still unused (to be added to TS codegen)
|
|
81
|
+
- update core API & bindings ([b185ea5](https://github.com/thi-ng/umbrella/commit/b185ea5))
|
|
82
|
+
- add _panic(), timer(), epoch() core API fns
|
|
83
|
+
- update printI/U64() fns to accept bigint
|
|
84
|
+
- update C & Zig bindings
|
|
85
|
+
- update tests
|
|
86
|
+
- add clang-format
|
|
87
|
+
|
|
12
88
|
## [0.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.10.0) (2022-08-24)
|
|
13
89
|
|
|
14
90
|
#### 🚀 Features
|