WasmModule class final
A compiled WebAssembly module.
Modules belong to the engine that compiled them and can be instantiated in any number of WasmStores of that engine.
Constructors
- WasmModule.compile(WasmEngine engine, Uint8List bytes)
-
Compiles
bytes(a binary.wasmmodule).factory - WasmModule.deserialize(WasmEngine engine, Uint8List bytes)
-
Loads a module from bytes produced by serialize.
factory
Properties
- engine → WasmEngine
-
The engine the module was compiled with.
final
-
exports
→ List<
WasmExport> -
Everything the module provides once instantiated.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
imports
→ List<
WasmImport> -
Everything the module needs to be instantiated.
no setter
- isDisposed → bool
-
Whether the native object has already been released.
no setterinherited
-
pointer
→ Pointer<
wasmtime_module_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
-
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
-
serialize(
) → Uint8List -
Serialises the compiled artifact so it can be loaded again without
recompiling (~
WebAssembly.Modulecaching). -
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited