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

Conventions around no_std #23

Closed
dtolnay opened this issue Apr 4, 2017 · 7 comments
Closed

Conventions around no_std #23

dtolnay opened this issue Apr 4, 2017 · 7 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented Apr 4, 2017

No description provided.

@dtolnay
Copy link
Member Author

dtolnay commented May 24, 2017

Including what the std feature should be called if there is one. rust-lang/log#176

@Kixunil
Copy link

Kixunil commented May 31, 2017

I'd prefer with_std, since simple std might suggest that it's some sort of "standard feature". Or maybe with_std_lib to be very clear from first glance.

Alternatively use use instead of with. :) I'm not a native speaker so I'm not sure which would be more appropriate.

@dtolnay
Copy link
Member Author

dtolnay commented May 31, 2017

I strongly prefer std over with_std or use_std.

It aligns better with the optional dependency / implicit feature mechanism. If you have an optional dependency on serde, the implicit feature is called serde not with_serde or use_serde.

@Kixunil
Copy link

Kixunil commented May 31, 2017

Ah, good point, I completely forgot about that.

Bit OT idea: provide a way to create documentation for features? e.g.

## Enables features from std crate
std = []

Maybe with default doc string for implicit features? That would seem to me like the best of both worlds.

@tarcieri
Copy link

I've generally gone with "std" for my own projects, however I've seen a decent amount of "use_std"

@dtolnay
Copy link
Member Author

dtolnay commented Jul 9, 2017

Added in a15e953.

@dtolnay dtolnay closed this as completed Jul 9, 2017
@Kixunil
Copy link

Kixunil commented Jul 10, 2017

I guess I'll have to rewrite some stuff but I agree with the decision.

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

No branches or pull requests

3 participants