Skip to content

Latest commit

 

History

History
180 lines (99 loc) · 4.27 KB

CustomizeVariantOptions.md

File metadata and controls

180 lines (99 loc) · 4.27 KB

quickjs-emscriptenquickjs-emscriptenReadme | Exports


quickjs-emscripten / quickjs-emscripten / CustomizeVariantOptions

Interface: CustomizeVariantOptions

Contents

Properties

emscriptenModule?

emscriptenModule?: EmscriptenModuleLoaderOptions

The enumerable properties of this object will be passed verbatim, although they may be overwritten if you pass other options.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1567


locateFile?

locateFile?: (fileName, prefix) => string

If set, this method will be called when the runtime needs to load a file, such as a .wasm WebAssembly file, .mem memory init file, or a file generated by the file packager.

The function receives two parameters:

  • fileName, the relative path to the file as configured in build process, eg "emscripten-module.wasm".
  • prefix (path to the main JavaScript file’s directory). This may be '' (empty string) in some cases if the Emscripten Javascript code can't locate itself. Try logging it in your environment.

It should return the actual URI or path to the requested file.

This lets you host file packages on a different location than the directory of the JavaScript file (which is the default expectation), for example if you want to host them on a CDN.

Parameters

fileName: string

prefix: string

Often '' (empty string)

Returns

string

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1565


log?

log?: (...data) => void(message?, ...optionalParams) => void

Debug logger

Parameters

• ...data: any[]

Returns

void

Debug logger

Parameters

message?: any

• ...optionalParams?: any[]

Returns

void

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1569


wasmBinary?

wasmBinary?: OrLoader<ArrayBuffer>

If given, Emscripten will compile the WebAssembly.Module from these bytes.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1537


wasmLocation?

wasmLocation?: string

If given, Emscripten will try to load the WebAssembly module data from this location (path or URI) as appropriate for the current platform.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1535


wasmMemory?

wasmMemory?: OrLoader<Memory>

If given, use the Memory when instantiating the WebAssembly.Instance.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1541


wasmModule?

wasmModule?: OrLoader<Module>

If given, Emscripten will instantiate the WebAssembly.Instance from this existing WebAssembly.Module

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1539


wasmSourceMapData?

wasmSourceMapData?: OrLoader<string | SourceMapData>

If given, we will provide the source map to Emscripten directly. This may only be respected if wasmModule is also provided.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1545


wasmSourceMapLocation?

wasmSourceMapLocation?: string

If given, Emscripten will try to load the source map for the WebAssembly module from this location (path or URI) as appropriate for the current platform.

Source

packages/quickjs-emscripten-core/dist/index.d.ts:1543


Generated using typedoc-plugin-markdown and TypeDoc