Commit c7e5ebe
committed
feat(wit): implement Bazel-native external WIT dependency resolution
Add comprehensive support for managing external WebAssembly Interface Type (WIT)
dependencies using Bazel's http_archive and module extension system, eliminating
the need for shell scripts or external package managers like wit-deps.
**Key Features:**
- WASI WIT interfaces available via @wasi_io//:streams and new module extension
- Bazel-native http_archive rules for external WIT packages with SHA256 verification
- Cross-platform, hermetic dependency management following project's Bazel-first principles
- Comprehensive documentation with examples and migration guidance
**Technical Changes:**
- Added wit/wasi_deps.bzl with WASI interface definitions (wasi:[email protected])
- Created wasi_wit module extension in wasm/extensions.bzl for dependency loading
- Updated MODULE.bazel to enable WASI WIT dependencies via extension
- Fixed Go component examples to use correct WIT worlds and dependencies
- Re-enabled //examples/go_component/... targets in CI (removed exclusions)
**Documentation:**
- Created comprehensive External WIT Dependencies guide (/guides/external-wit-dependencies.mdx)
- Added external dependency examples to wit_library rule reference
- Updated toolchain configuration guide with WIT dependencies quick reference
- Provided practical examples for custom, organization-wide, and WASI dependencies
**Fixes:**
- Resolves GitHub issue #17: Go component WIT dependency resolution issues
- Fixes "package 'wasi:[email protected]' not found" errors in wit-bindgen markdown generation
- Enables successful documentation generation for Go components using WASI interfaces
**Testing:**
- Go component examples now build and generate documentation successfully
- All dependencies use proper version matching (0.2.6) between imports and packages
- CI builds include Go component targets without exclusions1 parent c69df96 commit c7e5ebe
File tree
18 files changed
+949
-47
lines changed- .github/workflows
- docs-site/src/content/docs
- guides
- reference
- examples
- cpp_component/http_service
- go_component
- wit
- rust
- toolchains
- tools-builder/toolchains
- src
- wasm
- wit
18 files changed
+949
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
213 | 211 | | |
214 | 212 | | |
215 | 213 | | |
216 | | - | |
| 214 | + | |
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
220 | 218 | | |
221 | 219 | | |
222 | | - | |
223 | | - | |
224 | 220 | | |
225 | 221 | | |
226 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments