Skip to content

Commit 43db5e7

Browse files
committed
i128/u128 in extern C, apply x86_64 target demotion
1 parent a8195f2 commit 43db5e7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

content/Rust-1.89.0.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,33 @@ Failing tests can be disabled by annotating the doctest with `ignore-<target>`:
144144
pub fn my_function() { }
145145
```
146146

147+
### `i128` and `u128` in `extern "C"` functions
148+
149+
`i128` and `u128` no longer trigger the `improper_ctypes_definitions` lint, meaning these types may be used in `extern "C"` functions without warning. This comes with some caveats:
150+
151+
* The Rust types are ABI- and layout-compatible with (unsigned) `__int128` in C when the type is available.
152+
* On platforms where `__int128` is not available, `i128` and `u128` do not necessarily align with any C type.
153+
* `i128` is _not_ necessarily compatible with `_BitInt(128)` on any platform, because `_BitInt(128)` and `__int128` may not have the same ABI (as is the case on x86-64).
154+
155+
This is the last bit of follow up to the layout changes from last year: https://blog.rust-lang.org/2024/03/30/i128-layout-update/.
156+
157+
### Demoting `x86_64-apple-darwin` to Tier 2 with host tools
158+
159+
GitHub will soon [discontinue][gha-sunset] providing free macOS x86\_64 runners for public repositories. Apple has also announced their [plans][apple] for discontinuing support for the x86\_86 architecture.
160+
161+
In accordance with these changes, the Rust project is in the [process of demoting the `x86_64-apple-darwin` target][rfc] from Tier 1 to Tier 2 with host tools. This means that the target, including tools like `rustc` and `cargo`, will be guaranteed to build but is not guaranteed to pass our automated test suite.
162+
163+
We expect that the RFC for the demotion to Tier 2 with host tools will be accepted between the releases of Rust 1.89 and 1.90, which means that Rust 1.89 will be the last release of Rust where `x86_64-apple-darwin` is a Tier 1 target.
164+
165+
For users, nothing will change. Builds of both the standard library and the compiler will still be distributed by the Rust Project for use via `rustup` or alternative installation methods.
166+
167+
[apple]: https://en.wikipedia.org/wiki/Mac_transition_to_Apple_silicon#Timeline
168+
[gha-sunset]: https://github.blog/changelog/2025-07-11-upcoming-changes-to-macos-hosted-runners-macos-latest-migration-and-xcode-support-policy-updates/#macos-13-is-closing-down
169+
[rfc]: https://github.com/rust-lang/rfcs/pull/3841
170+
147171
### Platform Support
148172

173+
- [`x86_64-apple-darwin` is in the process of being demoted to Tier 2 with host tools](https://github.com/rust-lang/rfcs/pull/3841)
149174
- [Add new Tier-3 targets `loongarch32-unknown-none` and `loongarch32-unknown-none-softfloat`](https://github.com/rust-lang/rust/pull/142053)
150175
- [WASM's C abi is now spec compliant](https://github.com/rust-lang/rust/pull/133952)
151176

0 commit comments

Comments
 (0)