# Is AtomicU128 gone for good?

**URL:** <https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657>\
**Category:** libs\
**Created:** [November 23, 2021, 4:08pm UTC](https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657 "2021-11-23T16:08:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckaran](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@ckaran](https://internals.rust-lang.org/u/ckaran)\
**Post date:** [November 23, 2021, 4:08pm UTC](https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657/1 "2021-11-23T16:08:24Z")

</div>

I keep seeing the `AtomicU128` type come and go in [std::sync::atomic](https://doc.rust-lang.org/std/sync/atomic/index.html) on a semi-regular basis (I think I've seen it be put in and removed at least twice, though it could have been more than that). Why is it being removed each time? What's preventing it from becoming a permanent part of the standard library?

---

<div class="post-metadata">

**Author:** ![bjorn3](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/bjorn3/32/2736_2.png) [@bjorn3](https://internals.rust-lang.org/u/bjorn3)\
**Post date:** [November 23, 2021, 4:46pm UTC](https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657/2 "2021-11-23T16:46:42Z")

</div>

`AtomicU128` is only available on targets that have native 128bit atomic operation support. This includes x86\_64 macOS (as the minimal supported CPU by the oldest x86\_64 macOS (Mac OS X Tiger), the intel core duo, supports them.), but not x86\_64 Windows and Linux as they work on CPU's that don't support 128bit atomic operations.

macOS:

> <https://github.com/rust-lang/rust/blob/22c2d9ddbf356bcdb718e88ca6ee3665e1e42690/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs#L6-L7>

Windows:

> <https://github.com/rust-lang/rust/blob/22c2d9ddbf356bcdb718e88ca6ee3665e1e42690/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs#L5-L6>

Linux:

> <https://github.com/rust-lang/rust/blob/22c2d9ddbf356bcdb718e88ca6ee3665e1e42690/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs#L5-L6>

---

<div class="post-metadata">

**Author:** ![ckaran](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@ckaran](https://internals.rust-lang.org/u/ckaran)\
**Post date:** [November 23, 2021, 5:05pm UTC](https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657/3 "2021-11-23T17:05:37Z")

</div>

Ah, so adding it in was an accident each time? Unfortunate; it would be handy for some algorithms that I'm writing (not required, just handy).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [February 21, 2022, 5:06pm UTC](https://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657/4 "2022-02-21T17:06:05Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
