codebase map

WHERE THE LINES LIVE.

234,107 lines of source, tests and tooling, counted from the repository when this site was built. Each rectangle's area is proportional to its line count; hover a tile for its numbers.

Tests › Differential samples: 54,934 lines in 856 files (23.5 % of all, 82.1 % of Tests) Differential samples 54,934 Tests › Projects & IL: 4,281 lines in 74 files (1.8 % of all, 6.4 % of Tests) Projects & IL 4,281 Tests › Real-world programs: 3,233 lines in 15 files (1.4 % of all, 4.8 % of Tests) Tests › Conformance corpora: 2,688 lines in 453 files (1.1 % of all, 4.0 % of Tests) Tests › Test scripts: 1,757 lines in 16 files (0.8 % of all, 2.6 % of Tests) Corelib › Crypto & TLS: 14,961 lines in 30 files (6.4 % of all, 23.3 % of Corelib) Crypto & TLS 14,961 Corelib › Networking: 8,859 lines in 19 files (3.8 % of all, 13.8 % of Corelib) Networking 8,859 Corelib › Reflection: 5,959 lines in 22 files (2.5 % of all, 9.3 % of Corelib) Reflection 5,959 Corelib › IO & OS contract: 4,926 lines in 16 files (2.1 % of all, 7.7 % of Corelib) Corelib › Other library members: 4,499 lines in 26 files (1.9 % of all, 7.0 % of Corelib) Corelib › Numbers, dates & math: 4,314 lines in 17 files (1.8 % of all, 6.7 % of Corelib) Corelib › Runtime support: 4,290 lines in 19 files (1.8 % of all, 6.7 % of Corelib) Corelib › Tasks & async: 4,130 lines in 22 files (1.8 % of all, 6.4 % of Corelib) Tasks & async 4,130 Corelib › Strings & text: 2,634 lines in 10 files (1.1 % of all, 4.1 % of Corelib) Corelib › Collections & LINQ: 2,570 lines in 18 files (1.1 % of all, 4.0 % of Corelib) Corelib › Threading: 2,143 lines in 10 files (0.9 % of all, 3.3 % of Corelib) Threading 2,143 Corelib › Globalization contract: 1,835 lines in 10 files (0.8 % of all, 2.9 % of Corelib) Corelib › Text: 1,247 lines in 2 files (0.5 % of all, 1.9 % of Corelib) Text 1,247 Corelib › Serialization: 682 lines in 1 files (0.3 % of all, 1.1 % of Corelib) Corelib › Exceptions & diagnostics: 628 lines in 7 files (0.3 % of all, 1.0 % of Corelib) Corelib › Numerics: 494 lines in 4 files (0.2 % of all, 0.8 % of Corelib) Code generation › Core lowering: 10,781 lines in 40 files (4.6 % of all, 23.8 % of Code generation) Core lowering 10,781 Code generation › Library mapping (intrinsics): 6,177 lines in 12 files (2.6 % of all, 13.6 % of Code generation) Code generation › Reflection & metadata: 5,894 lines in 13 files (2.5 % of all, 13.0 % of Code generation) Code generation › IL front-end lowering: 4,759 lines in 13 files (2.0 % of all, 10.5 % of Code generation) Code generation › Types & layout: 3,879 lines in 13 files (1.7 % of all, 8.6 % of Code generation) Code generation › Generics & dispatch: 3,033 lines in 11 files (1.3 % of all, 6.7 % of Code generation) Code generation › Exceptions & stack traces: 2,847 lines in 5 files (1.2 % of all, 6.3 % of Code generation) Code generation › C# dynamic: 2,715 lines in 6 files (1.2 % of all, 6.0 % of Code generation) C# dynamic 2,715 Code generation › Interop & unsafe code: 2,448 lines in 7 files (1.0 % of all, 5.4 % of Code generation) Code generation › Async & threading: 2,284 lines in 10 files (1.0 % of all, 5.0 % of Code generation) Code generation › Optimization: 541 lines in 3 files (0.2 % of all, 1.2 % of Code generation) Tools, docs & CI › Documentation: 11,328 lines in 87 files (4.8 % of all, 42.9 % of Tools, docs & CI) Documentation 11,328 Tools, docs & CI › Tools: 8,855 lines in 91 files (3.8 % of all, 33.6 % of Tools, docs & CI) Tools 8,855 Tools, docs & CI › Benchmarks: 3,808 lines in 58 files (1.6 % of all, 14.4 % of Tools, docs & CI) Tools, docs & CI › CI workflows: 2,397 lines in 15 files (1.0 % of all, 9.1 % of Tools, docs & CI) C runtime (csrt) › ICU shim (from .NET): 6,653 lines in 30 files (2.8 % of all, 31.8 % of C runtime (csrt)) C runtime (csrt) › Garbage collector: 3,868 lines in 2 files (1.7 % of all, 18.5 % of C runtime (csrt)) Garbage collector 3,868 C runtime (csrt) › Threads & async: 3,792 lines in 3 files (1.6 % of all, 18.1 % of C runtime (csrt)) Threads & async 3,792 C runtime (csrt) › Startup & helpers: 2,276 lines in 8 files (1.0 % of all, 10.9 % of C runtime (csrt)) C runtime (csrt) › Exceptions & unwinding: 1,703 lines in 2 files (0.7 % of all, 8.1 % of C runtime (csrt)) C runtime (csrt) › Types & objects: 1,698 lines in 3 files (0.7 % of all, 8.1 % of C runtime (csrt)) C runtime (csrt) › Strings & console: 528 lines in 3 files (0.2 % of all, 2.5 % of C runtime (csrt)) C runtime (csrt) › Interop & OS: 433 lines in 2 files (0.2 % of all, 2.1 % of C runtime (csrt)) Front ends & driver › Driver & toolchain: 3,339 lines in 13 files (1.4 % of all, 32.3 % of Front ends & driver) Front ends & driver › Roslyn front end: 3,299 lines in 15 files (1.4 % of all, 31.9 % of Front ends & driver) Front ends & driver › IL front end: 1,544 lines in 5 files (0.7 % of all, 14.9 % of Front ends & driver) Front ends & driver › LLVM bindings: 1,168 lines in 7 files (0.5 % of all, 11.3 % of Front ends & driver) Front ends & driver › WebAssembly passes: 547 lines in 3 files (0.2 % of all, 5.3 % of Front ends & driver) Front ends & driver › Types served from .NET IL (lists): 306 lines in 31 files (0.1 % of all, 3.0 % of Front ends & driver) Front ends & driver › MSBuild SDK: 143 lines in 3 files (0.1 % of all, 1.4 % of Front ends & driver) TESTS · 28.6 % CORELIB · 27.4 % CODE GENERATION · 19.4 % TOOLS, DOCS & CI · 11.3 % C RUNTIME (CSRT) · 8.9 % FRONT ENDS & DRIVER · 4.4 %
19.4 %45,358 lines

