Cargo Features

[dependencies]
alloy-evm = { version = "0.27.0", default-features = false, features = ["std", "secp256k1", "gmp", "op", "overrides", "call-util", "engine", "asm-keccak", "rpc"] }
default = std

The std feature is set by default whenever alloy-evm is added without default-features = false somewhere in the dependency tree.

std default secp256k1?

Enables std of alloy-consensus, alloy-eips, alloy-primitives, optional alloy-rpc-types-engine, optional alloy-rpc-types-eth, alloy-sol-types, derive_more, optional op-alloy, optional op-revm, revm, and thiserror

thiserror:

Std feature enables support for formatting std::path::{Path, PathBuf}
conveniently in an error message.

#[derive(Error, Debug)]
#[error("failed to create configuration file {path}")]
pub struct MyError {
pub path: PathBuf,
pub source: std::io::Error,
}

Without std, this would need to be written #[error("... {}", path.display())].

secp256k1 = std

Enables secp256k1 of alloy-consensus

gmp

Enables gmp of revm

revm:

Use GMP for modexp precompile (LGPL; dynamically linked via system libs).

op = alloy-op-hardforks, op-alloy, op-revm

Affects alloy-evm::op

overrides call-util?

Enables alloy-rpc-types-eth

Affects alloy-evm::overrides

call-util = overrides

Affects alloy-evm::call

engine

Enables alloy-rpc-types-engine, rpc-types-engine of optional op-alloy

asm-keccak

Enables asm-keccak of alloy-primitives and revm

rpc

Enables alloy-rpc-types-eth, rpc-types of optional op-alloy

Affects alloy-evm::rpc

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.

alloy-op-hardforks op?
op-revm op?
op-alloy op?