Sigil documentation
ReferenceRust referencesigil-wasm

sigil-wasm · executor

Source declarations, signatures and documentation for executor.

Source: sigil/node/sigil-wasm/src/executor.rs. SHA-256: d68c921eadbd9d53fc9f1ae7d11f25ef3bce9877bd0eea551040feae68898f90.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

executor::CallOutput

Per-call output. output is the bytes the contract returned via anvil_set_return; empty if it returned nothing.

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CallOutput {
pub status: i32,
pub gas_used: u64,
pub output: Vec<u8>,
pub host_error: Option<HostError>
}

Source line: 36.

executor::CallSettings

Settings for a single contract invocation.

#[derive(Debug, Clone)]
pub struct CallSettings {
pub gas_budget: u64,
pub entrypoint: String
}

Source line: 45.

executor::execute_call

Compile + run a contract entrypoint with a fresh Store.

On any trap, returns Err(WasmError::Trap). The backend value is consumed and dropped — any mutations it staged in an overlay are discarded. The caller MUST treat trap as a hard rollback.

On success, the backend is returned alongside the CallOutput so the caller can commit() staged mutations to the underlying chain state.

pub fn execute_call<B: HostBackend>(
    engine: &WasmEngine,
    module: &Module,
    backend: B,
    settings: &CallSettings,
    args: &[u8],
) -> Result<(CallOutput, B), WasmError>;

Source line: 89.

On this page