Skip to content

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

Merged
lambda-fairy merged 4 commits intolambda-fairy:mainfrom
AverageHelper:avg/noatomic
Apr 6, 2026
Merged

Avoid importing alloc::sync on platforms that do not have it#492
lambda-fairy merged 4 commits intolambda-fairy:mainfrom
AverageHelper:avg/noatomic

Conversation

@AverageHelper
Copy link
Copy Markdown
Contributor

@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.

@lambda-fairy lambda-fairy merged commit 81f9344 into lambda-fairy:main Apr 6, 2026
4 checks passed
@lambda-fairy
Copy link
Copy Markdown
Owner

Thanks!

Happy to take a PR that adds a thumbv6m-none-eabi build.

@AverageHelper AverageHelper deleted the avg/noatomic branch April 6, 2026 11:19
@AverageHelper
Copy link
Copy Markdown
Contributor Author

Happy to take a PR that adds a thumbv6m-none-eabi build.

Yay! I've opened #495 to that effect

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.

2 participants