Skip to content

Fix compilation on targets with no alloc::sync::Arc and alloc,portable-atomic features#46

Merged
agerasev merged 3 commits intoagerasev:masterfrom
aecsocket:fix-alloc-pa
Mar 24, 2025
Merged

Fix compilation on targets with no alloc::sync::Arc and alloc,portable-atomic features#46
agerasev merged 3 commits intoagerasev:masterfrom
aecsocket:fix-alloc-pa

Conversation

@aecsocket
Copy link
Copy Markdown
Contributor

If you attempt to compile the crate with alloc,portable-atomic features on a target like thumbv6m-none-eabi which has no alloc::sync::Arc (no pointer size atomics), compilation fails. This PR fixes this by using portable-atomic-util on those platforms, which provides an Arc replacement. This also adds to scripts/test.sh to make sure this crate can compile on thumbv6m-none-eabi. The reason for picking this specific target is because Bevy also uses this as its reference "no-std/no-atomic-CAS" target.

@agerasev agerasev merged commit 04eefb5 into agerasev:master Mar 24, 2025
1 check passed
@agerasev
Copy link
Copy Markdown
Owner

Thank you for your PR!
I've published newer versions to crates.io

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