Skip to content

Avoid importing alloc::sync on platforms that do not have it#492

Open
AverageHelper wants to merge 3 commits intolambda-fairy:mainfrom
AverageHelper:avg/noatomic
Open

Avoid importing alloc::sync on platforms that do not have it#492
AverageHelper wants to merge 3 commits intolambda-fairy:mainfrom
AverageHelper:avg/noatomic

Conversation

@AverageHelper
Copy link
Copy Markdown

@AverageHelper AverageHelper commented Mar 23, 2026

While trying to test another crate (which depends on maud) under no_std conditions, I found that this won't compile as-is on my go-to baseline target for that (usually thumbv6m-none-eabi), due to a lack of atomic pointer support. (thumbv7m-none-eabi seems to work fine however.)

Since maud only seems to import Arc to add a Render impl, I suppose it wouldn't affect anything to simply move that impl block behind an appropriate cfg attribute so it won't be included when building for affected platforms. This PR does just that.

In terms of tests, I could add a CI step to try building against thumbv6m-none-eabi if you'd like, but I figured I'd ask on that one, since no_std support seems to work well here otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant