package
0.3.1
Repository: https://github.com/wasmerio/go-ext-wasm.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

Compile compiles a WebAssembly module from bytes.
DeserializeModule deserializes a sequence of bytes into a module.
F32 constructs a WebAssembly value of type `f32`.
F64 constructs a WebAssembly value of type `f64`.
GetLastError returns the last error message if any, otherwise returns an error.
I32 constructs a WebAssembly value of type `i32`.
I64 constructs a WebAssembly value of type `i64`.
IntoInstanceContext casts the first `context unsafe.Pointer` argument of an imported function into an `InstanceContext`.
NewDefaultWasiImportObject constructs a new `ImportObject` with WASI host imports.
NewDefaultWasiImportObjectForVersion is similar to `NewDefaultWasiImportObject` but it specifies the WASI version.
NewExportedFunctionError constructs a new `ExportedFunctionError`, where `functionName` is the name of the exported function, and `message` is the error message.
NewImportedFunctionError constructs a new `ImportedFunctionError`, where `functionName` is the name of the imported function, and `message` is the error message.
NewImportObject creates an empty `ImportObject`.
NewImportObjectError constructs a new `ImportObjectError`.
NewImports constructs a new empty `Imports`.
NewInstance constructs a new `Instance` with no imports.
NewInstanceError constructs a new `InstanceError`.
NewInstanceWithImports constructs a new `Instance` with imports.
NewMemory instantiates a new owned WebAssembly memory, bound for imported memory.
NewMemoryError constructs a new `MemoryError`.
NewModuleError constructs a new `ModuleError`.
NewWasiImportObject creates an `ImportObject` with the default WASI imports.
NewWasiImportObjectForVersion is similar to `NewWasiImportObject` but it specifies the WASI version.
ReadBytes reads a `.wasm` file and returns its content as an array of bytes.
Validate validates a sequence of bytes that is supposed to represent a valid WebAssembly module.
WasiGetVersion returns the WASI version of a module if any, other `Unknown` is returned.

# Constants

ImportExportKindFunction represents an import/export descriptor of kind function.
ImportExportKindGlobal represents an import/export descriptor of kind global.
ImportExportKindMemory represents an import/export descriptor of kind memory.
ImportExportKindTable represents an import/export descriptor of kind table.
Latest represents the latest WASI version.
Snapshot0 represents the `wasi_unstable` WASI version.
Snapshot1 represents the `wasi_snapshot1_preview` WASI version.
TypeF32 represents the WebAssembly `f32` type.
TypeF64 represents the WebAssembly `f64` type.
TypeI32 represents the WebAssembly `i32` type.
TypeI64 represents the WebAssembly `i64` type.
TypeVoid represents nothing.
Unknown represents an unknown WASI version.

# Structs

ExportDescriptor represents an export descriptor of a WebAssembly module.
ExportedFunctionError represents any kind of errors related to a WebAssembly exported function.
ImportDescriptor represents an import descriptor of a WebAssembly module.
ImportedFunctionError represents any kind of errors related to a WebAssembly imported function.
ImportFunction represents a WebAssembly instance imported function.
ImportMemory represents a WebAssembly instance imported memory.
ImportObject owns a set of imports.
ImportObjectError represents errors related to `ImportObject`s.
Imports represents a set of imported functions for a WebAssembly instance.
Instance represents a WebAssembly instance.
InstanceContext represents a way to access instance API from within an imported context.
InstanceError represents any kind of errors related to a WebAssembly instance.
MapDirEntry is an entry that can be passed to `NewWasiImportObject`.
Memory represents a WebAssembly memory.
MemoryError represents any kind of errors related to a WebAssembly memory.
Module represents a WebAssembly module.
ModuleError represents any kind of errors related to a WebAssembly module.
Value represents a WebAssembly value of a particular type.

# Interfaces

Import represents a WebAssembly instance imported function or memory.

# Type aliases

ImportExportKind represents an import/export descriptor kind/type.
ValueType represents the `Value` type.
WasiVersion represents the WASI version.