this post was submitted on 20 Nov 2025
23 points (100.0% liked)

Rust

7501 readers
45 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
top 1 comments
sorted by: hot top controversial new old
[–] INeedMana@piefed.zip 1 points 1 hour ago

It would be cool if there was an option to tell compiler how to name the object in the end. A strength of C mangling (or rather lack of it) is that you can take the object file and know beforehand the names. With mangling that will always depend on the version of the compiler. In practice, while mangled names are kind of stable, mangled C++ names are not really reliable in the real world

If we could tell the compiler "in the end name/alias this function as prefix_or_name_of_cargo_my_super_duper_function", we could then easily call it in an assembler/pure C/etc
It could even be a separate wrapper. only for exposing stable function names in the object files