# rust-lang/book SLOC report

> As of 2026-10-13 (commit 33f1af40cc44), rust-lang/book contains 94,518 total lines: 21,778 code, 54,170 comments, 18,570 blank, across 2,023 files in 10 languages (top: Rust 62.9%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

rust-lang/book has 21,778 source lines of code out of 94,518 total lines across 2,023 files, counted from the 33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 ref at commit 33f1af40cc44 by the OctoCounts tokei engine on 2026-10-13. The report is cached by commit, tokei version, and analysis options, reproduction requires the same commit, engine version, and effective counting rules. Unknown rules in older reports prevent exact reproduction.

OctoCounts produced this report by resolving rust-lang/book to commit 33f1af40cc44, 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, exact reproduction requires the same commit, engine version, and effective counting rules. Older reports with unknown rules cannot promise exact reproduction.

## Counting rules and retention

rust-lang/book: 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 medium-sized codebase by counted code lines. Code represents 23.0% of all lines, comments represent 57.3%, and the repository averages 11 code lines per file. Rust accounts for 62.9% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Rust | 663 | 17,855 | 13,698 | 1,263 | 2,894 |
| SVG | 47 | 3,989 | 3,602 | 387 | 0 |
| TOML | 589 | 3,849 | 3,130 | 66 | 653 |
| HTML | 52 | 572 | 572 | 0 | 0 |
| XSL | 1 | 464 | 394 | 9 | 61 |
| Shell | 9 | 349 | 171 | 108 | 70 |
| CSS | 5 | 130 | 106 | 10 | 14 |
| JavaScript | 2 | 153 | 105 | 22 | 26 |
| Markdown | 477 | 64,125 | 0 | 49,583 | 14,542 |
| Plain Text | 178 | 3,032 | 0 | 2,722 | 310 |

Top language (Rust 62.9%). Generated at 2026-10-13T00:52:28.948416684+00:00. Canonical report: https://octocounts.com/github/rust-lang/book

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/rust-lang/book/commit/33f1af40cc44dde7e3e892f7a508e6f427d2cbc6?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&reportId=75bee9cc3069e0e7704891c6177b078774d2d3c055bb1d5e101fbbc398d92152).

## Report FAQ

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

rust-lang/book has 94,518 total lines, including 21,778 code lines, 54,170 comment lines, and 18,570 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 33f1af40cc44, 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/book?

This OctoCounts report was generated from 33f1af40cc44dde7e3e892f7a508e6f427d2cbc6 at commit 33f1af40cc44 on 2026-10-13T00:52:28.948416684+00:00.

## Similar repository reports

- [rust-man-org/rustman](https://octocounts.com/github/rust-man-org/rustman) — Rust, 21,635 code lines
- [gitduk/ccs](https://octocounts.com/github/gitduk/ccs) — Rust, 21,949 code lines
- [crazykun/LaterScreen](https://octocounts.com/github/crazykun/LaterScreen) — Rust, 21,526 code lines
- [foyer-rs/foyer](https://octocounts.com/github/foyer-rs/foyer) — Rust, 22,037 code lines
- [tsirysndr/smolsonic](https://octocounts.com/github/tsirysndr/smolsonic) — Rust, 21,223 code lines
- [notkisk/book](https://octocounts.com/github/notkisk/book) — Rust, 21,095 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)
