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

Stable compiler features #1471

Closed
wants to merge 1 commit into from
Closed

Stable compiler features #1471

wants to merge 1 commit into from

Conversation

hauleth
Copy link

@hauleth hauleth commented Jan 22, 2016

No description provided.

@main--
Copy link

main-- commented Jan 22, 2016

With all the open bugs and instabilities surrounding asm!() (there's a lot), I really don't think it's ready for stabilization - even though I'd love to have stable inline asm in Rust.

We should also discuss whether today's asm!() really is the best solution or if something along the lines of RFC #129 or even D would be better. One important point to consider here is that asm() does not support the same set of constraints as gcc. Therefore, we can either:

  • Stick to the LLVM behavior and write docs for that (because I've been unable to find any). Nice because it avoids complexity in rustc. Bad because it will confuse programmers coming from C/C++ and because some constraints might be hard to emulate in Rust code.
  • Emulate gcc and just link to their docs: Nice because many programmers already know this and there's plenty of examples one can just copy-paste with little modifications. Bad because it's a nontrivial extension to the compiler.
  • Do something else (like D does): A lot of work that may or may not pay off. If done right, this could be vastly superior to gcc-style in terms of ergonomics while possibly integrating more nicely with language and compiler than just an opaque blob (lots of handwaving here as I'm not familiar enough with compiler internals to assess this).

Finally, another thing to consider is #1201 which in its current design (I think) depends quite heavily on inline asm - or inline asm done right, for that matter.

@ticki
Copy link
Contributor

ticki commented Jan 22, 2016

I agree with @main-- asm! is in no way ready for stability.

@aturon
Copy link
Member

aturon commented Jan 22, 2016

Thanks for the RFC, @hauleth. However, our basic stability story is not open for change at this time. I'd encourage you to instead focus discussion on the tracking issues to work out a path toward eventual stabilization.

@aturon aturon closed this Jan 22, 2016
@hauleth hauleth deleted the stable-compiler-features branch January 22, 2016 19:23
@hauleth
Copy link
Author

hauleth commented Jan 22, 2016

Maybe asm! stabilisation is too much, but overall idea of "compiler dependant stable feature flags" seems worth reconsideration (like LLVM intrinsics). It is like compiler wide unsafe flag for features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants