Skip to main content

revm_interpreter/
lib.rs

1//! # revm-interpreter
2//!
3//! Interpreter is part of the project that executes EVM instructions.
4#![cfg_attr(not(test), warn(unused_crate_dependencies))]
5#![cfg_attr(not(feature = "std"), no_std)]
6
7#[cfg(not(feature = "std"))]
8extern crate alloc as std;
9
10#[macro_use]
11mod macros;
12
13/// Gas calculation utilities and constants.
14pub mod gas;
15/// Context passed to instruction implementations.
16pub mod instruction_context;
17/// Instruction execution results and success/error types.
18mod instruction_result;
19/// EVM instruction implementations organized by category.
20pub mod instructions;
21/// Core interpreter implementation for EVM bytecode execution.
22pub mod interpreter;
23/// Types for interpreter actions like calls and contract creation.
24pub mod interpreter_action;
25/// Type traits and definitions for interpreter customization.
26pub mod interpreter_types;
27
28pub use bytecode;
29pub use context_interface;
30pub use primitives;
31pub use state;
32
33// Reexport primary types.
34pub use context_interface::{
35    cfg::gas::InitialAndFloorGas,
36    context::{SStoreResult, SelfDestructResult, StateLoad},
37    host, CreateScheme, Host,
38};
39pub use gas::Gas;
40pub use instruction_context::InstructionContext;
41pub use instruction_result::*;
42pub use instructions::{instruction_table, Instruction, InstructionTable};
43pub use interpreter::{
44    num_words, InputsImpl, Interpreter, InterpreterResult, SharedMemory, Stack, STACK_LIMIT,
45};
46pub use interpreter_action::{
47    CallInput, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome,
48    FrameInput, InterpreterAction,
49};
50pub use interpreter_types::InterpreterTypes;