#![no_std]
#![warn(
clippy::cast_lossless,
clippy::missing_errors_doc,
clippy::used_underscore_binding,
clippy::redundant_closure_for_method_calls,
clippy::type_repetition_in_bounds,
clippy::inconsistent_struct_constructor,
clippy::default_trait_access,
clippy::items_after_statements
)]
#![cfg_attr(
all(feature = "unstable", not(feature = "stable")),
feature(explicit_tail_calls),
expect(incomplete_features)
)]
#![recursion_limit = "1000"]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
#[macro_use]
mod foreach_tuple;
#[cfg(test)]
pub mod tests;
#[macro_use]
mod handle;
mod engine;
mod error;
mod func;
mod global;
mod instance;
mod limits;
mod linker;
mod memory;
mod module;
mod reftype;
mod store;
mod table;
mod value;
mod core {
#[cfg(feature = "simd")]
pub use wasmi_core::simd;
pub use wasmi_core::{
ElementSegment as CoreElementSegment,
Fuel,
FuelCostsProvider,
FuncType as CoreFuncType,
Global as CoreGlobal,
IndexType,
LimiterError,
Memory as CoreMemory,
MemoryType as CoreMemoryType,
MemoryTypeBuilder as CoreMemoryTypeBuilder,
RawRef,
RawVal,
ReadAs,
ResourceLimiterRef,
Table as CoreTable,
TableType as CoreTableType,
Typed,
TypedRawRef,
TypedRawVal,
WriteAs,
hint,
wasm,
};
}
#[doc(inline)]
use wasmi_collections as collections;
#[doc(inline)]
use wasmi_ir as ir;
pub mod errors {
pub use super::{
engine::EnforcedLimitsError,
error::ErrorKind,
func::FuncError,
ir::Error as IrError,
linker::LinkerError,
module::{InstantiationError, ReadError},
};
pub use wasmi_core::{FuelError, GlobalError, HostError, MemoryError, TableError};
}
pub use self::{
engine::{
CompilationMode,
Config,
EnforcedLimits,
Engine,
EngineWeak,
ResumableCall,
ResumableCallHostTrap,
ResumableCallOutOfFuel,
TypedResumableCall,
TypedResumableCallHostTrap,
TypedResumableCallOutOfFuel,
},
error::Error,
func::{
Caller,
Func,
FuncType,
IntoFunc,
TypedFunc,
WasmParams,
WasmResults,
WasmRet,
WasmTy,
WasmTyList,
},
global::Global,
instance::{Export, ExportsIter, Extern, ExternType, Instance},
limits::{StoreLimits, StoreLimitsBuilder},
linker::Linker,
memory::{Memory, MemoryType, MemoryTypeBuilder},
module::{
CustomSection,
CustomSectionsIter,
ExportType,
ImportType,
Module,
ModuleExportsIter,
ModuleImportsIter,
Read,
},
reftype::{ExternRef, Nullable, Ref},
store::{AsContext, AsContextMut, CallHook, Store, StoreContext, StoreContextMut},
table::{Table, TableType},
value::Val,
};
use self::{
func::FuncEntity,
handle::{Handle, RawHandle},
instance::{InstanceEntity, InstanceEntityBuilder},
memory::DataSegmentEntity,
table::ElementSegment,
};
pub use wasmi_core::{
F32,
F64,
GlobalType,
Mutability,
RefType,
ResourceLimiter,
TrapCode,
V128,
ValType,
};