# rust-lang/rust SLOC report

> rust-lang/rust: 2,741,973 code lines at commit 7189d39d9ce9, counted with tokei-14.0.0 on 2026-10-22. Saved result e4ec5d12fc2d21f12500b769d7c8fed83f6b07837da8c3f1cfdfd780046608e2.

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.

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.

## Repository size insights

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 | 6,804 | 2,449,081 | 2,097,352 | 135,967 | 215,762 |
| JSON | 32 | 352,618 | 352,617 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 16 | 40,151 | 37,370 | 439 | 2,342 |
| Shell | 133 | 19,689 | 16,863 | 1,556 | 1,270 |
| JavaScript | 12 | 14,660 | 10,970 | 3,017 | 673 |
| TOML | 328 | 13,743 | 9,859 | 2,099 | 1,785 |
| Python | 39 | 13,026 | 9,790 | 1,050 | 2,186 |
| C Header | 8 | 26,010 | 9,604 | 11,788 | 4,618 |
| RPM Specfile | 2 | 7,992 | 6,512 | 0 | 1,480 |
| TypeScript | 24 | 8,070 | 6,463 | 775 | 832 |
| C++ | 9 | 5,216 | 4,088 | 569 | 559 |
| CSS | 5 | 4,737 | 3,946 | 384 | 407 |
| GNU Style Assembly | 27 | 3,814 | 3,381 | 104 | 329 |
| Dockerfile | 106 | 3,996 | 3,128 | 221 | 647 |
| Zsh | 2 | 3,052 | 3,036 | 2 | 14 |
| PowerShell | 4 | 2,724 | 2,697 | 7 | 20 |
| Fish | 2 | 2,238 | 2,226 | 6 | 6 |
| HTML | 52 | 2,188 | 1,926 | 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 | 60,527 | 0 | 47,620 | 12,907 |
| Plain Text | 144 | 17,146 | 0 | 16,574 | 572 |

Top language (Rust 76.5%). Generated at 2026-10-22T21:35:00.754699519Z. Canonical report: https://octocounts.com/github/rust-lang/rust/commit/7189d39d9ce936881b8132c6addeaf3e295cd455?reportId=e4ec5d12fc2d21f12500b769d7c8fed83f6b07837da8c3f1cfdfd780046608e2&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/rust-lang/rust/commit/7189d39d9ce936881b8132c6addeaf3e295cd455?reportId=e4ec5d12fc2d21f12500b769d7c8fed83f6b07837da8c3f1cfdfd780046608e2&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does rust-lang/rust have?

rust-lang/rust has 3,211,493 total lines, including 2,741,973 code lines, 222,527 comment lines, and 246,993 blank lines.

### How was the rust-lang/rust line count measured?

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.

### What commit was counted for rust-lang/rust?

This OctoCounts report was generated from main at commit 7189d39d9ce9 on 2026-10-22T21:35:00.754699519Z.

## Similar repository reports

- [makepad/makepad](https://octocounts.com/github/makepad/makepad) — Rust, 2,685,556 code lines
- [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) — Rust, 2,097,021 code lines
- [aptos-labs/aptos-core](https://octocounts.com/github/aptos-labs/aptos-core) — Rust, 1,945,868 code lines
- [LadybirdBrowser/ladybird](https://octocounts.com/github/LadybirdBrowser/ladybird) — Rust, 1,882,362 code lines
- [codewhale-hq/Codewhale](https://octocounts.com/github/codewhale-hq/Codewhale) — Rust, 1,704,023 code lines
- [trycua/cua](https://octocounts.com/github/trycua/cua) — Rust, 1,703,339 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Rust vs Go](https://octocounts.com/compare/rust-vs-go)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Deno vs Node.js](https://octocounts.com/compare/deno-vs-node)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
