Skip to main content

soil_client/executor/wasmtime/
mod.rs

1// This file is part of Soil.
2
3// Copyright (C) Soil contributors.
4// Copyright (C) Parity Technologies (UK) Ltd.
5// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
6
7//! Defines a `WasmRuntime` that uses the Wasmtime JIT to execute.
8//!
9//! You can choose a profiling strategy at runtime with
10//! environment variable `WASMTIME_PROFILING_STRATEGY`:
11//!
12//! | `WASMTIME_PROFILING_STRATEGY` | Effect |
13//! |-------------|-------------------------|
14//! | undefined   | No profiling            |
15//! | `"jitdump"` | jitdump profiling       |
16//! | `"perfmap"` | perfmap profiling       |
17//! | other value | No profiling (warning)  |
18
19mod host;
20mod imports;
21mod instance_wrapper;
22mod runtime;
23mod util;
24
25#[cfg(test)]
26mod tests;
27
28pub use crate::executor::common::{
29	runtime_blob::RuntimeBlob,
30	wasm_runtime::{HeapAllocStrategy, WasmModule},
31};
32pub use runtime::{
33	create_runtime, create_runtime_from_artifact, create_runtime_from_artifact_bytes,
34	prepare_runtime_artifact, Config, DeterministicStackLimit, InstantiationStrategy, Semantics,
35	WasmtimeRuntime,
36};