@thi.ng/wasm-api 0.18.0 → 1.0.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 +190 -102
- package/README.md +96 -468
- package/api.d.ts +24 -329
- package/api.js +0 -15
- package/bridge.d.ts +0 -31
- package/bridge.js +8 -33
- package/include/wasmapi.h +46 -42
- package/include/wasmapi_types.h +35 -0
- package/index.d.ts +0 -5
- package/index.js +0 -5
- package/package.json +15 -47
- package/pointer.d.ts +20 -0
- package/pointer.js +27 -0
- package/string.d.ts +48 -15
- package/string.js +67 -17
- package/zig/lib.zig +6 -31
- package/zig/types.zig +52 -0
- package/bin/wasm-api +0 -12
- package/bin/wasm-api.mjs_ +0 -17
- package/cli.d.ts +0 -5
- package/cli.js +0 -188
- package/codegen/align.d.ts +0 -14
- package/codegen/align.js +0 -35
- package/codegen/c.d.ts +0 -33
- package/codegen/c.js +0 -100
- package/codegen/c11.d.ts +0 -22
- package/codegen/c11.js +0 -145
- package/codegen/typescript.d.ts +0 -25
- package/codegen/typescript.js +0 -240
- package/codegen/utils.d.ts +0 -96
- package/codegen/utils.js +0 -120
- package/codegen/zig.d.ts +0 -23
- package/codegen/zig.js +0 -149
- package/codegen.d.ts +0 -32
- package/codegen.js +0 -198
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2022-
|
|
3
|
+
- **Last updated**: 2022-11-23T22:46:54Z
|
|
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,94 @@ 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
|
+
# [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@1.0.0) (2022-11-23)
|
|
13
|
+
|
|
14
|
+
#### 🛑 Breaking changes
|
|
15
|
+
|
|
16
|
+
- remove codegen parts ([188f56b](https://github.com/thi-ng/umbrella/commit/188f56b))
|
|
17
|
+
- BREAKING CHANGE: all codegen parts migrated to new pkg: [@thi.ng/wasm-api-bindgen](https://github.com/thi-ng/umbrella/tree/main/packages/wasm-api-bindgen)
|
|
18
|
+
- remove all obsolete types, deps & files
|
|
19
|
+
- see [2c02dc674](https://github.com/thi-ng/umbrella/commit/2c02dc674) for start of new pkg
|
|
20
|
+
|
|
21
|
+
#### 🚀 Features
|
|
22
|
+
|
|
23
|
+
- add hexdump methods ([95c91ed](https://github.com/thi-ng/umbrella/commit/95c91ed))
|
|
24
|
+
- add printHexdump()/hexdump()
|
|
25
|
+
- add/update printHexdump() ([65efaf4](https://github.com/thi-ng/umbrella/commit/65efaf4))
|
|
26
|
+
- migrate printHexdump() to WASM core API
|
|
27
|
+
- add WasmStringSlice.setAlloc() ([b0f6f9d](https://github.com/thi-ng/umbrella/commit/b0f6f9d))
|
|
28
|
+
- add function pointer & i/usize codegen support ([2e67bc5](https://github.com/thi-ng/umbrella/commit/2e67bc5))
|
|
29
|
+
- add FuncPointer top-level type for codegen
|
|
30
|
+
- add isize/usize type aliases
|
|
31
|
+
- extend/refactor all codegens
|
|
32
|
+
- update WasmTarget & presets
|
|
33
|
+
- add opaque pointer support ([83d4b94](https://github.com/thi-ng/umbrella/commit/83d4b94))
|
|
34
|
+
- add optional pointer support ([92a28e7](https://github.com/thi-ng/umbrella/commit/92a28e7))
|
|
35
|
+
- update ZIG codegen
|
|
36
|
+
- add codegen IDs, conditionally skip code generation ([7146cae](https://github.com/thi-ng/umbrella/commit/7146cae))
|
|
37
|
+
- add ICodeGen.id & update codegens
|
|
38
|
+
- add TopLevelType.skip option to suppress generation for some langs
|
|
39
|
+
- update generateTypes()
|
|
40
|
+
- update & rename pkg (formerly wasm-api-timer) ([668f3dd](https://github.com/thi-ng/umbrella/commit/668f3dd))
|
|
41
|
+
- rename types form `TimerXXX` => `ScheduleXXX`
|
|
42
|
+
- add WASM auto-initializer hook
|
|
43
|
+
- update readmes
|
|
44
|
+
- update string handling & default string type ([86dee41](https://github.com/thi-ng/umbrella/commit/86dee41))
|
|
45
|
+
- update WasmStringSlice & WasmStringPtr
|
|
46
|
+
- update .setAlloc() impls
|
|
47
|
+
- update Zig code gen to use `[:0]const u8` as default string format
|
|
48
|
+
for easier interop and compatibility w/ `extern struct`s
|
|
49
|
+
- update generated types & string handling ([686f867](https://github.com/thi-ng/umbrella/commit/686f867))
|
|
50
|
+
- switch to extern structs for generated types
|
|
51
|
+
- switch to zero-terminated pointers for string values
|
|
52
|
+
- update/rename/simplify API methods, remove obsolete
|
|
53
|
+
- fix string attrib handling/alloc sizes
|
|
54
|
+
- add JSON schema for codegen typedefs ([1291c5c](https://github.com/thi-ng/umbrella/commit/1291c5c))
|
|
55
|
+
- switch to `extern struct/union` only, add slice polyfills ([ca65edc](https://github.com/thi-ng/umbrella/commit/ca65edc))
|
|
56
|
+
- [zig] emit only `extern` structs/unions
|
|
57
|
+
- [zig] remove (somewhat obsolete) support for packed structs/unions (KISS)
|
|
58
|
+
- remove `.tag` option from `Struct`/`Union`
|
|
59
|
+
- [zig/c] update codegens preludes
|
|
60
|
+
- add declarations of `XXSlice`/`XXMutSlice` type aliases
|
|
61
|
+
- rename `Field.tag`: `scalar` => `single`
|
|
62
|
+
- [ts] add `Field.skip` to suppress codegen for individual fields
|
|
63
|
+
- update JSON schema
|
|
64
|
+
- set default `string` impl to `ptr` (previously `slice`)
|
|
65
|
+
- add internal `clasifyField()` helper to simplify conditionals in codegens
|
|
66
|
+
- add/update various internal type predicates
|
|
67
|
+
- update CodeGenOpts.pre/post to support string arrays
|
|
68
|
+
- use new backend in all codegens ([33fc814](https://github.com/thi-ng/umbrella/commit/33fc814))
|
|
69
|
+
- update slice handling using auto-generated wrapper structs
|
|
70
|
+
- add support for multi-item pointers
|
|
71
|
+
- add support for enum pointers/arrays/slices
|
|
72
|
+
- add slice types to wasmapi.h & types.zig
|
|
73
|
+
- add more cases to FieldClass
|
|
74
|
+
- update classifyField()
|
|
75
|
+
- update all codegens to use new classifier based code templates
|
|
76
|
+
- add/update codegen tests/fixtures
|
|
77
|
+
- add Pointer64 (still unused) ([f1eef25](https://github.com/thi-ng/umbrella/commit/f1eef25))
|
|
78
|
+
|
|
79
|
+
#### 🩹 Bug fixes
|
|
80
|
+
|
|
81
|
+
- update CLI type checks ([1d4cc59](https://github.com/thi-ng/umbrella/commit/1d4cc59))
|
|
82
|
+
- re-add missing optional type `?` prefix [zig] ([3e3b4cd](https://github.com/thi-ng/umbrella/commit/3e3b4cd))
|
|
83
|
+
- fix user code handling in TS codegen prelude ([c435caa](https://github.com/thi-ng/umbrella/commit/c435caa))
|
|
84
|
+
|
|
85
|
+
#### ♻️ Refactoring
|
|
86
|
+
|
|
87
|
+
- update WasmStringSlice.setSlice() ([f278cfd](https://github.com/thi-ng/umbrella/commit/f278cfd))
|
|
88
|
+
- rename _printStr0() => printStrZ() ([666546c](https://github.com/thi-ng/umbrella/commit/666546c))
|
|
89
|
+
- update/extract C types & core API ([9eb827e](https://github.com/thi-ng/umbrella/commit/9eb827e))
|
|
90
|
+
- migrate JSON schema, update readme & pkg ([a6d9c3a](https://github.com/thi-ng/umbrella/commit/a6d9c3a))
|
|
91
|
+
|
|
92
|
+
### [0.18.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.18.1) (2022-11-01)
|
|
93
|
+
|
|
94
|
+
#### 🩹 Bug fixes
|
|
95
|
+
|
|
96
|
+
- fix TS code gen array mem mapping ([a0e7132](https://github.com/thi-ng/umbrella/commit/a0e7132))
|
|
97
|
+
- use correct type size for array mem mapping
|
|
98
|
+
- update test fixtures
|
|
99
|
+
|
|
12
100
|
## [0.18.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.18.0) (2022-10-31)
|
|
13
101
|
|
|
14
102
|
#### 🚀 Features
|
|
@@ -55,21 +143,21 @@ and/or version bumps of transitive dependencies.
|
|
|
55
143
|
|
|
56
144
|
#### 🚀 Features
|
|
57
145
|
|
|
58
|
-
- update TS docstring generator ([5a060b6](https://github.com/thi-ng/umbrella/commit/5a060b6))
|
|
59
|
-
- include native/WASM type in docstring (use Zig type sigs)
|
|
60
|
-
- update ensureLines() helper
|
|
61
|
-
- update test fixtures
|
|
62
|
-
- update IWasmMemoryAccess & impls ([bb8a3ca](https://github.com/thi-ng/umbrella/commit/bb8a3ca))
|
|
63
|
-
- add MemorySlice tuple to describe a memory region
|
|
64
|
-
- update allocate() & free() to use MemorySlice, migrate to IWasmMemoryAccess
|
|
65
|
-
- migrate growMemory() to IWasmMemoryAccess
|
|
66
|
-
- add MemorySlice to default imports in TS codegen
|
|
67
146
|
- update docstring & user code codegen config ([68694ba](https://github.com/thi-ng/umbrella/commit/68694ba))
|
|
68
147
|
- allow doc strings & user codes to be given as string array (lines)
|
|
69
148
|
- add InjectedBody type to support multiple injection sites
|
|
70
149
|
(e.g. TS interface declarations vs. wrapper impls)
|
|
71
150
|
- update TS & Zig codegens
|
|
72
151
|
- add internal ensureLines() helper
|
|
152
|
+
- update IWasmMemoryAccess & impls ([bb8a3ca](https://github.com/thi-ng/umbrella/commit/bb8a3ca))
|
|
153
|
+
- add MemorySlice tuple to describe a memory region
|
|
154
|
+
- update allocate() & free() to use MemorySlice, migrate to IWasmMemoryAccess
|
|
155
|
+
- migrate growMemory() to IWasmMemoryAccess
|
|
156
|
+
- add MemorySlice to default imports in TS codegen
|
|
157
|
+
- update TS docstring generator ([5a060b6](https://github.com/thi-ng/umbrella/commit/5a060b6))
|
|
158
|
+
- include native/WASM type in docstring (use Zig type sigs)
|
|
159
|
+
- update ensureLines() helper
|
|
160
|
+
- update test fixtures
|
|
73
161
|
|
|
74
162
|
#### 🩹 Bug fixes
|
|
75
163
|
|
|
@@ -79,56 +167,56 @@ and/or version bumps of transitive dependencies.
|
|
|
79
167
|
|
|
80
168
|
#### 🚀 Features
|
|
81
169
|
|
|
82
|
-
-
|
|
83
|
-
- migrate ManagedIndex from [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/main/packages/wasm-api-dom)
|
|
84
|
-
- move all Zig sources from /include => /zig
|
|
85
|
-
- update pkg
|
|
86
|
-
- add codegen support for union types ([bbc1f98](https://github.com/thi-ng/umbrella/commit/bbc1f98))
|
|
87
|
-
- add Union type, update TopLevelType
|
|
88
|
-
- update all codegens (C,TS,Zig)
|
|
89
|
-
- update alignOf(), sizeOf()
|
|
90
|
-
- update selectAlignment()
|
|
170
|
+
- add WasmTarget codegen opt & usize support ([62c049b](https://github.com/thi-ng/umbrella/commit/62c049b))
|
|
91
171
|
- add/update codegen alignment logic ([9c19ad9](https://github.com/thi-ng/umbrella/commit/9c19ad9))
|
|
92
172
|
- add AlignmentStrategy & impls
|
|
93
173
|
- update alignOf(), sizeOf(), prepareType()
|
|
94
174
|
- extract DEFAULT_CODEGEN_OPTS
|
|
95
175
|
- add Struct.align config option
|
|
96
|
-
- add
|
|
176
|
+
- add codegen support for union types ([bbc1f98](https://github.com/thi-ng/umbrella/commit/bbc1f98))
|
|
177
|
+
- add Union type, update TopLevelType
|
|
178
|
+
- update all codegens (C,TS,Zig)
|
|
179
|
+
- update alignOf(), sizeOf()
|
|
180
|
+
- update selectAlignment()
|
|
181
|
+
- import ManagedIndex, migrate Zig API ([d8bb3ee](https://github.com/thi-ng/umbrella/commit/d8bb3ee))
|
|
182
|
+
- migrate ManagedIndex from [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/main/packages/wasm-api-dom)
|
|
183
|
+
- move all Zig sources from /include => /zig
|
|
184
|
+
- update pkg
|
|
97
185
|
|
|
98
186
|
#### 🩹 Bug fixes
|
|
99
187
|
|
|
100
|
-
- update CLI wrapper to allow unions ([904716c](https://github.com/thi-ng/umbrella/commit/904716c))
|
|
101
|
-
- fix i64/u64 handling in sizeof() ([825add3](https://github.com/thi-ng/umbrella/commit/825add3))
|
|
102
188
|
- fix padding in Zig packed structs ([8d70cf6](https://github.com/thi-ng/umbrella/commit/8d70cf6))
|
|
103
189
|
- since packed structs can't contain `[n]u8` types,
|
|
104
190
|
generate padding as potentially multiple `uXXX` fields
|
|
191
|
+
- fix i64/u64 handling in sizeof() ([825add3](https://github.com/thi-ng/umbrella/commit/825add3))
|
|
192
|
+
- update CLI wrapper to allow unions ([904716c](https://github.com/thi-ng/umbrella/commit/904716c))
|
|
105
193
|
|
|
106
194
|
#### ♻️ Refactoring
|
|
107
195
|
|
|
196
|
+
- minor updates C & Zig codegens ([a94e1cc](https://github.com/thi-ng/umbrella/commit/a94e1cc))
|
|
108
197
|
- rename types, use predicates ([4148e1e](https://github.com/thi-ng/umbrella/commit/4148e1e))
|
|
109
198
|
- rename StructField => Field
|
|
110
199
|
- update codegens to use more predicates instead of inline checks
|
|
111
|
-
- minor updates C & Zig codegens ([a94e1cc](https://github.com/thi-ng/umbrella/commit/a94e1cc))
|
|
112
200
|
|
|
113
201
|
## [0.14.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.14.0) (2022-10-17)
|
|
114
202
|
|
|
115
203
|
#### 🚀 Features
|
|
116
204
|
|
|
117
|
-
- add ptrCast() zig helper ([72a9406](https://github.com/thi-ng/umbrella/commit/72a9406))
|
|
118
|
-
- add Zig Slice & String wrappers ([28d057e](https://github.com/thi-ng/umbrella/commit/28d057e))
|
|
119
|
-
- allows expressing & converting slices for `extern struct`s
|
|
120
|
-
- ensure memory in WasmStringSlice/Ptr ([c55c6f0](https://github.com/thi-ng/umbrella/commit/c55c6f0))
|
|
121
205
|
- update IWasmMemoryAccess ([28bfff6](https://github.com/thi-ng/umbrella/commit/28bfff6))
|
|
122
206
|
- add IWasmMemoryAccess.ensureMemory()
|
|
123
207
|
- update WasmBridge.setString() to ensure memory
|
|
208
|
+
- ensure memory in WasmStringSlice/Ptr ([c55c6f0](https://github.com/thi-ng/umbrella/commit/c55c6f0))
|
|
209
|
+
- add Zig Slice & String wrappers ([28d057e](https://github.com/thi-ng/umbrella/commit/28d057e))
|
|
210
|
+
- allows expressing & converting slices for `extern struct`s
|
|
211
|
+
- add ptrCast() zig helper ([72a9406](https://github.com/thi-ng/umbrella/commit/72a9406))
|
|
124
212
|
|
|
125
213
|
## [0.13.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.13.0) (2022-10-04)
|
|
126
214
|
|
|
127
215
|
#### 🚀 Features
|
|
128
216
|
|
|
217
|
+
- add WasmStringSlice.setSlice() ([50cc798](https://github.com/thi-ng/umbrella/commit/50cc798))
|
|
129
218
|
- update C11 code gen ([ff8037f](https://github.com/thi-ng/umbrella/commit/ff8037f))
|
|
130
219
|
- add `#ifdef __cplusplus` guards to pre/post
|
|
131
|
-
- add WasmStringSlice.setSlice() ([50cc798](https://github.com/thi-ng/umbrella/commit/50cc798))
|
|
132
220
|
|
|
133
221
|
#### ⏱ Performance improvements
|
|
134
222
|
|
|
@@ -138,10 +226,13 @@ and/or version bumps of transitive dependencies.
|
|
|
138
226
|
|
|
139
227
|
#### 🚀 Features
|
|
140
228
|
|
|
141
|
-
-
|
|
142
|
-
- add
|
|
143
|
-
-
|
|
144
|
-
- update
|
|
229
|
+
- add doc string word wrapping ([c0b8e15](https://github.com/thi-ng/umbrella/commit/c0b8e15))
|
|
230
|
+
- update prefixLines(), add target line width arg
|
|
231
|
+
- update ICodeGen & CodeGenOpts
|
|
232
|
+
- update all codegens
|
|
233
|
+
- update deps
|
|
234
|
+
- add default value support for Zig codegen ([3c37ae7](https://github.com/thi-ng/umbrella/commit/3c37ae7))
|
|
235
|
+
- add ReadonlyWasmString, update impls ([240a148](https://github.com/thi-ng/umbrella/commit/240a148))
|
|
145
236
|
- add support for sentinels & user type body injection ([d240046](https://github.com/thi-ng/umbrella/commit/d240046))
|
|
146
237
|
- update sizeOf() to include sentinels
|
|
147
238
|
- add TopLevelType.body for extra user code
|
|
@@ -149,28 +240,52 @@ and/or version bumps of transitive dependencies.
|
|
|
149
240
|
- support array/slice sentinels
|
|
150
241
|
- add optional user code injection
|
|
151
242
|
- add `std` import header
|
|
152
|
-
-
|
|
153
|
-
- add
|
|
154
|
-
- add
|
|
155
|
-
- update
|
|
156
|
-
- update ICodeGen & CodeGenOpts
|
|
157
|
-
- update all codegens
|
|
158
|
-
- update deps
|
|
243
|
+
- update CLI ([98d2414](https://github.com/thi-ng/umbrella/commit/98d2414))
|
|
244
|
+
- add optional type analytics JSON output
|
|
245
|
+
- add support for including user code via `@`-file references
|
|
246
|
+
- update config `@`-file refs to resolve relative to config file
|
|
159
247
|
|
|
160
248
|
#### 🩹 Bug fixes
|
|
161
249
|
|
|
250
|
+
- minor fix word wrap line width ([053ba0f](https://github.com/thi-ng/umbrella/commit/053ba0f))
|
|
162
251
|
- update zig panic handler sig for latest zig master version ([cb51bf6](https://github.com/thi-ng/umbrella/commit/cb51bf6))
|
|
163
252
|
- see https://github.com/ziglang/zig/commit/694fab484805088030fa36efe3e6b6e7ee385852
|
|
164
|
-
- minor fix word wrap line width ([053ba0f](https://github.com/thi-ng/umbrella/commit/053ba0f))
|
|
165
253
|
|
|
166
254
|
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.11.0) (2022-09-21)
|
|
167
255
|
|
|
168
256
|
#### 🚀 Features
|
|
169
257
|
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
- update
|
|
173
|
-
|
|
258
|
+
- update core API & bindings ([b185ea5](https://github.com/thi-ng/umbrella/commit/b185ea5))
|
|
259
|
+
- add _panic(), timer(), epoch() core API fns
|
|
260
|
+
- update printI/U64() fns to accept bigint
|
|
261
|
+
- update C & Zig bindings
|
|
262
|
+
- update tests
|
|
263
|
+
- add clang-format
|
|
264
|
+
- add WasmString wrappers ([18d8fcb](https://github.com/thi-ng/umbrella/commit/18d8fcb))
|
|
265
|
+
- still unused (to be added to TS codegen)
|
|
266
|
+
- WasmString codegen integration ([97fc318](https://github.com/thi-ng/umbrella/commit/97fc318))
|
|
267
|
+
- update TS codegen to wrap strings using new `WasmString` or `WasmStringPtr`
|
|
268
|
+
- update global codegen options handling, now passed to each codegen
|
|
269
|
+
- update TSOpts & ZigOpts to include custom pre/post
|
|
270
|
+
- major update codegens, string & pointer handling ([4f02295](https://github.com/thi-ng/umbrella/commit/4f02295))
|
|
271
|
+
- update/fix string wrappers (`WasmStringSlice/Ptr`)
|
|
272
|
+
- add generic `Pointer` wrapper
|
|
273
|
+
- add `const` field type support
|
|
274
|
+
- add applyIndents() formatter fn, simplify all codegens
|
|
275
|
+
- major update TS & Zig codegens
|
|
276
|
+
- update CodeGenOpts ([b9fd7ff](https://github.com/thi-ng/umbrella/commit/b9fd7ff))
|
|
277
|
+
- update TS codegen (array pointers) ([30360f2](https://github.com/thi-ng/umbrella/commit/30360f2))
|
|
278
|
+
- add C11 support, update codegens & config ([590311e](https://github.com/thi-ng/umbrella/commit/590311e))
|
|
279
|
+
- add preliminary C11 codegen
|
|
280
|
+
- add optional `tag` field for structs (extern/packed)
|
|
281
|
+
- add support for auto-labeled padding fields
|
|
282
|
+
- i.e. defined via unnamed fields with `pad` value
|
|
283
|
+
- move debug config option to global `CodeGenOpts`
|
|
284
|
+
- update codegen CLI ([435ad2b](https://github.com/thi-ng/umbrella/commit/435ad2b))
|
|
285
|
+
- add C11 support
|
|
286
|
+
- add support for padding fields (in `validateTypeRefs()`)
|
|
287
|
+
- add CLI arg for forcing string type impl
|
|
288
|
+
- update deps
|
|
174
289
|
- update/fix codegens & config ([87def23](https://github.com/thi-ng/umbrella/commit/87def23))
|
|
175
290
|
- add global `CodeGenOpts.uppercaseEnums` option (migrate from TSOpts)
|
|
176
291
|
- set `i32` as enum default tag (for C compatibility)
|
|
@@ -178,37 +293,10 @@ and/or version bumps of transitive dependencies.
|
|
|
178
293
|
- fix C11 enum codegen (use `typedef enum`)
|
|
179
294
|
- add internal enumName() helper
|
|
180
295
|
- minor updates Zig codegen
|
|
181
|
-
- update
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
- update deps
|
|
186
|
-
- add C11 support, update codegens & config ([590311e](https://github.com/thi-ng/umbrella/commit/590311e))
|
|
187
|
-
- add preliminary C11 codegen
|
|
188
|
-
- add optional `tag` field for structs (extern/packed)
|
|
189
|
-
- add support for auto-labeled padding fields
|
|
190
|
-
- i.e. defined via unnamed fields with `pad` value
|
|
191
|
-
- move debug config option to global `CodeGenOpts`
|
|
192
|
-
- update TS codegen (array pointers) ([30360f2](https://github.com/thi-ng/umbrella/commit/30360f2))
|
|
193
|
-
- update CodeGenOpts ([b9fd7ff](https://github.com/thi-ng/umbrella/commit/b9fd7ff))
|
|
194
|
-
- major update codegens, string & pointer handling ([4f02295](https://github.com/thi-ng/umbrella/commit/4f02295))
|
|
195
|
-
- update/fix string wrappers (`WasmStringSlice/Ptr`)
|
|
196
|
-
- add generic `Pointer` wrapper
|
|
197
|
-
- add `const` field type support
|
|
198
|
-
- add applyIndents() formatter fn, simplify all codegens
|
|
199
|
-
- major update TS & Zig codegens
|
|
200
|
-
- WasmString codegen integration ([97fc318](https://github.com/thi-ng/umbrella/commit/97fc318))
|
|
201
|
-
- update TS codegen to wrap strings using new `WasmString` or `WasmStringPtr`
|
|
202
|
-
- update global codegen options handling, now passed to each codegen
|
|
203
|
-
- update TSOpts & ZigOpts to include custom pre/post
|
|
204
|
-
- add WasmString wrappers ([18d8fcb](https://github.com/thi-ng/umbrella/commit/18d8fcb))
|
|
205
|
-
- still unused (to be added to TS codegen)
|
|
206
|
-
- update core API & bindings ([b185ea5](https://github.com/thi-ng/umbrella/commit/b185ea5))
|
|
207
|
-
- add _panic(), timer(), epoch() core API fns
|
|
208
|
-
- update printI/U64() fns to accept bigint
|
|
209
|
-
- update C & Zig bindings
|
|
210
|
-
- update tests
|
|
211
|
-
- add clang-format
|
|
296
|
+
- refactor CodeGenOpts, update CLI config handling ([fa2e30f](https://github.com/thi-ng/umbrella/commit/fa2e30f))
|
|
297
|
+
- extract CodeGenOptsBase interface for common pre/post config
|
|
298
|
+
- update CLI config loading to support loading pre/post contents
|
|
299
|
+
from separate files (if value given as `@path/to-file.ext`)
|
|
212
300
|
|
|
213
301
|
## [0.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.10.0) (2022-08-24)
|
|
214
302
|
|
|
@@ -248,25 +336,32 @@ and/or version bumps of transitive dependencies.
|
|
|
248
336
|
|
|
249
337
|
#### 🚀 Features
|
|
250
338
|
|
|
251
|
-
-
|
|
339
|
+
- update helper predicates ([65b23d4](https://github.com/thi-ng/umbrella/commit/65b23d4))
|
|
252
340
|
- update TSOpts & TS codegen ([4f6bbbf](https://github.com/thi-ng/umbrella/commit/4f6bbbf))
|
|
253
341
|
- add `uppercaseEnum` option to force UC enum IDs
|
|
254
|
-
-
|
|
342
|
+
- add CLI wrapper for codegens ([683a560](https://github.com/thi-ng/umbrella/commit/683a560))
|
|
255
343
|
|
|
256
344
|
#### 🩹 Bug fixes
|
|
257
345
|
|
|
258
|
-
- allow signed ints for enum tags ([78d0822](https://github.com/thi-ng/umbrella/commit/78d0822))
|
|
259
346
|
- correct TS __mapArray codegen ([289b137](https://github.com/thi-ng/umbrella/commit/289b137))
|
|
347
|
+
- allow signed ints for enum tags ([78d0822](https://github.com/thi-ng/umbrella/commit/78d0822))
|
|
260
348
|
|
|
261
349
|
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.6.0) (2022-08-15)
|
|
262
350
|
|
|
263
351
|
#### 🚀 Features
|
|
264
352
|
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
269
|
-
- update
|
|
353
|
+
- update allocate/free() fns, update Zig core API ([8a55989](https://github.com/thi-ng/umbrella/commit/8a55989))
|
|
354
|
+
- add _wasm_free() Zig impl
|
|
355
|
+
- add printFmt() Zig fn
|
|
356
|
+
- update WasmBridge.allocate() (add clear option)
|
|
357
|
+
- update WasmBridge.free()
|
|
358
|
+
- ensure memory in WasmBridge.getString()
|
|
359
|
+
- add/update docstrings
|
|
360
|
+
- add bindings code generator framework ([17ee06f](https://github.com/thi-ng/umbrella/commit/17ee06f))
|
|
361
|
+
- add/update deps
|
|
362
|
+
- add preliminary codegens for Zig & TS
|
|
363
|
+
- add supporting types & utils
|
|
364
|
+
- add generateTypes() codegen facade fn
|
|
270
365
|
- update codegens, add opts, fix alignments ([5c1fec5](https://github.com/thi-ng/umbrella/commit/5c1fec5))
|
|
271
366
|
- add global CodeGenOpts
|
|
272
367
|
- update generateTypes() to consider new opts
|
|
@@ -275,18 +370,11 @@ and/or version bumps of transitive dependencies.
|
|
|
275
370
|
- simplify TS codegen
|
|
276
371
|
- fix sizeOf() for struct fields
|
|
277
372
|
- make prepareType() idempotent
|
|
278
|
-
- add
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
- update allocate/free() fns, update Zig core API ([8a55989](https://github.com/thi-ng/umbrella/commit/8a55989))
|
|
284
|
-
- add _wasm_free() Zig impl
|
|
285
|
-
- add printFmt() Zig fn
|
|
286
|
-
- update WasmBridge.allocate() (add clear option)
|
|
287
|
-
- update WasmBridge.free()
|
|
288
|
-
- ensure memory in WasmBridge.getString()
|
|
289
|
-
- add/update docstrings
|
|
373
|
+
- add C11 header/include file, update WasmBridge ([a67dc00](https://github.com/thi-ng/umbrella/commit/a67dc00))
|
|
374
|
+
- migrate headers/includes to /include
|
|
375
|
+
- rename "core" import section => "wasmapi"
|
|
376
|
+
- rename WasmBridge.core => WasmBridge.api
|
|
377
|
+
- update pkg file
|
|
290
378
|
|
|
291
379
|
#### ♻️ Refactoring
|
|
292
380
|
|
|
@@ -316,29 +404,29 @@ and/or version bumps of transitive dependencies.
|
|
|
316
404
|
|
|
317
405
|
#### 🚀 Features
|
|
318
406
|
|
|
319
|
-
- add i64/u64 support/accessors ([768c8bd](https://github.com/thi-ng/umbrella/commit/768c8bd))
|
|
320
|
-
- add WasmBridge.instantiate, add/update accessors ([0698bae](https://github.com/thi-ng/umbrella/commit/0698bae))
|
|
321
|
-
- add WasmBridge.instantiate() boilerplate
|
|
322
|
-
- add setters for typed scalars & arrays
|
|
323
|
-
- rename derefXX() => getXX() getters
|
|
324
|
-
- update tests
|
|
325
407
|
- major update WasmBridge, add types ([47aa222](https://github.com/thi-ng/umbrella/commit/47aa222))
|
|
326
408
|
- add WasmExports base interface
|
|
327
409
|
- add generics for WasmBridge & IWasmAPI
|
|
328
410
|
- update WasmBridge.init() arg (full WASM exports, not just mem)
|
|
329
411
|
- add WasmBridge.exports field to store WASM module exports
|
|
330
412
|
- add naming conflict check in WasmBridge.getImports()
|
|
413
|
+
- add WasmBridge.instantiate, add/update accessors ([0698bae](https://github.com/thi-ng/umbrella/commit/0698bae))
|
|
414
|
+
- add WasmBridge.instantiate() boilerplate
|
|
415
|
+
- add setters for typed scalars & arrays
|
|
416
|
+
- rename derefXX() => getXX() getters
|
|
417
|
+
- update tests
|
|
418
|
+
- add i64/u64 support/accessors ([768c8bd](https://github.com/thi-ng/umbrella/commit/768c8bd))
|
|
331
419
|
|
|
332
420
|
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.2.0) (2022-08-01)
|
|
333
421
|
|
|
334
422
|
#### 🚀 Features
|
|
335
423
|
|
|
424
|
+
- fix zig slice pointer handling, use named child modules ([bd7905a](https://github.com/thi-ng/umbrella/commit/bd7905a))
|
|
336
425
|
- major update ObjectIndex ([4547f1f](https://github.com/thi-ng/umbrella/commit/4547f1f))
|
|
337
426
|
- add ObjectIndexOpts ctor options
|
|
338
427
|
- add IDGen for internal ID generation/recycling
|
|
339
428
|
- add iterators
|
|
340
429
|
- rename existing methods
|
|
341
|
-
- fix zig slice pointer handling, use named child modules ([bd7905a](https://github.com/thi-ng/umbrella/commit/bd7905a))
|
|
342
430
|
|
|
343
431
|
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.1.0) (2022-08-01)
|
|
344
432
|
|