Code generation

Roslyn CFG and IL to LLVM IR: one partial per feature area

  • Core lowering10,781
  • Library mapping (intrinsics)6,177
  • Reflection & metadata5,894
  • IL front-end lowering4,759
  • Types & layout3,879
  • Generics & dispatch3,033
  • Exceptions & stack traces2,847
  • C# dynamic2,715
  • Interop & unsafe code2,448
  • Async & threading2,284
  • Optimization541
4.4 %10,346 lines

Front ends & driver

C# sources, projects and IL in; linking, LLVM and targets out

  • Driver & toolchain3,339
  • Roslyn front end3,299
  • IL front end1,544
  • LLVM bindings1,168
  • WebAssembly passes547
  • Types served from .NET IL (lists)306
  • MSBuild SDK143
8.9 %20,951 lines

C runtime (csrt)

GC, exception dispatch, threads and OS boundaries in C

  • ICU shim (from .NET)6,653
  • Garbage collector3,868
  • Threads & async3,792
  • Startup & helpers2,276
  • Exceptions & unwinding1,703
  • Types & objects1,698
  • Strings & console528
  • Interop & OS433
27.4 %64,171 lines

Corelib

Library code in C#: BCL types csharpc provides and the contracts the framework IL calls

  • Crypto & TLS14,961
  • Networking8,859
  • Reflection5,959
  • IO & OS contract4,926
  • Other library members4,499
  • Numbers, dates & math4,314
  • Runtime support4,290
  • Tasks & async4,130
  • Strings & text2,634
  • Collections & LINQ2,570
  • Threading2,143
  • Globalization contract1,835
  • Text1,247
  • Serialization682
  • Exceptions & diagnostics628
  • Numerics494
28.6 %66,893 lines

Tests

Programs whose expected output is recorded from real .NET

  • Differential samples54,934
  • Projects & IL4,281
  • Real-world programs3,233
  • Conformance corpora2,688
  • Test scripts1,757
11.3 %26,388 lines

Tools, docs & CI

The slicer, fuzzers, bootstrap, benchmarks, these docs and the workflows

  • Documentation11,328
  • Tools8,855
  • Benchmarks3,808
  • CI workflows2,397

method

HOW THIS IS COUNTED.

Physical lines of every .cs, .c/.h, script, workflow and Markdown file, with build output skipped. Each file goes to one responsibility by its directory and, inside the code generator, the C runtime and the corelib, by its file name: the code generator is one FunctionCodeGen.<Feature>.cs partial per feature area, so the file name says what it lowers. The ICU shim is .NET's own globalization native code, carried so cultures work without .NET installed. Generated IL slices and recorded .expected outputs are not counted. The rules live in docs/src/lib/codebase.ts.