Cargo Features

[dependencies]
revm-primitives = { version = "14.0.0", default-features = false, features = ["std", "hashbrown", "serde", "asm-keccak", "portable", "optimism", "arbitrary", "optimism-default-handler", "negate-optimism-default-handler", "dev", "memory_limit", "optional_balance_check", "optional_block_gas_limit", "optional_eip3607", "optional_gas_refund", "optional_no_base_fee", "optional_beneficiary_reward", "rand", "c-kzg", "kzg-rs"] }
default = c-kzg, portable, std

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

std default arbitrary?

Enables std of alloy-eip2930, alloy-eip7702, alloy-primitives, bitflags, bitvec, and hex

alloy-eip2930:

alloy

and std of optional serde

optional

hashbrown

Enables map-hashbrown of alloy-primitives

serde

Enables serde and serde of alloy-eip2930, alloy-eip7702, alloy-primitives, bitflags, bitvec, hex, and optional c-kzg ^1.0.3

c-kzg:

For setting the CfgEnv KZGSettings. Enabled by c-kzg flag.

asm-keccak

Enables asm-keccak of alloy-primitives

portable default

Enables portable of optional c-kzg ^1.0.3

optimism optimism-default-handler?

Affects handler_cfg::HandlerCfg.is_optimism, env::TxEnv.optimism, env::OptimismFields, result::OptimismInvalidTransaction, specification::SpecId

arbitrary = std

Enables arbitrary of alloy-eip2930, alloy-eip7702, alloy-primitives, and bitflags

optimism-default-handler = optimism

Optimism default handler enabled Optimism handler register by default in EvmBuilder.

negate-optimism-default-handler
dev = memory_limit, optional_balance_check, optional_beneficiary_reward, optional_block_gas_limit, optional_eip3607, optional_gas_refund, optional_no_base_fee
memory_limit dev?

Affects env::CfgEnv.memory_limit

optional_balance_check dev?

Affects env::CfgEnv.disable_balance_check

optional_block_gas_limit dev?

Affects env::CfgEnv.disable_block_gas_limit

optional_eip3607 dev?

Affects env::CfgEnv.disable_eip3607

optional_gas_refund dev?

Affects env::CfgEnv.disable_gas_refund

optional_no_base_fee dev?

Affects env::CfgEnv.disable_base_fee

optional_beneficiary_reward dev?

Affects env::CfgEnv.disable_beneficiary_reward

rand

Enables rand of alloy-primitives

c-kzg default

See comments in revm-precompile

Enables c-kzg ^1.0.3

Affects env::CfgEnv.kzg_settings, revm-primitives::kzg

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.

Affects env::CfgEnv.kzg_settings, revm-primitives::kzg