# bazel-contrib/rules_go

Go rules for Bazel

Repository: https://github.com/bazel-contrib/rules_go
Canonical: https://ross.abutalabs.com/products/rules_go
Language: Go
License: Apache-2.0
License Family: permissive
Topics: bazel, bazel-rules, golang, cgo, go
Last push: 2026-08-26T10:56:55+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 3823, "days_push": 7, "days_rel": 17, "gap_med": 26.0, "n_releases_24m": 21}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1482, forks 760 (observed 2026-08-28T04:04:51.022100+00:00)

## What it is
Official Bazel rules for building, testing, and linking Go code, including cgo support, protobuf compilation, and Go SDK toolchain management. It lets teams build Go projects hermetically within Bazel's monorepo-oriented build system.

## Use cases
- build go code with bazel
- manage go toolchains in bazel
- build cgo projects with bazel
- run go tests under bazel
- compile protobufs for go with bazel
- set up a go monorepo with bazel

## When to choose
- you already use Bazel and want hermetic, reproducible Go builds
- you maintain a large monorepo mixing Go with other languages
- you need cross-compilation or remote caching for Go builds

## When to avoid
- your project is a simple Go module where the standard go toolchain suffices
- you don't use Bazel and don't need its build graph
- you want minimal build setup with fast onboarding

## Facets
- artifact type: library
- maturity: active
- function: build-tool, testing, developer-tools
- domain: developer-tools, programming-languages
- platform: go, cli, windows, cross-platform
- tags: bazel, bazel-rules, golang, cgo, hermetic-builds, toolchains, protobuf, devops, linux, macos

## Member repositories
- bazel-contrib/rules_go (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:51.022100+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:05.923686+00:00, confidence not recorded.
  - readme: https://github.com/bazel-contrib/rules_go (fetched 2026-08-28T04:04:51.022100+00:00, sha 7d34b7e9ee47)
- Data as of 2026-08-30T08:39:29.467469+00:00.
