Go SDK
RBS provides hermetic Go support with automatic Go SDK management, hermetic builds withGOPROXY=off, and cross-compilation via platform flags.
Setup
Toolchain
Register a Go toolchain inWORKSPACE.rbs:
Rules
go_library
Creates a reusable Go library (source packaging for dependents).
go_binary
Creates an executable Go binary.
go_test
Runs Go tests.
Hermetic Builds
By default, RBS runs Go builds withGOPROXY=off and GOSUMDB=off, ensuring the Go tool cannot fetch modules from the network at build time. All dependencies must be vendored or pre-fetched.
For stdlib-only builds (no go.mod), RBS automatically sets GO111MODULE=off so go build works without a module root.
Cross-Compilation
Use theRBS_TARGET_PLATFORM environment variable to cross-compile: