Cargo Features
[dependencies]
ligerito = { version = "0.6.2", default-features = false, features = ["serde", "scale", "std", "prover", "verifier-only", "parallel", "hardware-accel", "transcript-sha256", "transcript-merlin", "transcript-blake2b", "substrate", "wasm", "wasm-parallel", "wasm-raw", "webgpu", "cli"] }
Default is full-featured std environment with prover + verifier + CLI Uses SHA256 transcript by default (no extra deps, works everywhere)
- default = cli, hardware-accel, parallel, prover, std
-
These default features are set whenever
ligeritois added withoutsomewhere in the dependency tree.default-features = false - serde std
-
Serialization support (optional - not needed for wasm-lite)
Enables serde and serde of ligerito-binary-fields and ligerito-merkle
ligerito-binary-fields:
Core dependencies (always needed)
- scale
-
SCALE codec for Substrate runtime (no_std compatible)
Enables scale-info, scale of ligerito-binary-fields and ligerito-merkle and parity-scale-codec
SCALE codec for Substrate runtime support
- std default cli transcript-merlin? wasm? wasm-raw? = serde, thiserror
-
Environment: std or no_std
Enables std of optional parity-scale-codec, ligerito-binary-fields, ligerito-merkle, optional ligerito-reed-solomon, optional scale-info, and optional serde
ligerito-reed-solomon:
Prover-only dependencies
Affects
autosizer::print_config_summary,ligerito::autosizer,ligerito::LigeritoError,transcript::Transcript… - prover default cli wasm? wasm-raw? = ligerito-reed-solomon, rand, rand_chacha
-
Functionality: include prover or verifier-only
Enables rand of ligerito-binary-fields and ligerito-merkle
Affects
autosizer::prover_config_for_size,autosizer::prover_config_for_log_size,configs::hardcoded_config_12,configs::hardcoded_config_16,configs::hardcoded_config_20,configs::hardcoded_config_20_k8,configs::hardcoded_config_20_k10,configs::hardcoded_config_24,configs::hardcoded_config_26,configs::hardcoded_config_28,data_structures::ProverConfig,data_structures::RecursiveLigeroWitness,ligerito::ligero,ligerito::prover,ligerito::backend,ligerito::prover,ligero::poly2mat,ligero::encode_cols,ligero::ligero_commit,utils::encode_non_systematic… - verifier-only
- parallel default cli wasm-parallel? = rayon
-
Performance optimizations
Enables parallel of optional ligerito-reed-solomon
Affects
sumcheck_polys::induce_sumcheck_poly_parallel,ligero::encode_cols… - hardware-accel default cli wasm? wasm-raw?
-
Enables hardware-accel of ligerito-binary-fields and optional ligerito-reed-solomon
- transcript-sha256 cli wasm? wasm-raw?
-
Transcript implementations
SHA256 is always available (default) - no extra dependencies, works in no_std Default: minimal deps, works everywhere including WASM - transcript-merlin cli wasm? = merlin, std
-
Merlin transcript (Zcash/Dalek standard)
Affects
transcript::MerlinTranscript,verifier::verify_complete… - transcript-blake2b substrate? wasm? = blake2
-
BLAKE2b transcript (optimized for Substrate)
Affects
prover::prove_blake2b,transcript::Blake2bTranscript,verifier::verify_blake2b,verifier::verify_complete_blake2b… - substrate = sp-io, transcript-blake2b
-
Substrate runtime support - uses BLAKE2b with sp_io host functions
- wasm wasm-parallel? webgpu? = bincode, console_error_panic_hook, hardware-accel, js-sys, prover, std, transcript-blake2b, transcript-merlin, transcript-sha256, wasm-bindgen, wasm-bindgen-futures
-
WASM support (full - includes serde/bincode for proof serialization)
Enables js of getrandom ^0.2
Affects
ligerito::wasm… - wasm-parallel = js-sys, parallel, wasm, wasm-bindgen-rayon
-
Multi-threaded WASM (requires SharedArrayBuffer + CORS headers)
- wasm-raw = bincode, hardware-accel, prover, std, transcript-sha256
-
Raw WASM - no wasm-bindgen, just extern "C" exports Use this for manual multi-instance parallelism or minimal bindings Note: Uses custom random seeding from JS instead of getrandom
Enables custom of getrandom ^0.2
Affects
ligerito::wasm_raw… - webgpu = futures, pollster, wasm, web-sys, wgpu
-
WebGPU acceleration (optional, falls back to WASM if unavailable)
Affects
backend::GpuBackend,gpu::device,gpu::fft,gpu::sumcheck,gpu::buffers,gpu::shaders,gpu::is_webgpu_available,ligerito::gpu… - cli default = anyhow, bincode, clap, core_affinity, hardware-accel, hex, parallel, prover, serde_json, std, transcript-merlin, transcript-sha256
-
PolkaVM integration - not available in published crate Use polkavm-pcvm crate separately for PolkaVM integration polkavm-integration = [
"std",
"prover",
"polkavm",
"polkavm-common",
]
CLI binary support - includes ALL features for maximum capability Why hold back? Users want the full power!Required by the binary
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.
- merlin transcript-merlin?
- blake2 transcript-blake2b?
- sp-io substrate?
-
Enables sp-io ^38.0.0
Substrate integration (for BLAKE2b transcript in runtime)
- ligerito-reed-solomon prover
- rand prover
-
Enables rand ^0.8
- rand_chacha prover
-
Enables rand_chacha ^0.3
- rayon parallel
-
Enables rayon
Parallel processing (std only)
- core_affinity cli
-
Affects
ligerito::cpu_affinity… - thiserror std
-
Enables thiserror ^1.0
Error handling (std only - for no_std we use custom errors)
- clap cli
-
Enables clap
CLI dependencies
- anyhow cli
- bincode cli wasm? wasm-raw?
-
Enables bincode ^1.3
- hex cli
- serde_json cli
- wasm-bindgen wasm?
-
Enables wasm-bindgen
WASM dependencies
- wasm-bindgen-rayon wasm-parallel?
- wasm-bindgen-futures wasm?
- console_error_panic_hook wasm?
- getrandom wasm? wasm-raw?
-
Enables getrandom ^0.2
- js-sys wasm? wasm-parallel?
- wgpu webgpu?
-
Enables wgpu ^0.20
WebGPU dependencies
- pollster webgpu?
-
Enables pollster ^0.3
- web-sys webgpu?
- futures webgpu?