Cargo Features

[dependencies]
decaf377 = { version = "0.9.0", default-features = false, features = ["std", "alloc", "parallel", "arkworks", "r1cs", "u32_backend"] }

This matches what ark-std (a library for no_std compatibility) does, having a default feature of std - without the ark-std std feature, decaf377 doesn't compile

default = arkworks

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

std arkworks = alloc

Enables std of hex, num-bigint, once_cell, rand_core, subtle, and zeroize

num-bigint:

no-std

alloc std?

Enables alloc of once_cell, rand_core, and zeroize

once_cell:

Enables once_cell::race::OnceBox type.

parallel

Enables parallel of ark-ec, ark-ff, ark-groth16, ark-r1cs-std, and ark-std

arkworks default r1cs? = ark-bls12-377, ark-ec, ark-ed-on-bls12-377, ark-ff, ark-serialize, ark-std, hashbrown, std

TODO: eventually, feature-gate all arkworks deps behind this feature.

Affects fp::arkworks, fq::arkworks, fr::arkworks

r1cs = ark-groth16, ark-r1cs-std, ark-relations, ark-snark, arkworks

Affects ark_curve::r1cs

u32_backend

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.

num-bigint std?
hashbrown arkworks

Enables hashbrown

std

ark-relations r1cs?
ark-r1cs-std parallel? r1cs?
ark-std arkworks parallel?
ark-ec arkworks parallel?
ark-ff arkworks parallel?
ark-serialize arkworks
ark-bls12-377 arkworks
ark-ed-on-bls12-377 arkworks
ark-groth16 parallel? r1cs?
ark-snark r1cs?
once_cell alloc? std?