Skip to content

Feature gate extern fn methods #1429

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

Closed
wants to merge 1 commit into from

Conversation

Aatch
Copy link
Contributor

@Aatch Aatch commented Dec 27, 2015

@nagisa
Copy link
Member

nagisa commented Dec 27, 2015

SGTM.

@rphmeier
Copy link

This seems very reasonable, but I'd be interested in seeing the fallout. Are there a lot of bindings to C libraries which use this feature?

@nagisa
Copy link
Member

nagisa commented Dec 27, 2015

I know we have received at least one bug report about this feature in conjunction with no_mangle once our symbol duplication detection has landed.

@RalfJung
Copy link
Member

Doesn't this RFC effectively break all Rust crates that wrap C libraries, e.g. https://crates.io/crates/openssl-sys/ and https://crates.io/crates/libusb-sys/ and many more?

@remram44
Copy link

@RalfJung No it doesn't. This RFC only aim to feature-gate extern methods, not functions.

@RalfJung
Copy link
Member

Oh, I see :)

@nrc nrc added the T-lang Relevant to the language team, which will review and decide on the RFC. label Jan 4, 2016
@nikomatsakis nikomatsakis self-assigned this Jan 7, 2016
@nikomatsakis
Copy link
Contributor

@Aatch do you have an impl? if you can whip one up, I can do a crater run, feels like necessary data before we make a decision one way or the other. But I'm inclined to 👍 here.

@nrc
Copy link
Member

nrc commented Apr 7, 2016

Vaguely related, should rustfmt change extern to extern "C" or vice versa: rust-lang/rustfmt#451

@nrc
Copy link
Member

nrc commented Apr 7, 2016

And +1 for a crater run

@eddyb
Copy link
Member

eddyb commented Apr 8, 2016

This is no longer necessary AFAIK, all methods should be compatible with all ABIs now.

@nikomatsakis
Copy link
Contributor

Hear ye, hear ye! This RFC is now entering final comment period.

I should note that, personally, I'm inclined not to accept, based on @eddyb's comment.

@nikomatsakis nikomatsakis added the final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. label Apr 8, 2016
@nikomatsakis
Copy link
Contributor

After discussion in the @rust-lang/lang meeting today, we've decided not to accept this RFC. There doesn't seem to be any particular semantic concerns about allowing methods to have their own ABI, and the implementation is even working as far as we know, so retroactively feature gating is not necessary. Thanks @Aatch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants