Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Module

A JavaScript representation of a WebAssembly module. Each field corresponds to a section in the WebAssembly module structure

Hierarchy

  • Module

Index

Properties

code

Declares the functions' actual code along with any local variables used.

customSections

customSections: CustomSection[]

Declares the module's custom sections. Often used to pass debug data.

data

Declares the module's constant data. The data can then be loaded into memory, either at a pre-defined offset or at runtime.

Optional dataCount

dataCount: DataCountSection

Declares the number of data segments. Used to make validation simpler

elements

elements: ElementSection

Declares the elements contained in the tables defined in the table section.

exports

exports: ExportSection

Declares the module's exports. Like imports, modules can export functions, memories, tables and globals.

functions

functions: FunctionSection

Declares the module's functions. Deceptively simply, as this is just a list of indexes into the type section

globals

globals: GlobalSection

Declares the module's global variables. Globals can be declared immutable or mutable.

imports

imports: ImportSection

Declares the module's imports. Modules can import functions, memories, tables, and globals

memories

memories: MemorySection

Declares the module's memories. WebAssembly has load and store operations which apply to the memory. As of right now, only one memory is allowed per module.

Optional start

Declares the module's start function. If it's declared, this function is run on module initialization

tables

tables: TableSection

Declares the module's tables. Tables are used to store references, such as function references for dynamic dispatch.

types

Declares the module's function types. The types are for both imported and internally defined functions

Generated using TypeDoc