WasmEngine class final
A wasmtime engine: it owns the compiler and the global runtime state.
One engine can back any number of WasmStores, and compiled modules can be instantiated in all of them.
- Available extensions
Constructors
- WasmEngine()
- An engine with wasmtime's default configuration.
- WasmEngine.configured(void configure(WasmConfig config))
-
An engine built from a WasmConfig that
configurefills in.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether the native object has already been released.
no setterinherited
-
pointer
→ Pointer<
wasm_engine_t> -
The native pointer, for use by the layers above.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkNotDisposed(
) → void -
Throws a StateError if this object has been disposed.
inherited
-
compile(
Uint8List bytes) → WasmModule -
Available on WasmEngine, provided by the WasmEngineCompilation extension
Compilesbytesinto a module (see WasmModule.compile). -
deserialize(
Uint8List bytes) → WasmModule -
Available on WasmEngine, provided by the WasmEngineCompilation extension
Loads a module from a WasmModule.serialize blob. -
disown(
) → void -
Gives up ownership without releasing the object.
inherited
-
dispose(
) → void -
Releases the native object. Idempotent.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
Uint8List bytes) → bool -
Whether
bytesis a well formed module for this engine.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited