Package-level declarations

Types

Link copied to clipboard
class CompileError(message: String = definedExternally) : JsError
Link copied to clipboard
open class Exception(tag: Tag, payload: ReadonlyArray<JsAny?>, options: ExceptionOptions = definedExternally)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias ExportValue = JsAny
Link copied to clipboard
open class Global<T : JsAny?>(descriptor: GlobalDescriptor<T>, v: T = definedExternally)

A WebAssembly.Global object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more WebAssembly.Module instances.

Link copied to clipboard
interface GlobalDescriptor<T : JsAny?>
Link copied to clipboard
sealed interface ImportExportKind
Link copied to clipboard
Link copied to clipboard
typealias ImportValue = JsAny
Link copied to clipboard
open class Instance(module: Module, importObject: Imports = definedExternally)

A WebAssembly.Instance object is a stateful, executable instance of a WebAssembly.Module.

Link copied to clipboard
class LinkError(message: String = definedExternally) : JsError
Link copied to clipboard
open class Memory(descriptor: MemoryDescriptor)

The WebAssembly.Memory object is a resizable ArrayBuffer or SharedArrayBuffer that holds raw bytes of memory accessed by a WebAssembly.Instance.

Link copied to clipboard
Link copied to clipboard
open class Module(bytes: BufferSource)

A WebAssembly.Module object contains stateless WebAssembly code that has already been compiled by the browser — this can be efficiently shared with Workers, and instantiated multiple times.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class RuntimeError(message: String = definedExternally) : JsError
Link copied to clipboard
open class Table(descriptor: TableDescriptor, value: JsAny? = definedExternally)

The WebAssembly.Table object is a JavaScript wrapper object — an array-like structure representing a WebAssembly table, which stores homogeneous references.

Link copied to clipboard
interface TableDescriptor
Link copied to clipboard
sealed interface TableKind
Link copied to clipboard
open class Tag(type: TagType)
Link copied to clipboard
interface TagType
Link copied to clipboard
sealed interface ValueType<T : JsAny?>

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun compile(bytes: BufferSource): Module
Link copied to clipboard
Link copied to clipboard
inline suspend fun compileStreaming(source: PromiseLike<Response>): Module
inline suspend fun compileStreaming(source: Response): Module
Link copied to clipboard
inline suspend fun instantiate(moduleObject: Module): Instance
inline suspend fun instantiate(bytes: BufferSource, importObject: Imports): WebAssemblyInstantiatedSource
inline suspend fun instantiate(moduleObject: Module, importObject: Imports): Instance
Link copied to clipboard
external fun instantiateAsync(bytes: BufferSource, importObject: Imports = definedExternally): Promise<WebAssemblyInstantiatedSource>
external fun instantiateAsync(moduleObject: Module, importObject: Imports = definedExternally): Promise<Instance>
Link copied to clipboard
external fun instantiateStreamingAsync(source: PromiseLike<Response>, importObject: Imports = definedExternally): Promise<WebAssemblyInstantiatedSource>

external fun instantiateStreamingAsync(source: Response, importObject: Imports = definedExternally): Promise<WebAssemblyInstantiatedSource>
Link copied to clipboard