1[package]
2authors = ["Jorge Aparicio <jorge@japaric.io>"]
3categories = ["no-std"]
4description = "libm in pure Rust"
5documentation = "https://docs.rs/libm"
6keywords = ["libm", "math"]
7license = "MIT"
8name = "libm"
9readme = "README.md"
10repository = "https://github.com/rust-lang/compiler-builtins"
11version = "0.2.13"
12edition = "2021"
13rust-version = "1.63"
14
15[features]
16default = ["arch"]
17
18# Enable architecture-specific features such as SIMD or assembly routines.
19arch = []
20
21# This tells the compiler to assume that a Nightly toolchain is being used and
22# that it should activate any useful Nightly things accordingly.
23unstable = ["unstable-intrinsics", "unstable-float"]
24
25# Enable calls to functions in `core::intrinsics`
26unstable-intrinsics = []
27
28# Make some internal things public for testing.
29unstable-public-internals = []
30
31# Enable the nightly-only `f16` and `f128`.
32unstable-float = []
33
34# Used to prevent using any intrinsics or arch-specific code.
35#
36# HACK: this is a negative feature which is generally a bad idea in Cargo, but
37# we need it to be able to forbid other features when this crate is used in
38# Rust dependencies. Setting this overrides all features that may enable
39# hard float operations.
40force-soft-floats = []
41
42[dev-dependencies]
43no-panic = "0.1.35"
44
45[lints.rust]
46unexpected_cfgs = { level = "warn", check-cfg = [
47 # compiler-builtins sets this feature, but we use it in `libm`
48 'cfg(feature, values("compiler-builtins"))',
49] }
50