Module class
Compiled WebAssembly module.
A Module can be compiled from Uint8List or ByteBuffer source data. When data length exceeds 4 KB, some runtimes may require asynchronous compilation via Module.fromBufferAsync or Module.fromBytesAsync.
- Annotations
Constructors
- Module.fromBuffer(ByteBuffer buffer)
-
Synchronously compiles WebAssembly Module from ByteBuffer source.
factory
- Module.fromBytes(Uint8List bytes)
-
Synchronously compiles WebAssembly Module from Uint8List source.
factory
Properties
-
exports
→ List<
ModuleExportDescriptor> -
Builds and returns a list of module's export descriptors.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
-
imports
→ List<
ModuleImportDescriptor> -
Builds and returns a list of module's import descriptors.
no setter
- jsObject → _Module
-
JavaScript
WebAssembly.Module
objectfinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
customSections(
String sectionName) → List< ByteBuffer> -
Returns a List of module's custom binary sections by
sectionName
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromBufferAsync(
ByteBuffer buffer) → Future< Module> - Asynchronously compiles WebAssembly Module from ByteBuffer source.
-
fromBytesAsync(
Uint8List bytes) → Future< Module> - Asynchronously compiles WebAssembly Module from Uint8List source.
-
validateBuffer(
ByteBuffer buffer) → bool -
Returns
true
if provided WebAssembly ByteBuffer source is valid. -
validateBytes(
Uint8List bytes) → bool -
Returns
true
if provided WebAssembly Uint8List source is valid.