Skip to content

Enable V0 mangling - #1327

Open
Mark Hildebrand (hildebrandmw) wants to merge 1 commit into
mainfrom
mhildebr/mangling
Open

Enable V0 mangling#1327
Mark Hildebrand (hildebrandmw) wants to merge 1 commit into
mainfrom
mhildebr/mangling

Conversation

@hildebrandmw

Copy link
Copy Markdown
Contributor

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-features increasing in size by 3.2%. That said, I would gladly take the increased binary size for being able to actually find specific functions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rustflags setting intended to enable -C symbol-mangling-version=v0 for all builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .cargo/config.toml
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-commenter

Codecov Comments Bot (codecov-commenter) commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.55%. Comparing base (3218478) to head (67c1747).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1327   +/-   ##
=======================================
  Coverage   91.55%   91.55%           
=======================================
  Files         522      522           
  Lines       99541    99541           
=======================================
  Hits        91139    91139           
  Misses       8402     8402           
Flag Coverage Δ
miri 91.55% <ø> (ø)
unittests 91.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants