Skip to content

Support AtomicF16/AtomicF128 under unstable cfgs#200

Merged
taiki-e merged 1 commit intomainfrom
float
Jan 12, 2025
Merged

Support AtomicF16/AtomicF128 under unstable cfgs#200
taiki-e merged 1 commit intomainfrom
float

Conversation

@taiki-e
Copy link
Copy Markdown
Owner

@taiki-e taiki-e commented Jan 12, 2025

  • When both Cargo feature float and unstable --cfg portable_atomic_unstable_f16 are enabled, AtomicF16 for unstable f16 is also provided.
  • When both Cargo feature float and unstable --cfg portable_atomic_unstable_f128 are enabled, AtomicF128 for unstable f128 is also provided.

Note that unstable cfgs are outside of the normal semver guarantees and minor or patch versions of portable-atomic may make breaking changes to them at any time.

@taiki-e taiki-e changed the title Support AtomicF16/f128 under unstable cfgs Support AtomicF16/AtomicF128 under unstable cfgs Jan 12, 2025
@taiki-e taiki-e force-pushed the float branch 11 times, most recently from 43f3411 to e7a3eda Compare January 12, 2025 10:12
@taiki-e taiki-e merged commit 582a915 into main Jan 12, 2025
@taiki-e taiki-e deleted the float branch January 12, 2025 13:58
@taiki-e taiki-e added the A-float Area: related to atomic float label Jan 12, 2025
@joseluis
Copy link
Copy Markdown

@taiki-e since this is controlled by a cfg flag instead of a by a feature it doesn't seem possible to enable it when portable-atomic is a dependency. Is this intentional?

@taiki-e
Copy link
Copy Markdown
Owner Author

taiki-e commented Feb 25, 2025

This is intentional, and it is the same reason why cfg is used for unstable APIs in tokio, proc-macro2, rayon, etc.

@taiki-e
Copy link
Copy Markdown
Owner Author

taiki-e commented Feb 25, 2025

This is intentional, and it is the same reason why cfg is used for unstable APIs in tokio, proc-macro2, rayon, etc.

See rayon-rs/rayon#369, rayon-rs/rayon#364, https://github.com/dtolnay/proc-macro2#unstable-features, tokio-rs/tokio#1774 (comment), etc. for more information.

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

Labels

A-float Area: related to atomic float

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants