Cargo Features

[dependencies]
nalgebra = { version = "0.32.6", default-features = false, features = ["std", "alloc", "sparse", "debug", "io", "compare", "libm", "libm-force", "macros", "cuda", "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", "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 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
cuda = cust_core

Enables cuda of simba

convert-mint = mint

Conversion

convert-bytemuck = bytemuck
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
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

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

Enables std and validation of rkyv

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

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?
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

cust_core cuda?
rayon implicit feature

Enables rayon

rayon:

Simple work-stealing parallelism for Rust

Affects base::par_iter

proptest proptest-support?