Commit 3958db1
committed
feat: add JavaScript bindings generation and transpilation for WIT components
- Implemented `generateJsBindings` and `generateJsBindingsFromPath` for generating TypeScript bindings from WIT content.
- Added `transpileJsHost` and `transpileJsHostFromPath` for transpiling WebAssembly components into JavaScript host modules.
- Introduced interfaces and types for binding options and results.
- Created tests for guest and host bindings generation, including complex WIT definitions and command contributions.
- Ensured backward compatibility with deprecated aliases for guest and host bindings.
- Implemented edge case tests for WitFormatter to ensure proper formatting of various input scenarios.
- Added comprehensive tests for WitSyntaxValidator, covering error parsing and diagnostic creation.
- Introduced file-based tests for WASM detection utilities to validate header reading and component identification.
- Enhanced vitest configuration to include coverage reporting for better test insights.
- Added a new command for running unit tests with coverage.
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>1 parent 892265a commit 3958db1
File tree
36 files changed
+4622
-1443
lines changed- .github/workflows
- .vscode
- samples
- adder
- src
- wit
- counter
- src
- wit
- greeter
- src
- wit
- src
- tests
- wit-bindgen-wasm
36 files changed
+4622
-1443
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
0 commit comments