Options
All
  • Public
  • Public/Protected
  • All
Menu

WASM API.

Hierarchy

  • WASMAPI

Index

Properties

Methods

Properties

util

util: { strconst2wat: any }

WASM utilities.

Type declaration

  • strconst2wat: function
    • strconst2wat(str: string, stripComments?: boolean): String
    • Converts a string constant to wasm.

      Parameters

      • str: string

        The string to convert.

      • Optional stripComments: boolean

        Whether to strip comments. This is optional and set to false by default.

      Returns String

Methods

execPrgm

  • execPrgm(path: String, suppressErrors?: Boolean): Promise<ExportValue>
  • Executes a WASM binary.

    Parameters

    • path: String

      The path of the WebAssembly file to load.

    • Optional suppressErrors: Boolean

      Whether to suppress errors. This is optional and set to false by default.

    Returns Promise<ExportValue>

loadLocal

  • loadLocal(path: String, exposeStandardImports?: Boolean): Promise<WebAssemblyInstantiatedSource>
  • Loads a wasm file locally.

    Parameters

    • path: String

      The path of the WebAssembly file to load.

    • Optional exposeStandardImports: Boolean

      Whether to expose standard Windows 96 API imports for WASM. This is optional and set to true by default.

    Returns Promise<WebAssemblyInstantiatedSource>

Generated using TypeDoc