@thi.ng/wasm-api 0.18.1 → 1.0.1
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 +182 -102
- package/README.md +166 -601
- 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 +44 -42
- 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 +3 -31
- 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 -244
- 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-11-
|
|
3
|
+
- **Last updated**: 2022-11-24T12:23:48Z
|
|
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,86 @@ 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
|
+
|
|
12
92
|
### [0.18.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.18.1) (2022-11-01)
|
|
13
93
|
|
|
14
94
|
#### 🩹 Bug fixes
|
|
@@ -63,21 +143,21 @@ and/or version bumps of transitive dependencies.
|
|
|
63
143
|
|
|
64
144
|
#### 🚀 Features
|
|
65
145
|
|
|
66
|
-
- update TS docstring generator ([5a060b6](https://github.com/thi-ng/umbrella/commit/5a060b6))
|
|
67
|
-
- include native/WASM type in docstring (use Zig type sigs)
|
|
68
|
-
- update ensureLines() helper
|
|
69
|
-
- update test fixtures
|
|
70
|
-
- update IWasmMemoryAccess & impls ([bb8a3ca](https://github.com/thi-ng/umbrella/commit/bb8a3ca))
|
|
71
|
-
- add MemorySlice tuple to describe a memory region
|
|
72
|
-
- update allocate() & free() to use MemorySlice, migrate to IWasmMemoryAccess
|
|
73
|
-
- migrate growMemory() to IWasmMemoryAccess
|
|
74
|
-
- add MemorySlice to default imports in TS codegen
|
|
75
146
|
- update docstring & user code codegen config ([68694ba](https://github.com/thi-ng/umbrella/commit/68694ba))
|
|
76
147
|
- allow doc strings & user codes to be given as string array (lines)
|
|
77
148
|
- add InjectedBody type to support multiple injection sites
|
|
78
149
|
(e.g. TS interface declarations vs. wrapper impls)
|
|
79
150
|
- update TS & Zig codegens
|
|
80
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
|
|
81
161
|
|
|
82
162
|
#### 🩹 Bug fixes
|
|
83
163
|
|
|
@@ -87,56 +167,56 @@ and/or version bumps of transitive dependencies.
|
|
|
87
167
|
|
|
88
168
|
#### 🚀 Features
|
|
89
169
|
|
|
90
|
-
-
|
|
91
|
-
- migrate ManagedIndex from [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/main/packages/wasm-api-dom)
|
|
92
|
-
- move all Zig sources from /include => /zig
|
|
93
|
-
- update pkg
|
|
94
|
-
- add codegen support for union types ([bbc1f98](https://github.com/thi-ng/umbrella/commit/bbc1f98))
|
|
95
|
-
- add Union type, update TopLevelType
|
|
96
|
-
- update all codegens (C,TS,Zig)
|
|
97
|
-
- update alignOf(), sizeOf()
|
|
98
|
-
- update selectAlignment()
|
|
170
|
+
- add WasmTarget codegen opt & usize support ([62c049b](https://github.com/thi-ng/umbrella/commit/62c049b))
|
|
99
171
|
- add/update codegen alignment logic ([9c19ad9](https://github.com/thi-ng/umbrella/commit/9c19ad9))
|
|
100
172
|
- add AlignmentStrategy & impls
|
|
101
173
|
- update alignOf(), sizeOf(), prepareType()
|
|
102
174
|
- extract DEFAULT_CODEGEN_OPTS
|
|
103
175
|
- add Struct.align config option
|
|
104
|
-
- 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
|
|
105
185
|
|
|
106
186
|
#### 🩹 Bug fixes
|
|
107
187
|
|
|
108
|
-
- update CLI wrapper to allow unions ([904716c](https://github.com/thi-ng/umbrella/commit/904716c))
|
|
109
|
-
- fix i64/u64 handling in sizeof() ([825add3](https://github.com/thi-ng/umbrella/commit/825add3))
|
|
110
188
|
- fix padding in Zig packed structs ([8d70cf6](https://github.com/thi-ng/umbrella/commit/8d70cf6))
|
|
111
189
|
- since packed structs can't contain `[n]u8` types,
|
|
112
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))
|
|
113
193
|
|
|
114
194
|
#### ♻️ Refactoring
|
|
115
195
|
|
|
196
|
+
- minor updates C & Zig codegens ([a94e1cc](https://github.com/thi-ng/umbrella/commit/a94e1cc))
|
|
116
197
|
- rename types, use predicates ([4148e1e](https://github.com/thi-ng/umbrella/commit/4148e1e))
|
|
117
198
|
- rename StructField => Field
|
|
118
199
|
- update codegens to use more predicates instead of inline checks
|
|
119
|
-
- minor updates C & Zig codegens ([a94e1cc](https://github.com/thi-ng/umbrella/commit/a94e1cc))
|
|
120
200
|
|
|
121
201
|
## [0.14.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.14.0) (2022-10-17)
|
|
122
202
|
|
|
123
203
|
#### 🚀 Features
|
|
124
204
|
|
|
125
|
-
- add ptrCast() zig helper ([72a9406](https://github.com/thi-ng/umbrella/commit/72a9406))
|
|
126
|
-
- add Zig Slice & String wrappers ([28d057e](https://github.com/thi-ng/umbrella/commit/28d057e))
|
|
127
|
-
- allows expressing & converting slices for `extern struct`s
|
|
128
|
-
- ensure memory in WasmStringSlice/Ptr ([c55c6f0](https://github.com/thi-ng/umbrella/commit/c55c6f0))
|
|
129
205
|
- update IWasmMemoryAccess ([28bfff6](https://github.com/thi-ng/umbrella/commit/28bfff6))
|
|
130
206
|
- add IWasmMemoryAccess.ensureMemory()
|
|
131
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))
|
|
132
212
|
|
|
133
213
|
## [0.13.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.13.0) (2022-10-04)
|
|
134
214
|
|
|
135
215
|
#### 🚀 Features
|
|
136
216
|
|
|
217
|
+
- add WasmStringSlice.setSlice() ([50cc798](https://github.com/thi-ng/umbrella/commit/50cc798))
|
|
137
218
|
- update C11 code gen ([ff8037f](https://github.com/thi-ng/umbrella/commit/ff8037f))
|
|
138
219
|
- add `#ifdef __cplusplus` guards to pre/post
|
|
139
|
-
- add WasmStringSlice.setSlice() ([50cc798](https://github.com/thi-ng/umbrella/commit/50cc798))
|
|
140
220
|
|
|
141
221
|
#### ⏱ Performance improvements
|
|
142
222
|
|
|
@@ -146,10 +226,13 @@ and/or version bumps of transitive dependencies.
|
|
|
146
226
|
|
|
147
227
|
#### 🚀 Features
|
|
148
228
|
|
|
149
|
-
-
|
|
150
|
-
- add
|
|
151
|
-
-
|
|
152
|
-
- 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))
|
|
153
236
|
- add support for sentinels & user type body injection ([d240046](https://github.com/thi-ng/umbrella/commit/d240046))
|
|
154
237
|
- update sizeOf() to include sentinels
|
|
155
238
|
- add TopLevelType.body for extra user code
|
|
@@ -157,28 +240,52 @@ and/or version bumps of transitive dependencies.
|
|
|
157
240
|
- support array/slice sentinels
|
|
158
241
|
- add optional user code injection
|
|
159
242
|
- add `std` import header
|
|
160
|
-
-
|
|
161
|
-
- add
|
|
162
|
-
- add
|
|
163
|
-
- update
|
|
164
|
-
- update ICodeGen & CodeGenOpts
|
|
165
|
-
- update all codegens
|
|
166
|
-
- 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
|
|
167
247
|
|
|
168
248
|
#### 🩹 Bug fixes
|
|
169
249
|
|
|
250
|
+
- minor fix word wrap line width ([053ba0f](https://github.com/thi-ng/umbrella/commit/053ba0f))
|
|
170
251
|
- update zig panic handler sig for latest zig master version ([cb51bf6](https://github.com/thi-ng/umbrella/commit/cb51bf6))
|
|
171
252
|
- see https://github.com/ziglang/zig/commit/694fab484805088030fa36efe3e6b6e7ee385852
|
|
172
|
-
- minor fix word wrap line width ([053ba0f](https://github.com/thi-ng/umbrella/commit/053ba0f))
|
|
173
253
|
|
|
174
254
|
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.11.0) (2022-09-21)
|
|
175
255
|
|
|
176
256
|
#### 🚀 Features
|
|
177
257
|
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
- update
|
|
181
|
-
|
|
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
|
|
182
289
|
- update/fix codegens & config ([87def23](https://github.com/thi-ng/umbrella/commit/87def23))
|
|
183
290
|
- add global `CodeGenOpts.uppercaseEnums` option (migrate from TSOpts)
|
|
184
291
|
- set `i32` as enum default tag (for C compatibility)
|
|
@@ -186,37 +293,10 @@ and/or version bumps of transitive dependencies.
|
|
|
186
293
|
- fix C11 enum codegen (use `typedef enum`)
|
|
187
294
|
- add internal enumName() helper
|
|
188
295
|
- minor updates Zig codegen
|
|
189
|
-
- update
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
- update deps
|
|
194
|
-
- add C11 support, update codegens & config ([590311e](https://github.com/thi-ng/umbrella/commit/590311e))
|
|
195
|
-
- add preliminary C11 codegen
|
|
196
|
-
- add optional `tag` field for structs (extern/packed)
|
|
197
|
-
- add support for auto-labeled padding fields
|
|
198
|
-
- i.e. defined via unnamed fields with `pad` value
|
|
199
|
-
- move debug config option to global `CodeGenOpts`
|
|
200
|
-
- update TS codegen (array pointers) ([30360f2](https://github.com/thi-ng/umbrella/commit/30360f2))
|
|
201
|
-
- update CodeGenOpts ([b9fd7ff](https://github.com/thi-ng/umbrella/commit/b9fd7ff))
|
|
202
|
-
- major update codegens, string & pointer handling ([4f02295](https://github.com/thi-ng/umbrella/commit/4f02295))
|
|
203
|
-
- update/fix string wrappers (`WasmStringSlice/Ptr`)
|
|
204
|
-
- add generic `Pointer` wrapper
|
|
205
|
-
- add `const` field type support
|
|
206
|
-
- add applyIndents() formatter fn, simplify all codegens
|
|
207
|
-
- major update TS & Zig codegens
|
|
208
|
-
- WasmString codegen integration ([97fc318](https://github.com/thi-ng/umbrella/commit/97fc318))
|
|
209
|
-
- update TS codegen to wrap strings using new `WasmString` or `WasmStringPtr`
|
|
210
|
-
- update global codegen options handling, now passed to each codegen
|
|
211
|
-
- update TSOpts & ZigOpts to include custom pre/post
|
|
212
|
-
- add WasmString wrappers ([18d8fcb](https://github.com/thi-ng/umbrella/commit/18d8fcb))
|
|
213
|
-
- still unused (to be added to TS codegen)
|
|
214
|
-
- update core API & bindings ([b185ea5](https://github.com/thi-ng/umbrella/commit/b185ea5))
|
|
215
|
-
- add _panic(), timer(), epoch() core API fns
|
|
216
|
-
- update printI/U64() fns to accept bigint
|
|
217
|
-
- update C & Zig bindings
|
|
218
|
-
- update tests
|
|
219
|
-
- 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`)
|
|
220
300
|
|
|
221
301
|
## [0.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.10.0) (2022-08-24)
|
|
222
302
|
|
|
@@ -256,25 +336,32 @@ and/or version bumps of transitive dependencies.
|
|
|
256
336
|
|
|
257
337
|
#### 🚀 Features
|
|
258
338
|
|
|
259
|
-
-
|
|
339
|
+
- update helper predicates ([65b23d4](https://github.com/thi-ng/umbrella/commit/65b23d4))
|
|
260
340
|
- update TSOpts & TS codegen ([4f6bbbf](https://github.com/thi-ng/umbrella/commit/4f6bbbf))
|
|
261
341
|
- add `uppercaseEnum` option to force UC enum IDs
|
|
262
|
-
-
|
|
342
|
+
- add CLI wrapper for codegens ([683a560](https://github.com/thi-ng/umbrella/commit/683a560))
|
|
263
343
|
|
|
264
344
|
#### 🩹 Bug fixes
|
|
265
345
|
|
|
266
|
-
- allow signed ints for enum tags ([78d0822](https://github.com/thi-ng/umbrella/commit/78d0822))
|
|
267
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))
|
|
268
348
|
|
|
269
349
|
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.6.0) (2022-08-15)
|
|
270
350
|
|
|
271
351
|
#### 🚀 Features
|
|
272
352
|
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
- 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
|
|
278
365
|
- update codegens, add opts, fix alignments ([5c1fec5](https://github.com/thi-ng/umbrella/commit/5c1fec5))
|
|
279
366
|
- add global CodeGenOpts
|
|
280
367
|
- update generateTypes() to consider new opts
|
|
@@ -283,18 +370,11 @@ and/or version bumps of transitive dependencies.
|
|
|
283
370
|
- simplify TS codegen
|
|
284
371
|
- fix sizeOf() for struct fields
|
|
285
372
|
- make prepareType() idempotent
|
|
286
|
-
- add
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
- update allocate/free() fns, update Zig core API ([8a55989](https://github.com/thi-ng/umbrella/commit/8a55989))
|
|
292
|
-
- add _wasm_free() Zig impl
|
|
293
|
-
- add printFmt() Zig fn
|
|
294
|
-
- update WasmBridge.allocate() (add clear option)
|
|
295
|
-
- update WasmBridge.free()
|
|
296
|
-
- ensure memory in WasmBridge.getString()
|
|
297
|
-
- 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
|
|
298
378
|
|
|
299
379
|
#### ♻️ Refactoring
|
|
300
380
|
|
|
@@ -324,29 +404,29 @@ and/or version bumps of transitive dependencies.
|
|
|
324
404
|
|
|
325
405
|
#### 🚀 Features
|
|
326
406
|
|
|
327
|
-
- add i64/u64 support/accessors ([768c8bd](https://github.com/thi-ng/umbrella/commit/768c8bd))
|
|
328
|
-
- add WasmBridge.instantiate, add/update accessors ([0698bae](https://github.com/thi-ng/umbrella/commit/0698bae))
|
|
329
|
-
- add WasmBridge.instantiate() boilerplate
|
|
330
|
-
- add setters for typed scalars & arrays
|
|
331
|
-
- rename derefXX() => getXX() getters
|
|
332
|
-
- update tests
|
|
333
407
|
- major update WasmBridge, add types ([47aa222](https://github.com/thi-ng/umbrella/commit/47aa222))
|
|
334
408
|
- add WasmExports base interface
|
|
335
409
|
- add generics for WasmBridge & IWasmAPI
|
|
336
410
|
- update WasmBridge.init() arg (full WASM exports, not just mem)
|
|
337
411
|
- add WasmBridge.exports field to store WASM module exports
|
|
338
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))
|
|
339
419
|
|
|
340
420
|
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.2.0) (2022-08-01)
|
|
341
421
|
|
|
342
422
|
#### 🚀 Features
|
|
343
423
|
|
|
424
|
+
- fix zig slice pointer handling, use named child modules ([bd7905a](https://github.com/thi-ng/umbrella/commit/bd7905a))
|
|
344
425
|
- major update ObjectIndex ([4547f1f](https://github.com/thi-ng/umbrella/commit/4547f1f))
|
|
345
426
|
- add ObjectIndexOpts ctor options
|
|
346
427
|
- add IDGen for internal ID generation/recycling
|
|
347
428
|
- add iterators
|
|
348
429
|
- rename existing methods
|
|
349
|
-
- fix zig slice pointer handling, use named child modules ([bd7905a](https://github.com/thi-ng/umbrella/commit/bd7905a))
|
|
350
430
|
|
|
351
431
|
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.1.0) (2022-08-01)
|
|
352
432
|
|