logo
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::wasmer_is_compiler_available;
pub use super::unstable::engine::wasm_config_set_features;
pub use super::unstable::engine::wasm_config_set_target;
pub use super::unstable::engine::wasmer_is_engine_available;
pub use super::unstable::middlewares::wasm_config_push_middleware;

Structs

A configuration holds the compiler and the engine used by the store.

An engine is used by the store to drive the compilation and the execution of a WebAssembly module.

Enums

Kind of compilers that can be used by the engines.

Kind of engines that can be used by the store.

Functions

Delete a Wasmer config object.

Create a new default Wasmer configuration.

Updates the configuration to specify a particular compiler to use.

Updates the configuration to specify a particular engine to use.

Deletes an engine.

Creates a new Universal engine with the default compiler.

Creates an engine with a particular configuration.