Understand the revm crate ecosystem
mainThe revm project is modularized into several specialized crates. Depending on your needs, you can use the main revm crate which re-exports all other crates, or select specific components to minimize dependencies:
- Core Execution:
revm(main entry point),revm-interpreter(contains all instructions), andrevm-handler(manages validation, pre/post execution, and call frames). - State & Data:
revm-database-interface(traits for fetching state),revm-database(implementations of the database interface),revm-state(account and storage types), andrevm-primitives(constants and primitive types). - Ethereum Compatibility:
revm-precompile(Ethereum-defined precompiled contracts) andrevm-bytecode(opcode tables, legacy analysis, and EOF validation). - Context & Tracing:
revm-context-interface(traits for Block/Transaction/Cfg/Journal),revm-context(default implementations for those traits), andrevm-inspector(supports inspectors and EIP-3155 tracer). - Testing:
revm-statetest-types(structs for state testing).