cockroachdb/cockroach
Dependencies
CockroachDB pins all third-party Go modules in go.mod/go.sum, mirrored into Bazel via DEPS.bzl. The binary statically links a small number of C/C++ libraries described in c-deps/.
Module manifest
Sizes (current go.mod): ~570 lines, ~3,400 lines of go.sum, ~11,750 lines of DEPS.bzl. The manifest is large because of cloud-provider SDKs; trimming it is a project-managed effort.
Module path: github.com/cockroachdb/cockroach. Go version: as pinned by the repo's .go-version (currently 1.26.x).
CockroachDB-owned modules
Crucial libraries written by Cockroach Labs:
| Module | Used for |
|---|---|
github.com/cockroachdb/pebble |
The storage engine |
github.com/cockroachdb/errors |
Structured, redactable errors |
github.com/cockroachdb/redact |
Redaction primitives |
github.com/cockroachdb/datadriven |
Golden-file tests |
github.com/cockroachdb/logtags |
Context-attached log tags |
github.com/cockroachdb/crlib |
Misc helpers |
github.com/cockroachdb/swiss |
Faster maps |
github.com/cockroachdb/tokenbucket |
Rate-limit primitive |
github.com/cockroachdb/cmux |
TLS/Pgwire mux |
github.com/cockroachdb/apd/v3 |
Arbitrary-precision decimals |
github.com/cockroachdb/version |
Semver helpers |
github.com/cockroachdb/changefeedpb |
CDC wire types |
github.com/cockroachdb/cockroach-go/v2 |
Test driver |
github.com/cockroachdb/ttycolor |
Terminal colors |
Cloud SDKs
- AWS —
aws-sdk-go(v1) +aws-sdk-go-v2for many services (S3, KMS, EC2, RDS, IAM, STS, SSO, Kafka). - Azure —
azure-sdk-for-goand the newer modular SDKs (azcore, azidentity, keyvault, compute, monitor, storage). - Google Cloud —
cloud.google.com/go/...(Storage, KMS, Pub/Sub, monitoring). - IBM Cloud —
IBM/go-sdk-core/v5and provisioning SDKs (used by roachprod).
Cloud SDK dependencies dominate the dependency graph by raw line count.
Postgres compatibility libraries
github.com/jackc/pgconn,pgx/v4,pgproto3/v2,pgtype— for client-side tools and tests.github.com/lib/pq— used in some legacy paths.
Storage and compression
github.com/golang/snappy— snappy compression for SSTs.github.com/pierrec/lz4/v4— lz4 used by Pebble and SSTs.github.com/klauspost/compress— Pebble and parquet.github.com/cespare/xxhash/v2— hashing.
Observability
go.opentelemetry.io/oteland exporters — tracing.github.com/getsentry/sentry-go— crash reporting.github.com/google/pprof— profile parsing.github.com/DataDog/datadog-api-client-go/v2— Datadog uploads.github.com/prometheus/client_golang(transitively via OTEL) — metrics.
SQL
github.com/lib/pq— Postgres types.github.com/blevesearch/snowballstem— stemmers for FTS.github.com/golang/geo— spherical geometry primitives.github.com/twpayne/go-geom— planar geometry.
CLI / TUI
github.com/spf13/cobra,pflag,viper— CLI framework.github.com/charmbracelet/bubbles,bubbletea,lipgloss— TUI fordemo.github.com/peterh/liner,chzyer/readline— readline-equivalents in tests.
Vendored C/C++ dependencies
c-deps/ contains the C/C++ libraries the binary links statically:
geos/— the GEOS spatial library (vendored as a git submodule).proj/— PROJ for spatial reference systems.libjemalloc/— jemalloc allocator (Linux only).libedit/— readline replacement forcockroach sql.
These build via Bazel rules in build/ and require a working C/C++ toolchain.
How dependencies enter the tree
go get -u <module>againstgo.mod.- Run
./dev gen go-mod-tidy(regeneratesgo.sum). - Run
./dev gen mirrorto vendor intoDEPS.bzlfor Bazel. - Run
./dev gen bazelto updateBUILD.bazelfiles. - Submit through the dependency-update process (often via
pkg/cmd/mirror).
The repository discourages pulling in new dependencies casually — every addition expands the supply-chain attack surface and CI runtime.
Related pages
- How to contribute / tooling — build, lint, codegen.
- How to contribute / development workflow — module-update procedure.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.