I think it would be useful to support a no_std = true
flag in Cargo.toml, or a similar flag that indicates a crate has a #![no_std]
compatible mode.
I don’t think this flag needs to have any affect on the build process, or to replace e.g. having an optional std
feature enabled by-default (perhaps it could, but consider that a non-goal for now).
Instead, I think a no_std = true
flag would be useful for the following reasons:
- Visually displaying a “no_std compatible” indication on a crate’s page on https://crates.io
- Enabling https://crates.io search to filter by packages that support no_std
- cargo could warn if any of your dependencies do not have this flag (clearly there’d be a lot of false positives at first, but eventually it could be quite useful)
Has this been suggested before?