# rust-lang/rust SLOC report

> As of 2026-09-22 (commit 6bb1652a020e), rust-lang/rust contains 3,193,917 total lines: 2,729,711 code, 219,032 comments, 245,174 blank, across 8,431 files in 36 languages (top: Rust 76.4%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

rust-lang/rust has 2,729,711 source lines of code out of 3,193,917 total lines across 8,431 files, counted from the main ref at commit 6bb1652a020e by the OctoCounts tokei engine on 2026-09-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 6bb1652a020e, 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.5% of all lines, comments represent 6.9%, and the repository averages 324 code lines per file. Rust accounts for 76.4% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Rust | 6,764 | 2,434,092 | 2,085,762 | 134,253 | 214,077 |
| JSON | 32 | 352,615 | 352,614 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 12 | 39,723 | 37,018 | 404 | 2,301 |
| Shell | 132 | 19,562 | 16,766 | 1,537 | 1,259 |
| JavaScript | 12 | 14,610 | 10,920 | 3,017 | 673 |
| Python | 39 | 12,994 | 9,782 | 1,035 | 2,177 |
| TOML | 323 | 13,504 | 9,677 | 2,073 | 1,754 |
| 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,331 | 4,192 | 575 | 564 |

Top language (Rust 76.4%). Generated at 2026-09-22T21:18:14.424138219+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/6bb1652a020e80cef79332741d89e996d71933c9?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,193,917 total lines, including 2,729,711 code lines, 219,032 comment lines, and 245,174 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 6bb1652a020e, 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 6bb1652a020e on 2026-09-22T21:18:14.424138219+00:00.

## Similar repository reports

- [aptos-labs/aptos-core](https://octocounts.com/github/aptos-labs/aptos-core) — Rust, 1,870,288 code lines
- [nicodunks/mog](https://octocounts.com/github/nicodunks/mog) — Rust, 1,568,608 code lines
- [openinterpreter/openinterpreter](https://octocounts.com/github/openinterpreter/openinterpreter) — Rust, 1,492,495 code lines
- [xai-org/grok-build](https://octocounts.com/github/xai-org/grok-build) — Rust, 1,484,618 code lines
- [warpdotdev/warp](https://octocounts.com/github/warpdotdev/warp) — Rust, 1,470,282 code lines
- [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) — Rust, 1,469,308 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)
