no_std: spinning_top, portable-atomic #222
Merged
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.
Fix
#![no_std]
support.parking_lot
inno_std
-- it never worked -- and switch tospinning_top
instead. Ideally this would make use oflock_api
directly, but I don't have time to chase the type signature changes through the tests at the moment.portable_atomic
.I'd also recommend adding a
cargo check --target thumbv7em-none-eabi
(or similarno_std
target) to the CI pipeline in the future, as the tests don't coverno_std
for dependencies (see below).notes
#29 (which introduced this change) looks like it was generated by shotgunning dependency analysis tools without reading or understanding the implications (notably, it was during GitHub's Hacktoberfest event, which is notorious for this).
parking_lot
does not work, and to my knowledge never has worked, inno_std
environments:#![no_std]
declaration inparking_lot
https://github.com/Amanieu/parking_lot/blob/master/src/lib.rs#L11-L14#![no_std]
declaration inparking_lot_core
https://github.com/Amanieu/parking_lot/blob/master/core/src/lib.rs#L39-L54spin
withparking_lot
, but withlock_api
(a part of theparking_lot
project):ci / testing
I notice that someone reported this issue in #96 and it was closed because CI is passing. However, rust's
libtest
transitively includeslibstd
, i.e.cargo test
can't be run without includingstd
.governor
may be built for test withoutstd
, but its dependencies are not.