PDB symbol census for "Where Rust actually is in Windows 11": Rust vs C++ by contributing object file, from Microsoft public symbols (per-PDB detail in the symbols/ folder; script symbols/census.py) ============================================================================== Tooling: llvm-pdbutil 21.1.4 (dump -publics/-globals/-modules/-symbols/-section-contribs), llvm-cxxfilt 21.1.4 for Rust legacy/v0 names, dbghelp UnDecorateSymbolName for MSVC readings. All PDB GUIDs match the CodeView records of the installed binaries (checked with llvm-readobj). How to read the numbers - Public PDBs carry public (external) symbols plus, in these eight, S_LPROC32 records for local functions with their code sizes, but no inlined functions, no types, no line info. Every count is a lower bound. - Rust in these binaries is compiled with LTO into ONE codegen unit (one *.rcgu.o module). Nearly all Rust functions are therefore internal symbols: they never reach the publics table and are NOT _ZN/_R mangled in the PDB. Counting Rust by mangled publics alone finds almost nothing (DWriteCore 2.1.1: 0 of 8,424). In these LTO'd user-mode binaries the only Rust-mangled publics are #[link_section] statics (ETW EVENT_METADATA, TLS callbacks). This does NOT generalise: win32kbase_rs.sys, which exports a plain-C table rather than linking a staticlib into a C++ host, has 177 Rust-v0-mangled function publics (see driver/symbols-win32kbase_rs.txt). - Language is therefore attributed by contributing OBJECT FILE: the linker's section-contribution table maps every attributed code byte and the symbol addresses it covers to the module (.rcgu.o = rustc; .obj = MSVC C/C++; CRT/STL and import-thunk objects separated). This gives both a function count and a code-byte comparison. - 'Functions' = distinct named code addresses. MSVC emits EH funclets (dtor$N, catch$N) as separate local functions, which inflates C++ counts; they are reported so they can be subtracted. - Rust crate attribution uses the root path segment of rustc's readable MSVC debuginfo names (impl blocks appear under the crate that contains the impl; std generics instantiated for first-party types count under std). Headline numbers * DWriteCore.dll [DWriteCore.pdb 9DA72605 (Windows App SDK 1.6.1)] publics 6,479: Rust-mangled 2 (0.0%), MSVC C++ 5,554 (85.7%), plain/other 923 named functions 6,966: Rust 1,356 (19.5%), C/C++ 5,252 (75.4%; 1,295 are EH funclets), CRT/STL 326, other 32 code bytes 1,868,488 (of .text 1,894,009): Rust 1,081,273 (57.9%), C/C++ 746,148 (39.9%), CRT/STL 40,875 (2.2%), other 192 Rust crates: 34 (stdlib 6, third-party 4, first-party 24); top first-party: api_impl 227, truetype 164, shaping 109, otls 94, layout 68, unicode_analysis 26 * DWriteCore.dll [DWriteCore.pdb 92A5ED42 (Windows App SDK 2.1.1)] publics 8,424: Rust-mangled 0 (0.0%), MSVC C++ 7,369 (87.5%), plain/other 1,055 named functions 6,708: Rust 1,274 (19.0%), C/C++ 5,086 (75.8%; 1,219 are EH funclets), CRT/STL 314, other 34 code bytes 1,913,201 (of .text 1,938,833): Rust 1,108,273 (57.9%), C/C++ 766,838 (40.1%), CRT/STL 37,886 (2.0%), other 204 Rust crates: 36 (stdlib 5, third-party 8, first-party 23); top first-party: dwrite 207, truetype 163, shaping 108, otls 94, layout 59, unicode_analysis 25 * DWrite.dll [DWrite.pdb 4E75EC72 (System32 DWrite.dll, negative control)] publics 8,313: Rust-mangled 0 (0.0%), MSVC C++ 7,026 (84.5%), plain/other 1,287 named functions 8,475: Rust 0 (0.0%), C/C++ 8,278 (97.7%; 2,254 are EH funclets), CRT/STL 87, other 110 code bytes 1,577,216 (of .text 1,648,668): Rust 0 (0.0%), C/C++ 1,567,629 (99.4%), CRT/STL 6,859 (0.4%), other 2,728 * sudo.exe [sudo.pdb 0ECA8348] publics 642: Rust-mangled 6 (0.9%), MSVC C++ 174 (27.1%), plain/other 462 named functions 923: Rust 740 (80.2%), C/C++ 8 (0.9%; 0 are EH funclets), CRT/STL 137, other 38 code bytes 640,659 (of .text 646,848): Rust 622,778 (97.2%), C/C++ 502 (0.1%), CRT/STL 17,151 (2.7%), other 228 Rust crates: 21 (stdlib 4, third-party 14, first-party 3); top first-party: sudo 31, win32resources 1, sudo_events 1 * UdiApiClient.dll [udiapi.pdb 400633DF] publics 1,368: Rust-mangled 27 (2.0%), MSVC C++ 712 (52.0%), plain/other 629 named functions 821: Rust 400 (48.7%), C/C++ 0 (0.0%; 0 are EH funclets), CRT/STL 421, other 0 code bytes 1,558,542 (of .text 1,570,153): Rust 1,499,709 (96.2%), C/C++ 0 (0.0%), CRT/STL 58,690 (3.8%), other 143 Rust crates: 5 (stdlib 5, third-party 0, first-party 0); top first-party: * CloudRecoveryDownloadTool.dll [cloudrecoverydownloadtool.pdb 5D5FD7D7] publics 1,442: Rust-mangled 25 (1.7%), MSVC C++ 696 (48.3%), plain/other 721 named functions 862: Rust 429 (49.8%), C/C++ 0 (0.0%; 0 are EH funclets), CRT/STL 414, other 19 code bytes 1,685,909 (of .text 1,698,288): Rust 1,629,027 (96.6%), C/C++ 0 (0.0%), CRT/STL 56,768 (3.4%), other 114 Rust crates: 6 (stdlib 6, third-party 0, first-party 0); top first-party: * Narrator.exe [Narrator.pdb 93804859] publics 8,077: Rust-mangled 0 (0.0%), MSVC C++ 6,360 (78.7%), plain/other 1,717 named functions 4,899: Rust 0 (0.0%), C/C++ 4,574 (93.4%; 1,122 are EH funclets), CRT/STL 77, other 248 code bytes 613,457 (of .text 654,211): Rust 0 (0.0%), C/C++ 606,324 (98.8%), CRT/STL 5,196 (0.8%), other 1,937 * SRH.dll [SRH.pdb B5F9A339 (System32 SRH.dll, Narrator screen reader host)] publics 40,638: Rust-mangled 0 (0.0%), MSVC C++ 36,842 (90.7%), plain/other 3,796 named functions 31,787: Rust 0 (0.0%), C/C++ 31,420 (98.8%; 7,734 are EH funclets), CRT/STL 115, other 252 code bytes 4,167,763 (of .text 4,437,888): Rust 0 (0.0%), C/C++ 4,150,180 (99.6%), CRT/STL 10,789 (0.3%), other 6,794 Narrator and MathCAT (see narrator-symbols-math.txt) - Narrator.pdb: 8,077 publics, 3,316 local-function records, 0 Rust; 0 names mention math/MathCAT/MathML. - SRH.pdb (SRH.dll, the screen reader host that Narrator.exe loads at run time; the string 'SRH.DLL' is in Narrator.exe): 40,638 publics, 38,811 local-function records, 0 Rust; 24 names mention math (MathUtils::IsAtMathBoundary, Math::Sign, a MathBoundaryCheck test) but none mention MathCAT, MathML or the MathCAT C API. - NarratorMCAT.dll lives in C:\Windows\System32\NarratorMCAT\ (not System32 itself). Its CodeView record names libmathcat_c-.pdb, i.e. it is MathCAT's own C-API crate compiled by cargo, and it carries Rust std source paths; its exports are exactly the MathCAT C API (SetRulesDir, SetMathML, GetSpokenText, GetBraille, DoNavigateKeyPress, ...). Its PDB is not on the public symbol server. - Neither Narrator.exe nor SRH.dll contains the strings 'NarratorMCAT', 'MathCAT' or any MathCAT export name. SRH.dll DOES embed the names of the plug-in DLLs it loads through DllLoader::LoadDll + SignedDllValidator (brlapi.dll, liblouis.dll, Magnification.dll, Microsoft.CognitiveServices.Speech.core.dll), so a NarratorMCAT.dll loaded the same way would show up; it does not. The disk-wide byte scan found no other PE file naming NarratorMCAT or MathCAT; the only export-name hits outside the DLL are four SetMathML strings in WinUIEdit.dll and Microsoft.UI.Text.winmd, which are RichEdit's own math API and unrelated (see narrator-mathcat-static.txt). So the public symbols and strings do NOT reveal the loading path in this build; they do not establish a specific LoadLibrary/GetProcAddress bridge. What the PDBs do show: Narrator.exe -> SRH.dll (string 'SRH.DLL' in Narrator.exe, LoadLibraryExW import); SRH.dll has MathUtils::IsAtMathBoundary (UIA text-range math boundary detection behind WIL feature flags) and the empty mathprocessor.obj; MathCAT itself is a separate Rust DLL (MathCAT 0.7.0 / MathCATForC 0.7.0 per REVISION.txt) with its rules directory beside it. See dwritecore-symbol-diff.txt, dwrite-negative-control.txt, narrator-symbols-math.txt, verification.txt, crates-.txt, code-bytes-.txt and functions-.tsv for detail.