-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Prefer core and alloc over std where possible #6370
Copy link
Copy link
Closed
Labels
A-Cross-CuttingImpacts the entire engineImpacts the entire engineC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.
Metadata
Metadata
Assignees
Labels
A-Cross-CuttingImpacts the entire engineImpacts the entire engineC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or changeX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.
What problem does this solve or what need does it fill?
Some less common platforms (e.g. Nintendo Switch, and likely other consoles), do not support the full Rust standard library.
Bevy uses a number of features from the standard library, but it's unclear exactly which parts need to be disabled (or replaced) in order to achieve these ports.
What solution would you like?
Add and follow the three lints listed in rust-lang/rust-clippy#9103.
This will have no effect on existing platforms (these are just re-exports), but will make it much clearer which crates (and features within crates) are
no_stdcompatible.We should enable these lints at the level of each crate in their lib.rs, in order to make the dev experience less frustrating due to desyncs with CI.
What alternative(s) have you considered?
Obviously, console devs can simply make these changes in their own fork. However, making this change comes at very little cost, and reduces the frustration of keeping forks synchronized.
Additional context
See this thread for discussion about no_std requirements for the official Switch target.