rust/library/compiler-builtins
Stuart Cook 37ece9cf9b
Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
..
.github/workflows ci: Move the dependency installs and wall time benchmarks to scripts 2026-01-04 04:30:19 -05:00
builtins-shim compiler-builtins: Remove the no-f16-f128 feature 2026-01-11 07:02:27 -06:00
builtins-test compiler-builtins: Remove the no-f16-f128 feature 2026-01-11 07:02:27 -06:00
builtins-test-intrinsics Enable tests that were skipped on PowerPC 2025-07-24 07:18:08 -05:00
ci compiler-builtins: Remove the no-f16-f128 feature 2026-01-11 07:02:27 -06:00
compiler-builtins Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35 2026-02-03 21:58:39 +11:00
crates Update Cargo.toml authors fields 2025-12-06 03:49:54 -05:00
etc Rollup merge of #144443 - WaffleLapkin:integer-target-pointer-width, r=Noratrieb 2025-08-31 13:40:34 +02:00
libm compiler-builtins: Remove the no-f16-f128 feature 2026-01-11 07:02:27 -06:00
libm-test Fix expm1f overflow threshold 2025-12-17 05:56:45 +00:00
.editorconfig Move the libm .editorconfig to root 2025-04-19 20:42:40 -04:00
.git-blame-ignore-revs Update .git-blame-ignore-revs after the libm merge 2025-04-19 20:18:22 +00:00
.gitignore bench: Update the benchmark runner to gungraun 0.17 2025-12-04 21:35:41 -05:00
.rustfmt.toml Add a .rustfmt.toml with style edition 2024 2025-04-19 19:05:49 -04:00
Cargo.toml bench: Add strip = false to the bench profile 2025-12-05 04:43:01 -05:00
CONTRIBUTING.md bench: Update the benchmark runner to gungraun 0.17 2025-12-04 21:35:41 -05:00
josh-sync.toml Add josh-sync config file 2025-07-08 08:56:34 +02:00
LICENSE.txt Update licensing information after repository refactoring 2025-04-21 06:16:12 -04:00
PUBLISHING.md ci: Update the default branch name 2025-12-04 21:35:23 -05:00
README.md fixed typo in readme 2025-05-22 11:51:54 +02:00
rust-version Prepare for merging from rust-lang/rust 2025-12-28 04:22:01 +00:00
triagebot.toml Remove [no-mentions] handler in our triagebot config 2025-12-11 12:13:10 -05:00

compiler-builtins and libm

This repository contains two main crates:

  • compiler-builtins: symbols that the compiler expects to be available at link time
  • libm: a Rust implementation of C math libraries, used to provide implementations in core.

More details are at compiler-builtins/README.md and libm/README.md.

For instructions on contributing, see CONTRIBUTING.md.

License

  • libm may be used under the MIT License
  • compiler-builtins may be used under the MIT License and the Apache License, Version 2.0 with the LLVM exception.
  • All original contributions must be under all of: the MIT license, the Apache-2.0 license, and the Apache-2.0 license with the LLVM exception.

More details are in LICENSE.txt and libm/LICENSE.txt.