#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
#![deny(unsafe_code)]
#![deny(unused_must_use)]
#![deny(unused_crate_dependencies)]
#![deny(
clippy::arithmetic_side_effects,
clippy::cast_sign_loss,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::string_slice
)]
#[doc(hidden)] pub extern crate alloc;
extern crate core;
#[cfg(feature = "std")]
extern crate libm as _; #[cfg(test)]
use criterion as _;
pub mod backtrace;
pub mod call;
pub mod checked_transaction;
pub mod constraints;
pub mod consts;
pub mod context;
mod convert;
pub mod crypto;
pub mod error;
pub mod interpreter;
pub mod memory_client;
pub mod pool;
pub mod predicate;
pub mod state;
pub mod storage;
pub mod transactor;
pub mod util;
#[cfg(feature = "profile-any")]
pub mod profiler;
#[cfg(test)]
mod tests;
#[cfg(not(feature = "profile-any"))]
pub mod profiler {
use crate::constraints::InstructionLocation;
#[derive(Default, Debug, Clone)]
pub struct Profiler;
impl Profiler {
pub fn set_coverage(&mut self, _location: InstructionLocation) {}
pub fn add_gas(&mut self, _location: InstructionLocation, _gas_use: u64) {}
}
}
#[doc(no_inline)]
pub use fuel_asm;
#[doc(no_inline)]
pub use fuel_crypto;
#[doc(no_inline)]
pub use fuel_merkle;
#[doc(no_inline)]
pub use fuel_storage;
#[doc(no_inline)]
pub use fuel_tx;
#[doc(no_inline)]
pub use fuel_types;
pub mod prelude {
#[doc(no_inline)]
pub use fuel_asm::{
GMArgs,
GTFArgs,
Instruction,
Opcode,
PanicReason,
RegId,
};
#[doc(no_inline)]
pub use fuel_crypto::{
Hasher,
Message,
PublicKey,
SecretKey,
Signature,
};
#[doc(no_inline)]
pub use fuel_storage::{
MerkleRoot,
MerkleRootStorage,
StorageAsMut,
StorageAsRef,
StorageInspect,
StorageMutate,
};
#[doc(no_inline)]
pub use fuel_tx::*;
#[doc(no_inline)]
pub use fuel_types::{
Address,
AssetId,
Bytes32,
Bytes4,
Bytes64,
Bytes8,
ContractId,
Immediate06,
Immediate12,
Immediate18,
Immediate24,
RegisterId,
Salt,
Word,
};
pub use crate::{
backtrace::Backtrace,
call::{
Call,
CallFrame,
},
context::Context,
error::{
Bug,
BugVariant,
InterpreterError,
RuntimeError,
},
interpreter::{
ExecutableTransaction,
Interpreter,
Memory,
MemoryInstance,
MemoryRange,
},
memory_client::MemoryClient,
pool::VmMemoryPool,
predicate::RuntimePredicate,
state::{
Debugger,
ProgramState,
StateTransition,
StateTransitionRef,
},
storage::{
InterpreterStorage,
MemoryStorage,
PredicateStorage,
},
transactor::Transactor,
};
pub use crate::state::{
Breakpoint,
DebugEval,
};
#[cfg(any(test, feature = "test-helpers"))]
pub use crate::util::test_helpers::TestBuilder;
#[cfg(any(test, feature = "test-helpers"))]
pub use crate::checked_transaction::{
builder::TransactionBuilderExt,
IntoChecked,
};
#[cfg(all(
feature = "profile-gas",
feature = "std",
any(test, feature = "test-helpers")
))]
pub use crate::util::gas_profiling::GasProfiler;
pub use crate::profiler::Profiler;
#[cfg(feature = "profile-any")]
pub use crate::profiler::{
CoverageProfilingData,
GasProfilingData,
InstructionLocation,
PerLocationIter,
PerLocationKeys,
PerLocationValues,
ProfileReceiver,
ProfilingData,
StderrReceiver,
};
}