{"id":29419858,"url":"https://github.com/bytecodealliance/vscode-wit","last_synced_at":"2026-02-26T11:02:57.745Z","repository":{"id":178171711,"uuid":"625953291","full_name":"bytecodealliance/vscode-wit","owner":"bytecodealliance","description":"Visual Studio Code extension to recognize and highlight the WebAssembly Interface Type (WIT) IDL.","archived":false,"fork":false,"pushed_at":"2026-01-14T14:57:40.000Z","size":1471,"stargazers_count":33,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-30T02:16:57.521Z","etag":null,"topics":["textmate-grammar","vscode-extension","wasm","webassembly","wit"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=bytecodealliance.wit-idl","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytecodealliance.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-10T13:32:46.000Z","updated_at":"2026-01-14T14:58:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fe3416e-221e-4b9f-91cd-a29a51f13848","html_url":"https://github.com/bytecodealliance/vscode-wit","commit_stats":null,"previous_names":["bytecodealliance/vscode-wit"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/bytecodealliance/vscode-wit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fvscode-wit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fvscode-wit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fvscode-wit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fvscode-wit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytecodealliance","download_url":"https://codeload.github.com/bytecodealliance/vscode-wit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fvscode-wit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28977910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["textmate-grammar","vscode-extension","wasm","webassembly","wit"],"created_at":"2025-07-12T01:13:08.334Z","updated_at":"2026-02-26T11:02:57.728Z","avatar_url":"https://github.com/bytecodealliance.png","language":"TypeScript","readme":"# WIT IDL for VSCode\n\n![Editor with WIT menu](images/editor-menu.png)\n\n_A comprehensive Visual Studio Code extension for WebAssembly Interface Type (WIT) development. This extension provides **syntax highlighting**, **validation**, **formatting**, **language bindings generation**, and **WebAssembly component tooling** for the WIT Interface Definition Language (IDL). Also compatible as a TextMate bundle._\n\n**Key Features:**\n- 🎨 Full syntax highlighting and code completion\n- ✅ Real-time syntax validation with detailed error diagnostics\n- 🔧 Automatic code formatting\n- 🌐 Generate bindings for Rust, C, C++, C#, Go, MoonBit, and Markdown\n- 🧩 WebAssembly component detection and WIT extraction\n- 📝 Context menu integration for quick access to tools\n\nThe description of the WIT format can be found at: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md\n\n## Features\n\nThis extension provides comprehensive support for WebAssembly Interface Type (WIT) files and WebAssembly components:\n\n### Language Support\n- **Syntax Highlighting**: Full TextMate grammar for WIT files with proper scoping\n- **Code Snippets**: Pre-built snippets for worlds, interfaces, and common patterns\n- **Markdown in Comments**: Syntax highlighting for markdown within WIT comments\n- **Code Completion**: Context-aware autocomplete for WIT keywords and constructs\n\n### Validation and Diagnostics\n\n#### Automatic Validation\n- **On File Save**: Automatically validates WIT files when saved\n- **On File Open**: Validates WIT files when opened in the editor\n- **Real-time Feedback**: Errors appear immediately in VS Code's PROBLEMS pane\n- **Workspace Validation**: Validate all WIT files across your entire workspace\n\n#### Error Display\n- **Precise Location**: Errors show exact line and column numbers\n- **Detailed Messages**: Clear descriptions of syntax errors with context\n- **Quick Navigation**: Click any error in PROBLEMS pane to jump to the issue\n- **Multi-file Support**: Track errors across multiple files simultaneously\n\n### Document Formatting\n\nFormat WIT files with a single command:\n- **Auto-formatting**: Format on save or on demand\n- **Consistent Style**: Ensures uniform code style across your project\n- **Default Formatter**: Automatically set as the default formatter for `.wit` files\n- **Keyboard Shortcut**: `Shift+Alt+F` to format the active document\n\n### Binding Generation\n\nGenerate language bindings directly from WIT files or WebAssembly components:\n\n#### Supported Languages\n- **Rust**: Generate idiomatic Rust bindings with `wit-bindgen`\n- **C**: Generate C bindings for C projects\n- **C++**: Generate C++ bindings\n- **C#**: Generate C# bindings for .NET projects\n- **Go**: Generate Go bindings\n- **MoonBit**: Generate MoonBit bindings\n- **Markdown**: Generate documentation in Markdown format\n\n#### Binding Generation Features\n- **Context Menu Integration**: Right-click on `.wit` or `.wasm` files to generate bindings\n- **Multiple Targets**: Generate bindings for multiple languages at once\n- **Output to Folder**: Automatically creates language-specific output directories\n- **Progress Feedback**: Visual feedback during generation process\n\n### WebAssembly Component Support\n\n![Editor with WIT menu](images/component-view-menu.png)\n\n\n#### Component Detection\n- **Visual Indicators**: WebAssembly component files (`.wasm`) are decorated with a 🧩 emoji in the Explorer\n- **Component Colors**: Customizable color scheme for component files in the file explorer\n- **Automatic Detection**: Distinguishes between core WebAssembly modules and components\n\n#### Component Operations\n- **Extract WIT**: Extract WIT definitions from compiled WebAssembly components\n- **Extract Core Wasm**: Extract the core WebAssembly module from a component\n- **Custom Editor**: View WIT interfaces directly from `.wasm` component files\n- **Real-time Updates**: WIT view updates automatically when the component file changes\n\n### Context Menu Integration\n\nRight-click on files in the editor or Explorer for quick access to:\n\n**For `.wit` files:**\n- Check WIT Syntax\n- Format Document\n- Generate Bindings (with language submenu)\n\n**For `.wasm` component files:**\n- Extract WIT\n- Extract Core Wasm\n- Generate Bindings (with language submenu)\n\n## Available Commands\n\nAccess these commands via the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`):\n\n### Validation Commands\n- **WIT: Check WIT Syntax** (`F7` when in a WIT file)\n  - Validates the currently active WIT file\n  - Shows errors in the PROBLEMS pane and notifications\n  \n- **WIT: Check WIT Syntax in Workspace** (`Shift+F7`)\n  - Validates all WIT files in the workspace\n  - Shows progress notification during validation\n  - Provides summary of results in output channel\n\n### Formatting Commands\n- **WIT: Format Document** (`Shift+Alt+F` when in a WIT file)\n  - Formats the current WIT file\n  - Applies consistent styling and indentation\n\n### Binding Generation Commands\n- **WIT: Generate Language Bindings**\n  - Opens a language selection menu\n  - Available for `.wit` files and WebAssembly components\n  \n- **WIT: Generate Rust Bindings**\n  - Generates Rust bindings using `wit-bindgen`\n  \n- **WIT: Generate C Bindings**\n  - Generates C bindings for C projects\n  \n- **WIT: Generate C++ Bindings**\n  - Generates C++ bindings\n  \n- **WIT: Generate C# Bindings**\n  - Generates C# bindings for .NET projects\n  \n- **WIT: Generate Go Bindings**\n  - Generates Go bindings\n  \n- **WIT: Generate MoonBit Bindings**\n  - Generates MoonBit bindings\n  \n- **WIT: Generate Markdown Documentation**\n  - Generates Markdown documentation from WIT definitions\n\n### WebAssembly Component Commands\n- **WIT: Extract WIT**\n  - Extracts WIT definitions from a WebAssembly component file\n  - Available only for component-type `.wasm` files\n  \n- **WIT: Extract Core Wasm**\n  - Extracts the core WebAssembly module from a component\n  - Available only for component-type `.wasm` files\n\n### Utility Commands\n- **WIT: Show WIT Bindgen Version**\n  - Displays the version of wit-bindgen used by the extension\n\n## Keyboard Shortcuts\n\n| Command | Shortcut | When |\n|---------|----------|------|\n| Check WIT Syntax | `F7` | Editing a `.wit` file |\n| Check WIT Syntax in Workspace | `Shift+F7` | Anytime |\n| Format Document | `Shift+Alt+F` | Editing a `.wit` file |\n\n## Extension Settings\n\nThis extension contributes the following settings:\n\n### Default Formatter\nThe extension automatically configures itself as the default formatter for WIT files. This is equivalent to:\n\n```json\n{\n  \"[wit]\": {\n    \"editor.defaultFormatter\": \"bytecodealliance.wit-idl\"\n  }\n}\n```\n\nYou can override this in your user or workspace settings if needed.\n\n### Component File Decoration Color\nCustomize the color used to decorate WebAssembly component files in the Explorer:\n\n- **Color ID**: `witIdl.componentColor`\n- **Description**: Color used to decorate WebAssembly component files (.wasm) in the explorer\n- **Defaults**:\n  - Light theme: `#5043b3`\n  - Dark theme: `#7c5eff`\n  - High contrast: `#b15eff`\n\nTo customize, add to your settings:\n\n```json\n{\n  \"workbench.colorCustomizations\": {\n    \"witIdl.componentColor\": \"#your-color-here\"\n  }\n}\n```\n\n## Installation\n\n### From Marketplace\n\nThis extension is available on:\n\n- **Visual Studio Marketplace**: For VS Code users\n  - Install directly from VS Code: Search for \"WIT IDL\" in the Extensions view\n  - Or visit: https://marketplace.visualstudio.com/items?itemName=bytecodealliance.wit-idl\n\n- **Open VSX Registry**: For VSCodium and other compatible editors\n  - Install from Open VSX: https://open-vsx.org/extension/bytecodealliance/wit-idl\n  - Or install via CLI: `ovsx get bytecodealliance.wit-idl`\n\n### From Source\n\n#### Prerequisites\n\nThis extension includes a WebAssembly component that requires the following tools for building:\n\n- **Rust** (with `cargo`): Required for building the WebAssembly module\n- **wasm-pack v0.13.1**: Used specifically for the `wit-bindgen-wasm` subproject\n\nYou can install these dependencies by running:\n```bash\n# Install Rust (if not already installed)\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# Run the setup script to install build tools\nnpm run setup-wasm\n```\n\n\nTo install from source, follow these steps:\n* Clone the repository: `git clone https://github.com/bytecodealliance/vscode-wit.git \u0026\u0026 cd vscode-wit`\n* Install build dependencies: `npm run setup-wasm`\n* Run npm commands to install:\n`npm ci \u0026\u0026 npm run install-extension`\n\n## Testing\n\nThe extension includes comprehensive tests:\n\n```bash\n# Run all tests (lint, format, build, grammar, unit tests)\nnpm test\n\n# Run unit tests only\nnpm run test-unit\n\n# Run tests in watch mode\nnpm run test-unit-watch\n```\n\nFor Go WASM integration tests, see [docs/GO_TESTING.md](docs/GO_TESTING.md).\n\n## Publishing (for maintainers)\n\nThis extension is automatically published to both Visual Studio Marketplace and Open VSX Registry through GitHub Actions when a release is created.\n\n**Required secrets:**\n- `PAT_VSCE`: Personal Access Token for Visual Studio Marketplace\n- `OVSX_PAT`: Personal Access Token for Open VSX Registry\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fvscode-wit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytecodealliance%2Fvscode-wit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fvscode-wit/lists"}