rust-lang/rust has 2,741,973 source lines of code out of 3,211,493 total lines across 8,486 files, counted from the main ref at commit 7189d39d9ce9 by the OctoCounts tokei engine on 2026-10-22. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.
As of 2026-10-22 (commit 7189d39d9ce9), rust-lang/rust contains 3,211,493 total lines: 2,741,973 code, 222,527 comments, 246,993 blank, across 8,486 files in 36 languages (top: Rust 76.5%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.
OctoCounts produced this report by resolving rust-lang/rust to commit 7189d39d9ce9, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.
This is a very large codebase by counted code lines. Code represents 85.4% of all lines, comments represent 6.9%, and the repository averages 323 code lines per file. Rust accounts for 76.5% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| Rust | 6804 | 2449081 | 2097352 | 135967 | 215762 |
| JSON | 32 | 352618 | 352617 | 0 | 1 |
| XML | 3 | 158527 | 158436 | 18 | 73 |
| YAML | 16 | 40151 | 37370 | 439 | 2342 |
| Shell | 133 | 19689 | 16863 | 1556 | 1270 |
| JavaScript | 12 | 14660 | 10970 | 3017 | 673 |
| TOML | 328 | 13743 | 9859 | 2099 | 1785 |
| Python | 39 | 13026 | 9790 | 1050 | 2186 |
| C Header | 8 | 26010 | 9604 | 11788 | 4618 |
| RPM Specfile | 2 | 7992 | 6512 | 0 | 1480 |
| TypeScript | 24 | 8070 | 6463 | 775 | 832 |
| C++ | 9 | 5216 | 4088 | 569 | 559 |
Top language (Rust 76.5%). Generated at .
rust-lang/rust has 3,211,493 total lines, including 2,741,973 code lines, 222,527 comment lines, and 246,993 blank lines.
OctoCounts resolved the public GitHub repository to commit 7189d39d9ce9, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.
This OctoCounts report was generated from main at commit 7189d39d9ce9 on 2026-10-22T21:35:00.754699519+00:00.
Other public repositories with an OctoCounts report, ranked by top language and code size similarity:
Play the growth animation for rust-lang/rust on this page — 2,741,973 code lines across 12 languages, counted by tokei.