Lines by C vs Rust
Lines by C vs Rust
Posted Feb 9, 2026 21:23 UTC (Mon) by daroc (editor, #160859)In reply to: Lines by C vs Rust by jhoblitt
Parent article: Development statistics for 6.19
The 6.19 release had 19,222,910 non-blank non-comment lines of C, and 89,286 of Rust. That's a ratio of ~215. In 6.18, that was 19,041,645 to 36,077 for a ratio of ~528. So C added ~181,000 lines and Rust added ~53,000 lines.
Most of that would have been the addition of the syn crate, as Jon noted in the article. That crate being vendored in the kernel source code represents the adoption of a big chunk of pre-written code from the Rust ecosystem, and not really normal development activity.
Going back to 6.17, there were 18,951,316 lines of C and 23,163 lines of Rust, for a ratio of ~818. Which was higher than I was expecting, actually. Now you've got me curious about the historical trend as well. I'm going to see about writing up a script to scrape some numbers into a spreadsheet ...
(Also: Rust is the 7th most popular language in the kernel right now, after C, header files, assembly, JSON, reStructuredText, YAML, shell, and plain text. It edged ahead of Python, make, SVGs, and Perl in this last release!)
