golang-plugin/main.go

23 lines
523 B
Go
Raw Normal View History

2023-07-01 11:18:12 +00:00
//go:generate tinygo build -o golang.wasm -gc=leaking --no-debug -target=wasi main.go
package main
import (
"code.icb4dc0.de/buildr/golang-plugin/build"
"code.icb4dc0.de/buildr/golang-plugin/tool"
sdk "code.icb4dc0.de/buildr/wasi-module-sdk-go"
)
func init() {
sdk.Register(sdk.CategoryTool, "go_tool", sdk.ModuleFactoryFunc(func() sdk.Module {
return new(tool.GoTool)
}))
sdk.Register(sdk.CategoryBuild, "go_build", sdk.ModuleFactoryFunc(func() sdk.Module {
return new(build.GoBuild)
}))
}
func main() {
}