Skip to content

Add Go Language Support for WebAssembly Component Model Plugins#16

Merged
topheman merged 6 commits intomasterfrom
feat/add-go-support
Aug 26, 2025
Merged

Add Go Language Support for WebAssembly Component Model Plugins#16
topheman merged 6 commits intomasterfrom
feat/add-go-support

Conversation

@topheman
Copy link
Copy Markdown
Owner

What's New

🚀 Go Plugin Support

  • New Go plugin ecosystem: Added go_modules/ directory structure for Go-based plugins
  • Echo plugin in Go: Implemented plugin-echo-go as a reference Go plugin
  • WIT bindings: Go-specific WIT interface definitions go_modules/wit generated from existing crates/pluginlab/wit/ definitions
    • TinyGo wasip2 requirement: The wasip2 target of TinyGo assumes that the component is targeting wasi:cli/command@0.2.0 world
    • Automatic import injection: scripts/prepare-wit-files.sh automatically uncomments and includes the required wasi:cli/imports@0.2.0 world imports that TinyGo needs for WASI compatibility
    • Seamless integration: This allows Go plugins to work with the existing REPL host without manual WIT modifications

🛠️ Toolchain Integration

  • TinyGo compiler: Integrated TinyGo v0.39.0 for Go to WebAssembly compilation
  • wkg tool: WebAssembly package manager that bundles multiple WIT interface files into a single repl:api.wasm package for Go plugin consumption
  • Go 1.25+ support: Set up Go toolchain with modern version requirements
  • Build integration: Integrated into existing justfile build system with dedicated Go plugin commands
  • Official tooling: Based on Bytecode Alliance's Go Component Model tooling

🔧 CI/CD Enhancements

  • Go toolchain setup: Added Go 1.25, TinyGo compiler, and wkg tool installation to CI workflows
  • Unified implementation: Same Go toolchain setup applied to both Rust and web host CI pipelines

📚 Documentation & Testing

  • README enhancements: Added Go language section with setup instructions and plugin examples
  • Toolchain docs: Comprehensive Go tooling setup guide
  • Testing coverage: Added E2E tests for Go plugins with CI validation of all toolchain components (rust and web hosts)

Dependencies

  • New: TinyGo v0.39.0+
  • New: Go 1.25+
  • New: wkg (WebAssembly package manager)
  • Existing: wasm-tools, cargo-component (unchanged)

@topheman topheman self-assigned this Aug 26, 2025
@topheman topheman merged commit 6e6e942 into master Aug 26, 2025
9 of 10 checks passed
@topheman topheman deleted the feat/add-go-support branch August 26, 2025 14:43
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.

1 participant