Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 14 hours ago

Rust's v0 mangling scheme in a nutshell

purplesyringa.moe

external-link
message-square
0
fedilink
1
external-link

Rust's v0 mangling scheme in a nutshell

purplesyringa.moe

RSS BotMB to Lobste.rsEnglish · 14 hours ago
message-square
0
fedilink
Functions in binary files need to have unique names, so Rust needs to decide what to call its functions and statics. This format needs to be standardized so that debuggers and profilers can recover the full names (e.g. alloc::vec::Vec instead of just Vec). About a month ago, Rust switched to symbol mangling v0 on nightly. The linked announcement describes some benefits of the new scheme compared to the previous ad-hoc hack: Mangled names of generic functions now include generic parameters. There are almost no opaque hashes, meaning that it’s easier to make a hypothetical alternative Rust compiler produce identical mangled names. Mangled names no longer include characters like $ and., which some platforms don’t support. That’s pretty interesting, but not very deep. I want to highlight some non-obious details that weren’t mentioned in the post.

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 14 users / day
  • 99 users / week
  • 417 users / month
  • 1.29K users / 6 months
  • 2 local subscribers
  • 286 subscribers
  • 9.74K Posts
  • 517 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org