rust-lang/rust has 2,746,357 source lines of code out of 3,216,511 total lines across 8,493 files, counted with tokei from the main ref at commit 96a18bf5ffa2 on October 29, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
rust-lang/rust: 2,746,357 code lines at commit 96a18bf5ffa2, counted with tokei-14.0.0 on 2026-10-29. Saved result 2e39d7fedbbbf9d43edef4a48e3bfcfbb316724f469448860f386653f8192535.
OctoCounts produced this report by resolving rust-lang/rust to commit 96a18bf5ffa2, downloading the repository source archive, and counting files selected by the effective rules 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; an exact reproduction needs the same commit, engine version, and effective counting rules.
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 | 6813 | 2454054 | 2101713 | 136271 | 216070 |
| JSON | 32 | 352628 | 352627 | 0 | 1 |
| XML | 3 | 158527 | 158436 | 18 | 73 |
| YAML | 16 | 40151 | 37370 | 439 | 2342 |
| Shell | 133 | 19694 | 16865 | 1558 | 1271 |
| JavaScript | 12 | 14667 | 10975 | 3018 | 674 |
| TOML | 326 | 13722 | 9843 | 2100 | 1779 |
| Python | 39 | 13034 | 9787 | 1056 | 2191 |
| C Header | 8 | 26010 | 9604 | 11788 | 4618 |
| RPM Specfile | 2 | 7992 | 6512 | 0 | 1480 |
| TypeScript | 24 | 8070 | 6463 | 775 | 832 |
| C++ | 9 | 5238 | 4113 | 565 | 560 |
| CSS | 5 | 4737 | 3946 | 384 | 407 |
| GNU Style Assembly | 27 | 3814 | 3381 | 104 | 329 |
| Dockerfile | 106 | 3996 | 3128 | 221 | 647 |
| Zsh | 2 | 3052 | 3036 | 2 | 14 |
| PowerShell | 4 | 2724 | 2697 | 7 | 20 |
| Fish | 2 | 2238 | 2226 | 6 | 6 |
| HTML | 52 | 2188 | 1926 | 21 | 241 |
| SVG | 4 | 315 | 311 | 2 | 2 |
| C++ Header | 2 | 476 | 306 | 89 | 81 |
| LD Script | 4 | 363 | 238 | 61 | 64 |
| C | 3 | 301 | 198 | 71 | 32 |
| Julia | 1 | 171 | 141 | 7 | 23 |
| Autoconf | 4 | 195 | 131 | 44 | 20 |
| Nix | 3 | 138 | 116 | 8 | 14 |
| AsciiDoc | 1 | 90 | 77 | 0 | 13 |
| Module-Definition | 1 | 64 | 63 | 0 | 1 |
| XSL | 2 | 58 | 44 | 8 | 6 |
| Emacs Lisp | 1 | 33 | 33 | 0 | 0 |
| CMake | 1 | 28 | 21 | 1 | 6 |
| Batch | 3 | 29 | 16 | 7 | 6 |
| BASH | 1 | 26 | 14 | 11 | 1 |
| Makefile | 1 | 1 | 0 | 1 | 0 |
| Markdown | 702 | 60540 | 0 | 47632 | 12908 |
| Plain Text | 144 | 17147 | 0 | 16575 | 572 |
Top language: Rust 76.5%. Generated on .
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.
Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.
rust-lang/rust has 2,746,357 lines of code, plus 222,850 comment lines and 247,304 blank lines, for 3,216,511 total lines at commit 96a18bf5ffa2 on October 29, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.
OctoCounts resolved the public GitHub repository to commit 96a18bf5ffa2, 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 96a18bf5ffa2 on October 29, 2026.
Play the growth animation for rust-lang/rust on this page — 2,746,357 code lines across 36 languages, counted by tokei.