Cargo Features

[dependencies]
lambdaworks-math = { version = "0.7.0", default-features = false, features = ["std", "alloc", "parallel", "lambdaworks-serde-binary", "lambdaworks-serde-string", "winter_compatibility", "proptest", "metal", "cuda"] }
default = parallel, std

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

std default = alloc

Enables std of optional serde and optional serde_json

serde:

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

Affects traits::IsPrimeField.to_hex

alloc lambdaworks-serde-binary? lambdaworks-serde-string? std

Affects compression::compress_g1_point, bls12_381::pairing, cpu::ops, cpu::roots_of_unity, fft::polynomial, traits::IsSubFieldOf.to_subfield_vec, helpers::resize_to_next_power_of_two, lambdaworks-math::polynomial, msm::pippenger, traits::ByteConversion.to_bytes_be, traits::ByteConversion.to_bytes_le, traits::AsBytes

parallel default

Enables rayon

Affects pippenger::parallel_msm_with

lambdaworks-serde-binary = alloc

Enables serde

lambdaworks-serde-string = alloc

Enables serde and serde_json

winter_compatibility = miden-core, winter-math

Affects fields::winterfell

proptest

Enables proptest

metal

gpu

Enables metal ^0.24.0 and objc, metal of lambdaworks-gpu

Affects gpu::metal

cuda

Enables cudarc ^0.9.7 and lambdaworks-gpu

Affects gpu::cuda, gpu::cuda

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.

winter-math winter_compatibility?

Enables winter-math ^0.6.4

miden-core winter_compatibility?

Enables miden-core ^0.7