# rust-lang/rust SLOC report

> rust-lang/rust: 2,746,357 code lines at commit 96a18bf5ffa2, counted with tokei-14.0.0 on 2026-10-29. Saved result 2e39d7fedbbbf9d43edef4a48e3bfcfbb316724f469448860f386653f8192535.

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.

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.

## Counting rules and retention

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.

## 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,813 | 2,454,054 | 2,101,713 | 136,271 | 216,070 |
| JSON | 32 | 352,628 | 352,627 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 16 | 40,151 | 37,370 | 439 | 2,342 |
| Shell | 133 | 19,694 | 16,865 | 1,558 | 1,271 |
| JavaScript | 12 | 14,667 | 10,975 | 3,018 | 674 |
| TOML | 326 | 13,722 | 9,843 | 2,100 | 1,779 |
| Python | 39 | 13,034 | 9,787 | 1,056 | 2,191 |
| 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,238 | 4,113 | 565 | 560 |
| 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,540 | 0 | 47,632 | 12,908 |
| Plain Text | 144 | 17,147 | 0 | 16,575 | 572 |

Top language: Rust 76.5%. Generated on October 29, 2026. Canonical report: https://octocounts.com/github/rust-lang/rust/commit/96a18bf5ffa2b24f9cf3d1c731a9eb121c1acad9?reportId=2e39d7fedbbbf9d43edef4a48e3bfcfbb316724f469448860f386653f8192535&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/96a18bf5ffa2b24f9cf3d1c731a9eb121c1acad9?reportId=2e39d7fedbbbf9d43edef4a48e3bfcfbb316724f469448860f386653f8192535&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,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.

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

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.

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

This OctoCounts report was generated from main at commit 96a18bf5ffa2 on October 29, 2026.

## 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,420,240 code lines
- [macro-inc/macro](https://octocounts.com/github/macro-inc/macro) — Rust, 3,414,275 code lines
- [LadybirdBrowser/ladybird](https://octocounts.com/github/LadybirdBrowser/ladybird) — Rust, 2,138,401 code lines
- [aptos-labs/aptos-core](https://octocounts.com/github/aptos-labs/aptos-core) — Rust, 1,949,823 code lines
- [trycua/cua](https://octocounts.com/github/trycua/cua) — Rust, 1,915,093 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)
