Module engine

Source
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_middlewaremiddlewares
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_nanssys
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_configsys
Create a new wasm_engine_t backed by a sys engine.