Go Resources
Server-side Go is preview. The current server binary executes only JavaScript resources server-side (server/src/CServer.cpp); it does not load a type = "go" resource yet. The Go SDK (sdk/varion-go) and the C ABI contract (include/varion_go_host.h) ship in the kit as a preview surface. Use type = "js" for server logic today.
resource.toml (preview):
toml
enabled = true
type = "go"
main = "mygo.dll"
client-type = "none"If main is omitted, the default is <resource>.dll. A Go resource is built as a c-shared library.
RPC example (preview SDK)
go
host.OnClientRpc("server:ping", func(playerID uint16, argsJSON []byte) (any, error) {
return map[string]any{"pong": true}, nil
})World helpers (preview SDK)
The Go host exposes native-backed helpers:
CreateColShapeSphereCreateBlipCreateMarkerOnClientRpcReplyRpc
Source backing
This page is based on server/src/CServer.cpp (the host starts only for js resources), sdk/varion-go/host/rpc.go, sdk/varion-go/host/world.go and include/varion_go_host.h.