The Rust vs Go comparison on OctoCounts shows side-by-side source line counts for rust-lang/rust and golang/go, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of rust-lang/rust and golang/go using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-10-29, rust-lang/rust contains 3,216,511 total lines (2,746,357 code) across 8,493 files, while golang/go contains 2,990,998 total lines (2,120,196 code) across 9,421 files as of 2026-10-29. rust-lang/rust has about 1.3x the counted code lines of golang/go under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | rust-lang/rust | golang/go |
|---|---|---|
| Files | 8,493 | 9,421 |
| Total lines | 3,216,511 | 2,990,998 |
| Code lines | 2,746,357 | 2,120,196 |
| Comment lines | 222,850 | 634,999 |
| Blank lines | 247,304 | 235,803 |
| Languages counted | 36 | 27 |
Top languages in rust-lang/rust: Rust (76.5% of code), JSON (12.8% of code), XML (5.8% of code). Top languages in golang/go: Go (91.2% of code), GNU Style Assembly (6.6% of code), Snakemake (1.0% of code). JSON, YAML appear in both top language lists; Rust, XML, Shell appear only in rust-lang/rust's top languages; Go, GNU Style Assembly, Snakemake appear only in golang/go's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. rust-lang/rust was counted at ref main (commit 96a18bf5ffa2) on 2026-10-29; golang/go was counted at ref master (commit 0b050a4c5cce) on 2026-10-29. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. rust-lang/rust: tokei-14.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. golang/go: tokei-14.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
Background observations recorded on 2026-09-08; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: rust-lang/rust is the Rust repository: the compiler (largely Rust itself), standard library, tooling, and a very large test suite. golang/go is the Go repository: compiler toolchain, standard library, and runtime, also with its own test suites. Both are language toolchain monorepos, counted with the rules shown in the methodology on the dates above, which makes this one of the more like-for-like comparisons on this site.
These repositories contain compilers, runtimes, libraries, and supporting tools. A language's share of the selected source tree does not identify which files are bootstrap code or prove that they are hand-written; inspect the pinned tree for those boundaries.
Compiler repository size does not measure language quality, compile speed, or runtime performance — those are properties of the shipped toolchain and the programs it produces, not of the source tree's line count.
Sources: rust-lang/rust repository · golang/go repository. Statements verified 2026-09-08.
Evidence and next steps:
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
As of 2026-10-29, rust-lang/rust contains 3,216,511 total lines (2,746,357 code) across 8,493 files, while golang/go contains 2,990,998 total lines (2,120,196 code) across 9,421 files as of 2026-10-29. rust-lang/rust has about 1.3x the counted code lines of golang/go under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for rust-lang/rust, golang/go, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. rust-lang/rust was counted at ref main (commit 96a18bf5ffa2) on 2026-10-29; golang/go was counted at ref master (commit 0b050a4c5cce) on 2026-10-29. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.