Cargo Features

[dependencies]
rug = { version = "1.22.0", default-features = false, features = ["integer", "rational", "float", "complex", "rand", "fail-on-warnings", "num-traits", "serde"] }
default = complex, float, integer, rand, rational

These default features are set whenever rug is added without default-features = false somewhere in the dependency tree.

integer default rand rational = gmp-mpfr-sys

Affects ext::xmpz, xmpc::pow_z, xmpfr::set_z, xmpfr::cmp_z, xmpfr::add_z, xmpfr::sub_z, xmpfr::z_sub, xmpfr::mul_z, xmpfr::div_z, xmpfr::z_div, xmpfr::pow_z, rug::integer, macros::CastPtr, macros::CastPtrMut

rational default = integer

Affects ext::xmpq, xmpfr::set_q, xmpfr::get_q, xmpfr::cmp_q, xmpfr::add_q, xmpfr::sub_q, xmpfr::q_sub, xmpfr::mul_q, xmpfr::div_q, xmpfr::q_div, rug::rational

float default complex

Enables mpfr of gmp-mpfr-sys

Affects ext::xmpfr, rug::float, macros::CastPtr, macros::CastPtrMut

complex default = float

Enables mpc of gmp-mpfr-sys

Affects ext::xmpc, rug::complex

rand default = integer

Affects big::RandomBitsIncomplete, big::RandomContIncomplete, xmpfr::urandomb, xmpfr::urandom, xmpfr::nrandom, xmpfr::erandom, xmpz::urandomb, xmpz::urandomm, big::RandomBitsIncomplete, big::RandomContIncomplete, big::RandomNormalIncomplete, big::RandomExpIncomplete, big::RandomBitsIncomplete, big::RandomBelowIncomplete, long64::IntegerExt64.random_bits_64, long64::RandomBitsIncomplete, rug::rand

fail-on-warnings
num-traits = num-integer, num-traits-crate

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

serde implicit feature

With default (std)

gmp-mpfr-sys integer
num-integer num-traits?

With i128

num-traits-crate num-traits?

Enables i128 and std of num-traits