Add compile-check-no-std Command to CI Tool#15843
Merged
mockersf merged 5 commits intobevyengine:mainfrom Oct 11, 2024
Merged
Conversation
This will check for `no_std` compatibility for any `no_std` crates Bevy has. Note that each `no_std` crate is added manually as certain crates (e.g., `bevy_mikktspace`) do/will require features to be enabled for `no_std` compatibility (e.g., `libm`). Currently a single `no_std` target has been chosen (`x86_64-unknown-none`). However, this should be updated in the future with more representative platforms as required.
Requires the `x86_64-unknown-none` target be added via `rustup`, which may not be appropriate for all contributors.
BenjaminBrienen
suggested changes
Oct 10, 2024
BenjaminBrienen
approved these changes
Oct 10, 2024
mockersf
reviewed
Oct 11, 2024
mockersf
reviewed
Oct 11, 2024
Co-authored-by: François Mockers <francois.mockers@vleue.com>
Co-Authored-By: François Mockers <francois.mockers@vleue.com>
…011899/bevy into AddNoStdCompileCheckToCI
mockersf
approved these changes
Oct 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
no_stdChecks to CI #15840Solution
Added a new subcommand to the CI tool,
compile-check-no-std, which will attempt to compile eachno_stdcrate in Bevy with the appropriate features (no-defaults,libm, etc.) forx86_64-unknown-none. The exact target chosen could be changed to any reasonable platform which does not include thestdlibrary.The currently tested crates are:
bevy_ptrbevy_utilsbevy_mikktspaceAs more crates have
no_stdsupport added, they should be added to this CI command. Once Bevy itself can beno_std, the individual checks can be replaced with just checking Bevy, since it will transiently check all other crates as appropriate.Testing
cargo clean), these new checks take approximately 10 seconds total.