feat: add "extract wit" option for wasm files#72
Merged
GordonSmith merged 1 commit intobytecodealliance:mainfrom Aug 14, 2025
Merged
feat: add "extract wit" option for wasm files#72GordonSmith merged 1 commit intobytecodealliance:mainfrom
GordonSmith merged 1 commit intobytecodealliance:mainfrom
Conversation
0ff744f to
ae3eceb
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive WebAssembly component support to the WIT IDL extension, enabling automatic detection of WebAssembly components and extraction of their WIT interfaces. The core functionality extracts WIT text from WASM component files and provides visual indicators for component files in the VS Code explorer.
- Implements WIT extraction from WebAssembly component bytes using wit-component library
- Adds automatic detection of WASM component files through header analysis
- Provides visual decorations and custom editor support for seamless component file handling
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| wit-bindgen-wasm/src/lib.rs | Adds core WIT extraction functionality with wit-component integration |
| wit-bindgen-wasm/Cargo.toml | Adds wit-component dependency for component decoding |
| tests/wasmDetection.test.ts | Unit tests for WASM header version detection logic |
| src/wasmUtils.ts | TypeScript wrapper for WIT extraction with proper error handling |
| src/wasmDetection.ts | File header analysis utilities for component detection |
| src/extension.ts | Comprehensive integration with VS Code UI and command registration |
| package.json | Configuration for commands, menus, and custom editor providers |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Add annotations for wasm file if they are components Auto display wit, when clicking on a wasm component Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
ae3eceb to
1284c9e
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.
Add annotations for wasm file if they are components Auto display wit, when clicking on a wasm component