# rust-lang/rust SLOC report

> rust-lang/rust: 2,755,673 code lines at commit 4de190d26178, counted with tokei-15.0.0 on 2026-11-16. Saved result b803a49ee4bd9afd36cd2b79e5750158ee2a6e39b601ccb6cfc5e17849d96624.

rust-lang/rust has 2,755,673 source lines of code out of 3,227,974 total lines across 8,525 files, counted with tokei from the main ref at commit 4de190d26178 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving rust-lang/rust to commit 4de190d26178, 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.

## Counting rules and retention

rust-lang/rust: tokei-15.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.

## 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.6% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Rust | 6,835 | 2,464,770 | 2,110,700 | 137,006 | 217,064 |
| JSON | 32 | 352,641 | 352,640 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 17 | 40,198 | 37,404 | 445 | 2,349 |
| Shell | 134 | 19,670 | 16,861 | 1,533 | 1,276 |
| JavaScript | 12 | 14,734 | 11,024 | 3,026 | 684 |
| TOML | 331 | 13,967 | 10,047 | 2,102 | 1,818 |
| Python | 39 | 13,087 | 9,828 | 1,063 | 2,196 |
| C Header | 8 | 26,010 | 9,604 | 11,788 | 4,618 |
| RPM Specfile | 2 | 7,992 | 6,512 | 0 | 1,480 |
| TypeScript | 24 | 8,084 | 6,468 | 783 | 833 |
| C++ | 9 | 5,144 | 4,032 | 568 | 544 |
| CSS | 5 | 4,806 | 4,000 | 397 | 409 |
| GNU Style Assembly | 27 | 3,814 | 3,381 | 104 | 329 |
| Dockerfile | 106 | 4,001 | 3,133 | 221 | 647 |
| Zsh | 2 | 3,052 | 3,036 | 2 | 14 |
| PowerShell | 5 | 2,748 | 2,711 | 14 | 23 |
| Fish | 2 | 2,238 | 2,226 | 6 | 6 |
| HTML | 52 | 2,189 | 1,927 | 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 | 188 | 125 | 43 | 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 | 704 | 60,874 | 0 | 47,888 | 12,986 |
| Plain Text | 144 | 17,147 | 0 | 16,575 | 572 |

Top language: Rust 76.6%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/rust-lang/rust/commit/4de190d26178bb0c22ed4c005679bb621f7e9c18?reportId=b803a49ee4bd9afd36cd2b79e5750158ee2a6e39b601ccb6cfc5e17849d96624&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/4de190d26178bb0c22ed4c005679bb621f7e9c18?reportId=b803a49ee4bd9afd36cd2b79e5750158ee2a6e39b601ccb6cfc5e17849d96624&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 2,755,673 lines of code, plus 223,869 comment lines and 248,432 blank lines, for 3,227,974 total lines at commit 4de190d26178 on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

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

OctoCounts resolved the public GitHub repository to commit 4de190d26178, 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 4de190d26178 on November 16, 2026.

## Similar repository reports

- [horizon-rust/horizon](https://octocounts.com/github/horizon-rust/horizon) — Rust, 2,663,980 code lines
- [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) — Rust, 2,638,181 code lines
- [tangency-labs/solidcraft](https://octocounts.com/github/tangency-labs/solidcraft) — Rust, 2,634,963 code lines
- [wecode-ai/Wegent](https://octocounts.com/github/wecode-ai/Wegent) — Rust, 2,627,586 code lines
- [indexable-inc/blaze](https://octocounts.com/github/indexable-inc/blaze) — Rust, 3,126,406 code lines
- [LadybirdBrowser/ladybird](https://octocounts.com/github/LadybirdBrowser/ladybird) — Rust, 2,327,204 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)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [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)
- [All OctoCounts guides](https://octocounts.com/docs)
