Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement per-symbol and per-crate versioned-API support #456

Closed
graydon opened this issue Jun 8, 2011 · 10 comments
Closed

Implement per-symbol and per-crate versioned-API support #456

graydon opened this issue Jun 8, 2011 · 10 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@graydon
Copy link
Contributor

graydon commented Jun 8, 2011

Currently we have very weak support for user-meaningful version numbers; a per-crate version number that is possibly mangled into the crate compilation name, but nothing else. Ideally we'd be using a symbol-versioning approach similar to the GNU-style @@vers stuff, outlined in the latter parts of https://mail.mozilla.org/pipermail/rust-dev/2010-December/000164.html and supporting multiple versioned-API exports from a single crate. Lots of work to do here.

@brson
Copy link
Contributor

brson commented Apr 8, 2012

The situation is a lot better now and we can do some cool things with versioned crates (see the "crateresolve" tests). #2166 is one minor remaining issue.

@bstrie
Copy link
Contributor

bstrie commented Apr 10, 2013

AFAIK Rust does mangle symbols according to the versioning info found in crate attributes. Can this be closed in favor of opening more specific bugs on whatever issues remain?

@pcwalton
Copy link
Contributor

I don't believe this is backwards incompatible, renominating.

@graydon
Copy link
Contributor Author

graydon commented May 30, 2013

just a bug, removing milestone/nomination.

@catamorphism
Copy link
Contributor

Cleared assignee. Nothing to add otherwise.

@mathstuf
Copy link
Contributor

mathstuf commented Apr 3, 2014

It would be nice to have something like:

#[symver="MYLIB_1_0"]
fn myfun(); // Accessible so that old binaries still work due to
            // an ABI change, but not through new compilations.
#[symver=default] // Defined at the crate level.
fn myfun(); // What is compiled against and put into the linker with
            // the default symbol version (defined at the crate level).
            // This version may have different semantics, but older
            // versions would be supportable without recompiles.

The #[symver] could be placed at any of the module, struct, impl, fn, or crate level and would be inherited. It probably doesn't make sense on traits though. It'd be nice to see a new language have support for much better ABI compatibility support out-of-the-box (out-of-the-crate?).

@emberian
Copy link
Member

Nominating for closure. ABI versioning and stability itself is far off, and we already include crate version in the symbols.

@sinistersnare
Copy link
Contributor

Does it being far off make this a non-issue? If we close this then it would be harder to find later, when we might want to look into this; whats the point of closing issues when they are not solved?

@emberian
Copy link
Member

We have 1,584 open issues, and many of them aren't really actionable. If we want this, someone should write a detailed RFC. There's not really any valuable information in this issue.

@mathstuf
Copy link
Contributor

And how many closed issues are there that would make it easy to find again? Could a tag be applied saying it should get an RFC? Or make a backlog tag (though github really needs a "not this tag" filter for that to work).

@brson brson closed this as completed Jun 19, 2014
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Share the host's `target` directory for tests
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this issue Mar 1, 2024
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Initial hello world for RMC documentation

* copyright line to our new toml file

* fix nits, add new useful readme for documentation development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

8 participants