# rust-lang/rust SLOC report

> As of 2026-10-09 (commit 76c90957b7e4), rust-lang/rust contains 3,203,386 total lines: 2,736,198 code, 221,338 comments, 245,850 blank, across 8,463 files in 36 languages (top: Rust 76.5%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

rust-lang/rust has 2,736,198 source lines of code out of 3,203,386 total lines across 8,463 files, counted from the main ref at commit 76c90957b7e4 by the OctoCounts tokei engine on 2026-10-09. 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 76c90957b7e4, 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,787 | 2,441,634 | 2,092,016 | 134,890 | 214,728 |
| JSON | 32 | 352,621 | 352,620 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 13 | 39,810 | 37,101 | 417 | 2,292 |
| Shell | 133 | 19,659 | 16,847 | 1,546 | 1,266 |
| JavaScript | 12 | 14,610 | 10,920 | 3,017 | 673 |
| TOML | 326 | 13,666 | 9,810 | 2,084 | 1,772 |
| Python | 39 | 13,021 | 9,791 | 1,048 | 2,182 |
| C Header | 8 | 26,010 | 9,604 | 11,788 | 4,618 |
| RPM Specfile | 2 | 8,024 | 6,544 | 0 | 1,480 |
| TypeScript | 24 | 8,050 | 6,448 | 771 | 831 |
| C++ | 9 | 5,239 | 4,102 | 573 | 564 |

Top language (Rust 76.5%). Generated at 2026-10-09T13:15:47.113541730+00:00. Canonical report: https://octocounts.com/github/rust-lang/rust

## Reproduce this report

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

## Report FAQ

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

rust-lang/rust has 3,203,386 total lines, including 2,736,198 code lines, 221,338 comment lines, and 245,850 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 76c90957b7e4, 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 76c90957b7e4 on 2026-10-09T13:15:47.113541730+00:00.

## Similar repository reports

- [makepad/makepad](https://octocounts.com/github/makepad/makepad) — Rust, 2,681,431 code lines
- [aptos-labs/aptos-core](https://octocounts.com/github/aptos-labs/aptos-core) — Rust, 1,917,474 code lines
- [LadybirdBrowser/ladybird](https://octocounts.com/github/LadybirdBrowser/ladybird) — Rust, 1,711,025 code lines
- [openinterpreter/openinterpreter](https://octocounts.com/github/openinterpreter/openinterpreter) — Rust, 1,658,969 code lines
- [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) — Rust, 1,657,953 code lines
- [codewhale-hq/Codewhale](https://octocounts.com/github/codewhale-hq/Codewhale) — Rust, 1,633,585 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)
