[package]
name = "revm"
description = "Revm - Rust Ethereum Virtual Machine"
version = "40.0.3"
authors.workspace = true
edition.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
readme.workspace = true
rust-version.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
# revm
bytecode.workspace = true
context.workspace = true
context-interface.workspace = true
database.workspace = true
database-interface.workspace = true
handler.workspace = true
inspector.workspace = true
interpreter.workspace = true
precompile.workspace = true
primitives.workspace = true
state.workspace = true
statetest-types = { workspace = true, optional = true }

[dev-dependencies]
serde_json = { workspace = true, features = ["alloc", "preserve_order"] }
serde = { workspace = true, features = ["derive"] }

[features]
default = ["std", "secp256k1", "portable", "tracer", "c-kzg", "blst"]
std = [
	"interpreter/std",
	"precompile/std",
	"handler/std",
	"context/std",
	"context-interface/std",
	"bytecode/std",
	"database/std",
	"database-interface/std",
	"inspector/std",
	"primitives/std",
	"state/std",
	"serde/std",
	"serde_json/std",
]
hashbrown = ["interpreter/hashbrown", "precompile/hashbrown"]
map-foldhash = ["primitives/map-foldhash", "statetest-types?/map-foldhash"]
serde = [
	"interpreter/serde",
	"database-interface/serde",
	"primitives/serde",
	"handler/serde",
	"context-interface/serde",
	"bytecode/serde",
	"context/serde",
	"database/serde",
	"inspector/serde",
	"state/serde",
]
arbitrary = ["primitives/arbitrary"]
asm-keccak = ["primitives/asm-keccak"]
sha3-keccak = ["primitives/sha3-keccak"]
asyncdb = ["database-interface/asyncdb"]

# Enables alloydb inside database crate
alloydb = ["database/alloydb"]

# Enables serde-json inside inspector crate
serde-json = ["serde", "inspector/tracer"]
tracer = ["inspector/tracer"]

# Enables parsing opcodes from strings.
parse = ["bytecode/parse"]

dev = [
	"memory_limit",
	"optional_balance_check",
	"optional_block_gas_limit",
	"optional_eip3541",
	"optional_eip3607",
	"optional_eip7623",
	"optional_no_base_fee",
]
memory_limit = ["context/memory_limit", "interpreter/memory_limit"]
optional_balance_check = ["context/optional_balance_check"]
optional_block_gas_limit = ["context/optional_block_gas_limit"]
optional_eip3541 = ["context/optional_eip3541"]
optional_eip3607 = ["context/optional_eip3607"]
optional_eip7623 = ["context/optional_eip7623"]
optional_no_base_fee = ["context/optional_no_base_fee"]
optional_fee_charge = ["context/optional_fee_charge"]
optional_priority_fee_check = ["context/optional_priority_fee_check"]

# Precompiles features: Please look at the comments in `precompile` crate for more information.

secp256k1 = ["precompile/secp256k1"] # See comments in `precompile` use it with caution
c-kzg = ["precompile/c-kzg"]

# blst will be enabled both for bls precompiles and for kzg precompile.
blst = ["precompile/blst"]
bn = ["precompile/bn"]
asm-sha2 = ["precompile/asm-sha2"]

# Compile in portable mode, without ISA extensions.
# Binary can be executed on all systems.
portable = ["precompile/portable"]

# Use GMP for accelerated modexp precompile. Dynamically links to libgmp at runtime.
gmp = ["precompile/gmp"]

# Use aws-lc-rs as a faster alternative to `p256` for secp256r1 signature verification.
p256-aws-lc-rs = ["precompile/p256-aws-lc-rs"]

# Statetest types for running ethereum tests
test-types = ["dep:statetest-types"]
