|
|
|
|
|
by kimundi
3780 days ago
|
|
The default name mangling of Rust library symbols is already kinda versioned because it includes a hash of the library, so two different versions of a library can coexist at the same time. As far explicitly using the symbol versioning scheme you mentioned, you can do it with an attribute today: https://play.rust-lang.org/?gist=92be155702d53c6411b2&versio... (Disclaimer: I haven't actually compiled this as a dynamic library and checked, but its what that attribute is for, and the names seem to be used verbatim in the ASM output) |
|
It seems as if symbol versioning in Rust is nicer than in C. I'll have to play around with that a little bit.
I'm hoping I never to have to deal with writing version scripts or inline assembly again -- or at least having to write less.