Enable V0 mangling - #1327
Open
Mark Hildebrand (hildebrandmw) wants to merge 1 commit into
Open
Conversation
Mark Hildebrand (hildebrandmw)
requested review from
a team
and
a lite review from Copilot
August 12, 2026 21:48
Copilot started reviewing on behalf of
Mark Hildebrand (hildebrandmw)
August 12, 2026 21:49
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to enable Rust’s V0 symbol mangling scheme across the workspace to improve the debuggability/inspectability of generated symbols (notably for generic functions), anticipating Rust 1.97 where this becomes the default.
Changes:
- Adds a workspace-level
rustflagssetting intended to enable-C symbol-mangling-version=v0for all builds.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+3
| # V0 becomes the default symbol mangling scheme in Rust 1.97, so this can be removed after upgrading. | ||
| [target.'cfg(all())'] | ||
| rustflags = ["-C", "symbol-mangling-version=v0"] |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1327 +/- ##
=======================================
Coverage 91.55% 91.55%
=======================================
Files 522 522
Lines 99541 99541
=======================================
Hits 91139 91139
Misses 8402 8402
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Harsha Simhadri (harsha-simhadri)
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable the V0 mangling scheme at the workspace level. This is the default in Rust 1.97 and thus this can be reverted when we bump to that toolchain.
The biggest reason to change is that the V0 successfully round-trips generic parameters in function names, making it infinitely easier to inspect assemble for specific methods. The mangled symbols are a bit longer, with an unstripped
cargo build --package diskann-benchmark --release --all-featuresincreasing in size by 3.2%. That said, I would gladly take the increased binary size for being able to actually find specific functions.