# WasmRuntime

WasmRuntime

## Constructor

#### new WasmRuntime()

Source:
  - ndwasm.js, line 75

### Methods

#### createBuffer() → {WasmBuffer}

Description:

  - Quickly allocates a buffer.

Source:
  - ndwasm.js, line 168

##### Returns:

Type
  WasmBuffer

#### (async) init(optionsopt)

Description:

  - Initializes the Go WASM environment.

Source:
  - ndwasm.js, line 91

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---

`options`

object

<optional>

Optional configuration.

###### Properties

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`wasmUrl` | string | <optional> | `'./ndarray_plugin.wasm'` | Path or URL to the wasm file.
`execUrl` | string | <optional> | `'./wasm_exec.js'` | Path to the wasm_exec.js file (Node.js only).
`initialMemoryPages` | number | <optional> |  | Initial memory size in 64KiB pages.
`maximumMemoryPages` | number | <optional> |  | Maximum memory size in 64KiB pages.
`baseDir` | string | <optional> | `'.'` |