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

change from unstable cargo feature to RUSTFLAGS #369

Closed
nikomatsakis opened this issue Jun 14, 2017 · 2 comments
Closed

change from unstable cargo feature to RUSTFLAGS #369

nikomatsakis opened this issue Jun 14, 2017 · 2 comments

Comments

@nikomatsakis
Copy link
Member

nikomatsakis commented Jun 14, 2017

So we encountered some problems that people are relying on things gated by "feature=unstable" (e.g., #364). This isn't really surprising. I was thinking that a better approach would be use a cfg flag that is not tied to a feature. Therefore, in order to build Rayon with experimental features, you would have to do:

RUSTFLAGS='--cfg rayon_unstable' cargo build

This flag will propagate to the rayon create, which will then include unstable features. This has the same "infectious" property that Rust nightly builds do: you can't use an unstable feature in your crate without the top-level crate being forced to acknowledge it.

@nikomatsakis
Copy link
Member Author

I implemented this idea idea in #368

@sanmai-NL
Copy link

@nikomatsakis: I read your issue report and the issue you referred to, but I don’t yet understand what the advantage of using a cfg flag is here, over using a Cargo feature. I suppose you implicitly were talking about keeping the rayon-core and rayon in sync. Before I continue, is that correct?

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

No branches or pull requests

2 participants