Skip to main content

Crate thruput_native_exec

Crate thruput_native_exec 

Source
Expand description

Native execution environment for testing Thruput contracts in-process.

The entry point is test_environment::TestEnvironment, an in-memory Thruput instance against which tests run mocked transactions and assert on their results.

Re-exports§

pub use host_fn_error::perform_mocked_syscall;
pub use try_commit_result::TryCommitResult;

Modules§

frame_builder
Fluent builders for configuring and executing invocation frames.
frame_result
Per-frame results (status, buffers, trace, events) and their assertions.
host_fn_error
The mocked syscall entrypoint bridging guest syscalls to the test FFI.
invoke_error
Panic payloads and the panic hook that classify frame unwinds.
mock_contract
Mock contracts: native closures registered as contract entrypoints.
mock_transaction_handler
The mocked transaction handler and its invocation-frame state machine.
network_config
The chain’s execution parameters, and a builder for non-default ones.
rv32_stack_usage
The rv32 stack-usage record the test FFI keeps per rv32 invocation. The rv32 guest stack-usage diagnostic the test FFI records per invocation.
test_environment
The in-process thruput test environment.
test_environment_builder
Optional builder for a test environment with non-default settings.
test_helpers
Small conveniences for writing tests (deterministic named addresses).
transact_result
Whole-transaction results (root frame + commit outcome) and assertions.
transaction_builder
Builder for configuring a mocked transaction before executing it.
transaction_handler
Handler for executing full signed transactions against the environment.
try_commit_result
Typed outcome of a two-phase transaction commit.