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

Test no_std builds propperly to catch build error regressions in the CI #496

Closed
CPerezz opened this issue Apr 13, 2021 · 0 comments
Closed
Assignees
Labels
area:conf&build tasks related to our configuration or build system (Makefile, Docker, scripts, commands) area:testing everything related to smoke-, unit-, integration-, performance testing team:Core Low Level Core Development Team (Rust)

Comments

@CPerezz
Copy link
Contributor

CPerezz commented Apr 13, 2021

We currently don't check that indeed the crate builds in no_std without pulling any std stuff inside.

To do so, the only way we have is to basically use the following trick:

Nemo157 on Reddit noted that another way to achieve this goal is to build for an ARM target, since std isn't available for >embedded ARM.

To install the target:

$ rustup target add thumbv6m-none-eabi
Then build your crate for this target:

$ cargo build --target thumbv6m-none-eabi
This will fail with a bunch of error messages if std is required by a dependency.

As noted by Nemo157, "that becomes more complicated once you introduce dev-dependencies and optionally-std crates >though".

@CPerezz CPerezz added area:conf&build tasks related to our configuration or build system (Makefile, Docker, scripts, commands) area:testing everything related to smoke-, unit-, integration-, performance testing team:Core Low Level Core Development Team (Rust) labels Apr 13, 2021
@CPerezz CPerezz self-assigned this Apr 13, 2021
@CPerezz CPerezz closed this as completed in 347dd8d May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:conf&build tasks related to our configuration or build system (Makefile, Docker, scripts, commands) area:testing everything related to smoke-, unit-, integration-, performance testing team:Core Low Level Core Development Team (Rust)
Projects
None yet
Development

No branches or pull requests

1 participant