Skip to content

Add no_std Checks to CI #15840

@bushrat011899

Description

@bushrat011899

What problem does this solve or what need does it fill?

Bevy contains a number of no_std crates (with more hopefully on the way!), but there are currently no tests in the CI to ensure they actually are no_std compatible. If any std dependency is added (even transiently!), it will break this guarantee.

What solution would you like?

  • Add one or more no_std targets to a specific no_std cargo build CI action. The most obvious platform would be x86_64_unknown-none, since Bevy is known to work on x86_64 across many operating systems. However, more could be added based on community usage (e.g., Raspberry Pi, STM32, etc.). This would ensure it is possible to build Bevy and/or its crates without the std library being linked.
  • Add a test CI action which disables the std feature (and possibly alloc as well) to ensure unit tests pass in a no_std environment. Note that these tests can be run on a platform with the std library, since the above test ensures that the std library isn't used directly or transiently.

What alternative(s) have you considered?

We could do nothing for now. Since the Bevy no_std community is just starting, there are currently no users to complain if no_std support is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationC-FeatureA new feature, making something new possibleD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions