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.
Adds
std
andalloc
features to enable support for no-std targets.Mostly this was just a matter of updating imports from
std
tocore
oralloc
as necessary along withcfg
directives to omit things like the vec implementations that require an allocator.The only real issue I ran into was that the implementations of
WakerArray
andWakerVec
required bothArc
andMutex
.Arc
is only available onalloc
andMutex
is only available onstd
. So I've added very basic no-std implementations of both which simply revert to using the parent waker directly instead of trying to do precise waking. I think it should be possible to implement precise waking in a no-std environment, but will require messing withRawWakers
and probably pinning and a fair amount of unsafe code. This does mean that on no-std targets all futures will be polled on every wake.The only other behavior difference is removing printing of the child error sources in the
Debug
impl of theAggregateError
structs. This was necessary because theError
trait is currently std only. It does have the side benefit of there now being aDebug
impl for anyAggregateError
whoseT
implsDisplay
instead of only whenT
implsError
.I updated CI to run
cargo check
on std, alloc, and core configurations. Let me know if you want CI to runcargo test
on the no-std configurations as well.