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

Check for use std:: statements in crate itself #10

Closed
hobofan opened this issue Jan 4, 2019 · 2 comments
Closed

Check for use std:: statements in crate itself #10

hobofan opened this issue Jan 4, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@hobofan
Copy link
Owner

hobofan commented Jan 4, 2019

Just adding #![no_std] to a crate is not enough. Especially in the main crate, we should also scan for use std:: statements and report those. Optimally the help message should also suggest switching from std:: to core:: if possible.

See also this Reddit thread and this commit, of strength_reduce adding no_std support.

@hobofan
Copy link
Owner Author

hobofan commented Jan 16, 2019

One special case would be going from std::f32 to core::f32, and similar switches of number types. As encountered in vislyhq/stretch#11, this requires using libm which we then should suggest, as core is currently lacking support for maths.

@hobofan
Copy link
Owner Author

hobofan commented Jan 17, 2019

#12 added a primitive version of this check

Stuff that's still to do there:

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

No branches or pull requests

1 participant