Cargo Features

[dependencies]
nalgebra = { version = "0.33.2", default-features = false, features = ["std", "alloc", "sparse", "debug", "io", "compare", "libm", "libm-force", "macros", "convert-mint", "convert-bytemuck", "convert-glam014", "convert-glam015", "convert-glam016", "convert-glam017", "convert-glam018", "convert-glam019", "convert-glam020", "convert-glam021", "convert-glam022", "convert-glam023", "convert-glam024", "convert-glam025", "convert-glam027", "convert-glam028", "convert-glam029", "serde-serialize-no-std", "serde-serialize", "rkyv-serialize-no-std", "rkyv-serialize", "rand-no-std", "rand", "arbitrary", "proptest-support", "rkyv-safe-deser", "slow-tests", "alga", "rayon"] }
default = macros, std

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

std default = matrixmultiply

Enables std of approx, num-complex, num-rational, num-traits, and simba

Affects alias::DMatrix, alias::MatrixXx1, alias::MatrixXx2, alias::MatrixXx3, alias::MatrixXx4, alias::MatrixXx5, alias::MatrixXx6, alias::DVector, alias::RowDVector

alloc

Affects alias::DMatrix, alias::MatrixXx1, alias::MatrixXx2, alias::MatrixXx3, alias::MatrixXx4, alias::MatrixXx5, alias::MatrixXx6, alias::DVector, alias::RowDVector

sparse

Affects nalgebra::sparse

debug = rand

Enables num-complex of approx

Affects nalgebra::debug

io = pest, pest_derive

Affects nalgebra::io

compare = matrixcompare-core
libm

Enables libm of simba

libm-force

Enables libm_force of simba

macros default = nalgebra-macros
convert-mint = mint

Conversion

convert-bytemuck = bytemuck

Enables bytemuck of num-complex

convert-glam014 = glam014
convert-glam015 = glam015
convert-glam016 = glam016
convert-glam017 = glam017
convert-glam018 = glam018
convert-glam019 = glam019
convert-glam020 = glam020
convert-glam021 = glam021
convert-glam022 = glam022
convert-glam023 = glam023
convert-glam024 = glam024
convert-glam025 = glam025
convert-glam027 = glam027
convert-glam028 = glam028
convert-glam029 = glam029
serde-serialize-no-std serde-serialize? = serde

Serialization To use serde in a #[no-std] environment, enable the serde-serialize-no-std feature instead of serde-serialize. Serialization of dynamically-sized matrices/vectors require serde-serialize.

Enables serde of num-complex

serde-serialize = serde-serialize-no-std

Enables std of serde

serde:

Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.

rkyv-serialize-no-std rkyv-serialize?

Enables size_32 of rkyv ^0.7.41

rkyv-serialize rkyv-safe-deser? = rkyv-serialize-no-std

Enables std and validation of rkyv ^0.7.41

rand-no-std rand? = rand-package

Randomness To use rand in a #[no-std] environment, enable the rand-no-std feature instead of rand.

Affects helper::reject_rand

rand debug? = rand-no-std, rand_distr

Enables std and std_rng of rand

arbitrary = quickcheck

Tests

Affects helper::reject

proptest-support = proptest

Affects nalgebra::proptest

rkyv-safe-deser = rkyv-serialize

Enables validation of rkyv ^0.7.41

slow-tests

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

nalgebra-macros macros
rand-package rand? rand-no-std?

Enables rand

alga implicit feature

Enables alga

alga:

Abstract algebra for Rust

rand_distr rand?
matrixmultiply std
serde serde-serialize? serde-serialize-no-std?
rkyv rkyv-safe-deser? rkyv-serialize? rkyv-serialize-no-std?

Enables rkyv ^0.7.41

mint convert-mint?
quickcheck arbitrary?
pest io?
pest_derive io?
bytemuck convert-bytemuck?
matrixcompare-core compare?
glam014 convert-glam014?

Enables glam ^0.14

glam015 convert-glam015?

Enables glam ^0.15

glam016 convert-glam016?

Enables glam ^0.16

glam017 convert-glam017?

Enables glam ^0.17

glam018 convert-glam018?

Enables glam ^0.18

glam019 convert-glam019?

Enables glam ^0.19

glam020 convert-glam020?

Enables glam ^0.20

glam021 convert-glam021?

Enables glam ^0.21

glam022 convert-glam022?

Enables glam ^0.22

glam023 convert-glam023?

Enables glam ^0.23

glam024 convert-glam024?

Enables glam ^0.24

glam025 convert-glam025?

Enables glam ^0.25

glam027 convert-glam027?

Enables glam ^0.27

glam028 convert-glam028?

Enables glam ^0.28

glam029 convert-glam029?

Enables glam

rayon implicit feature

Enables rayon

rayon:

Simple work-stealing parallelism for Rust

Affects base::par_iter

proptest proptest-support?