Expand description
An engine drives the compilation and the runtime.
Entry points: A default engine is created with
wasm_engine_new
and freed with
wasm_engine_delete
.
§Example
The simplest way to get a default engine is the following:
int main() {
// Create the engine.
wasm_engine_t* engine = wasm_engine_new();
// Check we have a valid engine!
assert(engine);
// Free everything.
wasm_engine_delete(engine);
return 0;
}
To configure the engine, see the wasm_config_new
.
Re-exports§
pub use super::unstable::engine::wasm_config_set_features;
pub use crate::wasm_c_api::unstable::middlewares::wasmer_middleware_t;
middlewares
Structs§
- wasm_
config_ t - A configuration holds the compiler and the engine used by the store.
- wasm_
engine_ t - An engine is used by the store to drive the compilation and the execution of a WebAssembly module.
Enums§
- wasmer_
backend_ t - Kind of engines that can be used by the store.
Functions§
- wasm_
config_ delete - Delete a Wasmer config object.
- wasm_
config_ new - Create a new default Wasmer configuration.
- wasm_
config_ push_ middleware middlewares
- Updates the configuration to add a module middleware.
- wasm_
config_ set_ backend - Updates the configuration to specify a particular engine to use.
- wasm_
config_ set_ target - Unstable non-standard Wasmer-specific API to update the configuration to specify a particular target for the engine.
- wasm_
config_ sys_ canonicalize_ nans sys
- Updates the configuration to enable NaN canonicalization.
- wasm_
engine_ ⚠delete - Deletes an engine.
- wasm_
engine_ new - wasm_
engine_ new_ with_ config - Creates an engine with a particular configuration.
- wasm_
sys_ engine_ new_ with_ config sys
- Create a new
wasm_engine_t
backed by asys
engine.