Skip to content

feat: add code generation#63

Merged
GordonSmith merged 1 commit intobytecodealliance:mainfrom
GordonSmith:WRAP_WIT_BINDGEN
Jun 25, 2025
Merged

feat: add code generation#63
GordonSmith merged 1 commit intobytecodealliance:mainfrom
GordonSmith:WRAP_WIT_BINDGEN

Conversation

@GordonSmith
Copy link
Copy Markdown
Collaborator

Wrap wit-bindgen in wasm
Drop jco and replace with wit-parser

Signed off by: Gordon Smith GordonJSmith@gmail.com

@GordonSmith GordonSmith force-pushed the WRAP_WIT_BINDGEN branch 5 times, most recently from 234c166 to 2e5b5c8 Compare June 22, 2025 20:36
@GordonSmith GordonSmith marked this pull request as ready for review June 22, 2025 20:39
@GordonSmith GordonSmith requested a review from Copilot June 22, 2025 20:39

This comment was marked as outdated.

@GordonSmith GordonSmith requested a review from Copilot June 23, 2025 18:21

This comment was marked as outdated.

@GordonSmith GordonSmith requested a review from Copilot June 23, 2025 19:11

This comment was marked as outdated.

@GordonSmith GordonSmith requested a review from Copilot June 23, 2025 19:20

This comment was marked as outdated.

@GordonSmith GordonSmith force-pushed the WRAP_WIT_BINDGEN branch 2 times, most recently from fafefce to 99999f3 Compare June 23, 2025 20:53
@GordonSmith GordonSmith requested a review from Copilot June 24, 2025 19:05

This comment was marked as outdated.

@GordonSmith GordonSmith requested a review from Copilot June 24, 2025 19:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@GordonSmith GordonSmith force-pushed the WRAP_WIT_BINDGEN branch 2 times, most recently from 7864efc to 8e64c13 Compare June 25, 2025 05:50
Wrap wit-bindgen in wasm
Drop jco and replace with wit-parser

Signed off by: Gordon Smith <GordonJSmith@gmail.com>
@GordonSmith GordonSmith merged commit cc7dd88 into bytecodealliance:main Jun 25, 2025
2 checks passed
@GordonSmith GordonSmith deleted the WRAP_WIT_BINDGEN branch June 25, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants