wasmgo-0.3.1 has been yanked.
Wasm Go
🐹 Go WebAssembly plugin for Wasmrun - compile Go projects to WebAssembly using TinyGo.
Installation
As Wasm Plugin in Wasmrun
Standalone CLI (Experimental)
Requirements
Usage
With Wasmrun
# Run with live reload
# Compile with optimization
Standalone CLI (Only for Testing)
# Check project compatibility
# Compile project
# Check dependencies
Plugin Configuration
Plugin configuration is stored in Cargo.toml under the [package.metadata.wasm-plugin] section:
[]
= "go"
= ["go"]
= ["go.mod", "main.go", "cmd/main.go", "app.go"]
[]
= true
= false
= true
= true
= ["wasm"]
[]
= ["tinygo", "go"]
This follows Rust ecosystem conventions for tool-specific metadata.
Project Structure
Supports standard Go project layouts:
Or with cmd directory:
Example
&&
Development
# Build
# Test with example
# Validate configuration
# Install locally
Plugin Architecture
This plugin implements the Wasm plugin interface and reads its configuration from Cargo.toml. The configuration includes:
- Extensions: File extensions the plugin handles
- Entry Files: Priority order for entry point detection
- Capabilities: What features the plugin supports
- Dependencies: Required external tools