feat: add extract core wasm command#74
Merged
GordonSmith merged 1 commit intobytecodealliance:mainfrom Aug 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to extract core WebAssembly modules from WebAssembly components. The feature allows users to extract embedded core wasm modules from component files through VS Code commands and context menus.
Key changes:
- Implements core wasm extraction functionality using wasmparser in the Rust WASM module
- Adds VS Code command and UI integration for extracting core wasm modules
- Includes comprehensive test coverage for command contributions
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wit-bindgen-wasm/src/lib.rs | Adds extract_core_wasm_from_component method using wasmparser to find embedded core modules |
| wit-bindgen-wasm/Cargo.toml | Adds wasmparser dependency with component-model feature |
| tests/commands.test.ts | Adds tests verifying the extract core wasm command is properly registered in package.json |
| src/wasmUtils.ts | Adds TypeScript wrapper extractCoreWasmFromComponent that calls the WASM function |
| src/extension.ts | Implements the VS Code command with file selection, extraction, and save dialogs |
| package.json | Registers the new command and adds it to editor/explorer context menus and command palette |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6cd6188 to
58c389e
Compare
Contributor
|
🎉 This change has been included in wit-idl-v0.3.11 🎉 The release is available on:
Your release-please bot 🚀🙏 |
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.
No description provided.