Skip to content

Pull in portable-atomic only when needed #1455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

joshtriplett
Copy link
Contributor

Use cargo conditional dependencies to only depend on portable-atomic on
platforms without 64-bit atomics.

Centralize the conditionals for AtomicU64 import in one place, to avoid
duplicating them.

Move the conditional imports for `AtomicU64` to the top of the crate,
and have everywhere else import it from there.
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's wonderful and the better template going forward, as I expect some more incompatibilities to be lurking in other plumbing crates as well (they might just not yet be used by cargo).

@Byron Byron merged commit 6cd8b46 into GitoxideLabs:main Jul 14, 2024
19 checks passed
@Fabian-Gruenbichler
Copy link
Contributor

thanks, that is indeed cleaner! :)

@joshtriplett joshtriplett deleted the portable-atomic-only-when-needed branch July 16, 2024 16:09
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.

3 participants