Cargo Features

[dependencies]
libm = { version = "0.2.14", default-features = false, features = ["arch", "unstable", "unstable-intrinsics", "unstable-public-internals", "unstable-float", "force-soft-floats"] }
default = arch

The arch feature is set by default whenever libm is added without default-features = false somewhere in the dependency tree.

arch default

Enable architecture-specific features such as SIMD or assembly routines.

unstable = unstable-float, unstable-intrinsics

This tells the compiler to assume that a Nightly toolchain is being used and that it should activate any useful Nightly things accordingly.

unstable-intrinsics unstable?

Enable calls to functions in core::intrinsics

unstable-public-internals

Make some internal things public for testing.

Affects math::support

unstable-float unstable?

Enable the nightly-only f16 and f128.

force-soft-floats

Used to prevent using any intrinsics or arch-specific code.

HACK: this is a negative feature which is generally a bad idea in Cargo, but we need it to be able to forbid other features when this crate is used in Rust dependencies. Setting this overrides all features that may enable hard float operations.