Summary
Add support for building and running Go and C# .NET applications as WASM modules. Unlike Python and Node.js which require interpreter runtimes, both Go and .NET compile directly to WASM.
Research
Go
- Go 1.21+ has native WASI support via
GOOS=wasip1 GOARCH=wasm
- Go 1.24 (2025) adds WASI reactor support with
go:wasmexport directive and -buildmode=c-shared for long-running HTTP services
- Compiles directly to WASM - no interpreter runtime needed
- Limitation: WASI preview 1 has partial socket support
Build command:
GOOS=wasip1 GOARCH=wasm go build -o app.wasm
Sources:
C# .NET
- .NET 8 has experimental WASI workload (
wasi-experimental)
- .NET 10 (Nov 2025) has first-class WASI support with dedicated WASM team, Native AOT
- Uses
Wasi.Sdk NuGet package or componentize-dotnet from Bytecode Alliance
- Native AOT compilation produces standalone WASI-compliant .wasm files
- No interpreter runtime needed
Build approach:
dotnet add package Wasi.Sdk --prerelease
dotnet build
Sources:
Implementation Plan
1. Go Support
Add Go builder in CLI (fabricks/src/builders/go.rs):
- Detect Go projects (go.mod)
- Run
GOOS=wasip1 GOARCH=wasm go build
- For HTTP services (Go 1.24+), use
-buildmode=c-shared for reactor mode
2. .NET Support
Add .NET builder in CLI (fabricks/src/builders/dotnet.rs):
- Detect .NET projects (.csproj)
- Ensure Wasi.Sdk package is added
- Run
dotnet build with appropriate WASI configuration
3. Examples
Create example projects:
examples/go-hello/ - Simple command module
examples/go-http/ - HTTP service using Go 1.24 reactor mode
examples/dotnet-hello/ - Simple command module
examples/dotnet-http/ - HTTP service
4. No Runtime Layer Needed
Unlike Python/Node.js interpreted runtimes, Go and .NET compile directly to WASM. The OCI images will be simple single-layer modules (like Rust examples), not multi-layer interpreted modules.
Acceptance Criteria
Summary
Add support for building and running Go and C# .NET applications as WASM modules. Unlike Python and Node.js which require interpreter runtimes, both Go and .NET compile directly to WASM.
Research
Go
GOOS=wasip1 GOARCH=wasmgo:wasmexportdirective and-buildmode=c-sharedfor long-running HTTP servicesBuild command:
Sources:
C# .NET
wasi-experimental)Wasi.SdkNuGet package orcomponentize-dotnetfrom Bytecode AllianceBuild approach:
Sources:
Implementation Plan
1. Go Support
Add Go builder in CLI (
fabricks/src/builders/go.rs):GOOS=wasip1 GOARCH=wasm go build-buildmode=c-sharedfor reactor mode2. .NET Support
Add .NET builder in CLI (
fabricks/src/builders/dotnet.rs):dotnet buildwith appropriate WASI configuration3. Examples
Create example projects:
examples/go-hello/- Simple command moduleexamples/go-http/- HTTP service using Go 1.24 reactor modeexamples/dotnet-hello/- Simple command moduleexamples/dotnet-http/- HTTP service4. No Runtime Layer Needed
Unlike Python/Node.js interpreted runtimes, Go and .NET compile directly to WASM. The OCI images will be simple single-layer modules (like Rust examples), not multi-layer interpreted modules.
Acceptance Criteria
fabricks buildauto-detects and builds Go projectsfabricks buildauto-detects and builds .NET projectsfabricks runworks for Go WASM modulesfabricks runworks for .NET WASM modulesgo-hellocommand module worksgo-httpHTTP service works (if Go 1.24 reactor support is feasible)dotnet-hellocommand module worksdotnet-httpHTTP service works