Cargo Features

[dependencies]
revm-precompile = { version = "18.0.0", default-features = false, features = ["std", "hashbrown", "asm-keccak", "secp256r1", "c-kzg", "kzg-rs", "portable", "secp256k1", "libsecp256k1", "blst", "bn"] }
default = blst, c-kzg, portable, secp256k1, std

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

std default

Enables std of ark-bls12-381

Use the BLS12-381 implementation of arkworks for EIP2537

and std of aurora-engine-modexp

modexp

and std of once_cell

static precompile sets.

and std of sha2

SHA2-256 and RIPEMD-160

and std of ark-bn254, ark-ec, ark-ff, and ark-serialize

ark-bn254:

Use arkworks implementation for eip1962

and std of optional c-kzg

KZG point evaluation precompile

and std of optional p256

p256verify precompile

and std of k256 and optional libsecp256k1

k256:

ecRecover

and std of revm-primitives, ripemd, serde, serde_json, and optional secp256k1

revm-primitives:

revm

hashbrown

Enables hashbrown of revm-primitives

asm-keccak

Enables asm-keccak of revm-primitives

secp256r1

Enables the p256verify precompile.

Enables p256

Affects revm-precompile::secp256r1

c-kzg default

These libraries may not work on all no_std platforms as they depend on C.

Enables the KZG point evaluation precompile.

Enables c-kzg

Affects revm-precompile::kzg_point_evaluation

kzg-rs

kzg-rs is not audited but useful for no_std environment, use it with causing and default to c-kzg if possible.

Enables kzg-rs

Optionally use kzg-rs for a pure Rust implementation of KZG point evaluation.

Affects revm-precompile::kzg_point_evaluation

portable default

Compile in portable mode, without ISA extensions.
Binary can be executed on all systems.

Enables portable of optional blst and optional c-kzg

blst:

Use the BLS12-381 implementation of blst for EIP2537

secp256k1 default

Use secp256k1 as a faster alternative to k256. The problem that secp256k1 has is it fails to build for wasm target on Windows and Mac as it is c lib. In Linux it passes. If you don't require to build wasm on win/mac, it is safe to use it and it is enabled by default.

Enables secp256k1

Affects secp256k1::bitcoin_secp256k1

libsecp256k1

Enables libsecp256k1

Affects secp256k1::parity_libsecp256k1

blst default

Enables the blst implementation of the BLS12-381 precompile.

Enables blst

bn

Enables the substrate implementation of eip1962

Enables substrate-bn

Optionally use substrate implementation for eip1962