Anonymous
7/12/2025, 5:55:09 PM
No.105882403
>>105881875
>>105881891
cloc that has been run on Firefox source code:
>C++: ~5.55M LOC
>C: ~2.79M LOC
>C/C++ headers: ~3.23M LOC
>Rust: ~3.8M LOC
But, there is a twist. If third_party/rust/ is deleted:
>Rust: ~0.365M LOC
Less than 10% of Rust LOC in Firefox is outside third_party/rust/ .
What Rust source code is hiding in there?
Some of the folders with the most Rust LOC might be:
>windows-sys
>linux-raw-sys
>winapi
>tokio
None of these Rust crates are specific to Mozilla or Firefox or (as far as I can tell) developed by them.
So it is a reasonable guess that Rust code in the Firefox codebase, if one excludes vendored non-Mozilla Rust projects, might have LOC count at most 5%-10% of the C/C++ LOC count.
Also, when I looked at the recent commits in Firefox, I saw a bunch of C++ commits, but not any Rust commits. Though maybe I just overlooked them.
>>105881891
cloc that has been run on Firefox source code:
>C++: ~5.55M LOC
>C: ~2.79M LOC
>C/C++ headers: ~3.23M LOC
>Rust: ~3.8M LOC
But, there is a twist. If third_party/rust/ is deleted:
>Rust: ~0.365M LOC
Less than 10% of Rust LOC in Firefox is outside third_party/rust/ .
What Rust source code is hiding in there?
Some of the folders with the most Rust LOC might be:
>windows-sys
>linux-raw-sys
>winapi
>tokio
None of these Rust crates are specific to Mozilla or Firefox or (as far as I can tell) developed by them.
So it is a reasonable guess that Rust code in the Firefox codebase, if one excludes vendored non-Mozilla Rust projects, might have LOC count at most 5%-10% of the C/C++ LOC count.
Also, when I looked at the recent commits in Firefox, I saw a bunch of C++ commits, but not any Rust commits. Though maybe I just overlooked them.