# rust-lang/rust SLOC report

> As of 2026-09-02 (commit 59dabe56f7b7), rust-lang/rust contains 3,183,828 total lines: 2,722,001 code, 217,821 comments, 244,006 blank, across 8,408 files in 36 languages (top: Rust 76.4%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving rust-lang/rust to commit 59dabe56f7b7, 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.8%, 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,737 | 2,425,325 | 2,079,000 | 133,206 | 213,119 |
| JSON | 32 | 352,613 | 352,612 | 0 | 1 |
| XML | 3 | 158,527 | 158,436 | 18 | 73 |
| YAML | 12 | 39,712 | 37,010 | 400 | 2,302 |
| Shell | 135 | 19,761 | 16,923 | 1,550 | 1,288 |
| JavaScript | 12 | 14,610 | 10,920 | 3,017 | 673 |
| C Header | 8 | 26,007 | 9,601 | 11,788 | 4,618 |
| TOML | 319 | 13,365 | 9,574 | 2,053 | 1,738 |
| Python | 34 | 12,124 | 9,167 | 967 | 1,990 |
| RPM Specfile | 2 | 7,992 | 6,512 | 0 | 1,480 |
| TypeScript | 24 | 8,050 | 6,448 | 771 | 831 |
| CSS | 5 | 4,717 | 3,934 | 378 | 405 |

Top language (Rust 76.4%). Generated at 2026-09-02T16:33:49.454654682+00:00. Canonical report: https://octocounts.com/github/rust-lang/rust

## Report FAQ

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

rust-lang/rust has 3,183,828 total lines, including 2,722,001 code lines, 217,821 comment lines, and 244,006 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 59dabe56f7b7, 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 59dabe56f7b7 on 2026-09-02T16:33:49.454654682+00:00.

## Similar repository reports

- [microsoft/windows-rs](https://octocounts.com/github/microsoft/windows-rs) — Rust, 1,942,062 code lines
- [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) — Rust, 1,457,654 code lines
- [aptos-labs/aptos-core](https://octocounts.com/github/aptos-labs/aptos-core) — Rust, 1,439,996 code lines
- [zed-industries/zed](https://octocounts.com/github/zed-industries/zed) — Rust, 1,368,513 code lines
- [openai/codex](https://octocounts.com/github/openai/codex) — Rust, 1,236,363 code lines
- [paritytech/polkadot-sdk](https://octocounts.com/github/paritytech/polkadot-sdk) — Rust, 1,192,097 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)
- [OctoCounts API docs](https://octocounts.com/docs/api)
