feat: add code generation#63
Merged
GordonSmith merged 1 commit intobytecodealliance:mainfrom Jun 25, 2025
Merged
Conversation
234c166 to
2e5b5c8
Compare
86bbf26 to
f190d0e
Compare
3b6aaea to
7000aae
Compare
e78bbbb to
14d5275
Compare
fafefce to
99999f3
Compare
GordonSmith
commented
Jun 24, 2025
99999f3 to
6373c5a
Compare
bc09b98 to
b0cece7
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements code generation support by wrapping wit-bindgen in a WebAssembly module, dropping the jco dependency and replacing it with wit-parser. Key changes include:
- Adding new WIT interface definitions and related build scripts (build.sh, build.rs) to support wasm-based binding generation.
- Updating tests, extension commands, and build configurations to integrate the new wit-parser based validation and bindings generation.
- Enhancing tooling in esbuild and README instructions to support the new code generation flow.
Reviewed Changes
Copilot reviewed 24 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wit-bindgen-wasm/wit-bindgen.wit | New WIT interface definition for wasm-based wit-bindgen exports |
| wit-bindgen-wasm/* | New build and component creation scripts for WASM module |
| tests/* | Updated tests to mock and validate using the new wasmUtils |
| src/wasmUtils.ts | New WASM module initialization and binding generation functions |
| src/validator.ts | Refactored error handling to use detailed wit-parser validation |
| src/extension.ts | Addition of new commands for binding generation and version display |
| esbuild.mjs | Updated regex utility for dynamic WASM/JS file discovery |
| package.json & README.md | Updated scripts, dependency references, and documentation |
7864efc to
8e64c13
Compare
Wrap wit-bindgen in wasm Drop jco and replace with wit-parser Signed off by: Gordon Smith <GordonJSmith@gmail.com>
8e64c13 to
c82d337
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wrap wit-bindgen in wasm
Drop jco and replace with wit-parser
Signed off by: Gordon Smith GordonJSmith@gmail.com