# apple/darwin-xnu SLOC report

> As of 2026-10-18 (commit 2ff845c2e033), apple/darwin-xnu contains 1,773,145 total lines: 1,170,923 code, 384,873 comments, 217,349 blank, across 3,307 files in 24 languages (top: C 68.3%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

apple/darwin-xnu has 1,170,923 source lines of code out of 1,773,145 total lines across 3,307 files, counted from the 2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32 ref at commit 2ff845c2e033 by the OctoCounts tokei engine on 2026-10-18. 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 apple/darwin-xnu to commit 2ff845c2e033, 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 66.0% of all lines, comments represent 21.7%, and the repository averages 354 code lines per file. C accounts for 68.3% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 1,020 | 1,166,698 | 800,090 | 219,502 | 147,106 |
| C Header | 1,575 | 375,735 | 194,819 | 140,723 | 40,193 |
| C++ | 105 | 121,998 | 90,848 | 13,147 | 18,003 |
| Python | 63 | 33,868 | 28,603 | 1,121 | 4,144 |
| HTML | 256 | 19,690 | 19,471 | 0 | 219 |
| GNU Style Assembly | 82 | 27,234 | 16,063 | 7,963 | 3,208 |
| Makefile | 136 | 7,234 | 5,353 | 286 | 1,595 |
| XML | 1 | 6,153 | 4,966 | 2 | 1,185 |
| Happy | 3 | 2,452 | 2,132 | 0 | 320 |
| Shell | 18 | 2,515 | 2,026 | 289 | 200 |
| D | 18 | 2,415 | 1,819 | 420 | 176 |
| Module-Definition | 1 | 1,075 | 903 | 0 | 172 |

Top language (C 68.3%). Generated at 2026-10-18T03:15:24.297678566+00:00. Canonical report: https://octocounts.com/github/apple/darwin-xnu

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/apple/darwin-xnu/commit/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32?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=f20503d8d4d8196a2b6871f032f5f3424e7dcf316ca5c699258c000c7c8d96b5).

## Report FAQ

### How many lines of code does apple/darwin-xnu have?

apple/darwin-xnu has 1,773,145 total lines, including 1,170,923 code lines, 384,873 comment lines, and 217,349 blank lines.

### How was the apple/darwin-xnu line count measured?

OctoCounts resolved the public GitHub repository to commit 2ff845c2e033, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for apple/darwin-xnu?

This OctoCounts report was generated from 2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32 at commit 2ff845c2e033 on 2026-10-18T03:15:24.297678566+00:00.

## Similar repository reports

- [Kitware/CMake](https://octocounts.com/github/Kitware/CMake) — C, 1,279,596 code lines
- [ChefKissInc/Inferno](https://octocounts.com/github/ChefKissInc/Inferno) — C, 1,055,094 code lines
- [systemd/systemd](https://octocounts.com/github/systemd/systemd) — C, 1,017,551 code lines
- [ctrl-cheeb-del/pokeheartgold](https://octocounts.com/github/ctrl-cheeb-del/pokeheartgold) — C, 1,358,770 code lines
- [SanjeevBashyal/OpenFOAM](https://octocounts.com/github/SanjeevBashyal/OpenFOAM) — C, 1,371,094 code lines
- [qemu/qemu](https://octocounts.com/github/qemu/qemu) — C, 1,376,643 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)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [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)
