quickjs-emscripten • quickjs-emscripten • Readme | Exports
quickjs-emscripten / quickjs-emscripten / QuickJSAsyncEmscriptenModule
Typings for the features we use to interface with our Emscripten build of QuickJS.
FAST_MEMORY:
number
quickjs-emscripten.EmscriptenModule.FAST_MEMORY
packages/quickjs-ffi-types/dist/index.d.ts:261
HEAP16:
Int16Array
quickjs-emscripten.EmscriptenModule.HEAP16
packages/quickjs-ffi-types/dist/index.d.ts:252
HEAP32:
Int32Array
quickjs-emscripten.EmscriptenModule.HEAP32
packages/quickjs-ffi-types/dist/index.d.ts:253
HEAP8:
Int8Array
quickjs-emscripten.EmscriptenModule.HEAP8
packages/quickjs-ffi-types/dist/index.d.ts:251
HEAPF32:
Float32Array
quickjs-emscripten.EmscriptenModule.HEAPF32
packages/quickjs-ffi-types/dist/index.d.ts:257
HEAPF64:
Float64Array
quickjs-emscripten.EmscriptenModule.HEAPF64
packages/quickjs-ffi-types/dist/index.d.ts:258
HEAPU16:
Uint16Array
quickjs-emscripten.EmscriptenModule.HEAPU16
packages/quickjs-ffi-types/dist/index.d.ts:255
HEAPU32:
Uint32Array
quickjs-emscripten.EmscriptenModule.HEAPU32
packages/quickjs-ffi-types/dist/index.d.ts:256
HEAPU8:
Uint8Array
quickjs-emscripten.EmscriptenModule.HEAPU8
packages/quickjs-ffi-types/dist/index.d.ts:254
TOTAL_MEMORY:
number
quickjs-emscripten.EmscriptenModule.TOTAL_MEMORY
packages/quickjs-ffi-types/dist/index.d.ts:260
TOTAL_STACK:
number
quickjs-emscripten.EmscriptenModule.TOTAL_STACK
packages/quickjs-ffi-types/dist/index.d.ts:259
callbacks:
EmscriptenModuleCallbacks
packages/quickjs-ffi-types/dist/index.d.ts:302
type:
"async"
Implement this field
packages/quickjs-ffi-types/dist/index.d.ts:301
wasmBinary?:
ArrayBuffer
Compile this to WebAssembly.Module
quickjs-emscripten.EmscriptenModule.wasmBinary
packages/quickjs-ffi-types/dist/index.d.ts:218
wasmMemory?:
Memory
If provided, use this WebAssembly.Memory instead of an automatically created one.
quickjs-emscripten.EmscriptenModule.wasmMemory
packages/quickjs-ffi-types/dist/index.d.ts:220
UTF8ToString(
ptr
,maxBytesToRead
?):string
HeapChar to JS string. https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString
• ptr: BorrowedHeapCharPointer
• maxBytesToRead?: number
string
quickjs-emscripten.EmscriptenModule.UTF8ToString
packages/quickjs-ffi-types/dist/index.d.ts:246
_free(
ptr
):void
• ptr: number
void
quickjs-emscripten.EmscriptenModule._free
packages/quickjs-ffi-types/dist/index.d.ts:249
_malloc(
size
):number
• size: number
number
quickjs-emscripten.EmscriptenModule._malloc
packages/quickjs-ffi-types/dist/index.d.ts:248
cwrap(
ident
,returnType
,argTypes
,opts
?): (...args
) =>any
• ident: string
• returnType: null
| ValueType
• argTypes: ValueType
[]
• opts?: CCallOpts
Function
• ...args:
any
[]
any
quickjs-emscripten.EmscriptenModule.cwrap
packages/quickjs-ffi-types/dist/index.d.ts:250
optional
instantiateWasm(imports
,onSuccess
):Exports
|Promise
<Exports
>
Create an instance of the WASM module, call onSuccess(instance), then return instance.exports
• imports: Imports
• onSuccess: (instance
) => void
Exports
| Promise
<Exports
>
quickjs-emscripten.EmscriptenModule.instantiateWasm
packages/quickjs-ffi-types/dist/index.d.ts:222
lengthBytesUTF8(
str
):number
• str: string
number
quickjs-emscripten.EmscriptenModule.lengthBytesUTF8
packages/quickjs-ffi-types/dist/index.d.ts:247
optional
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.
• fileName: string
• prefix: string
Often ''
(empty string)
string
quickjs-emscripten.EmscriptenModule.locateFile
packages/quickjs-ffi-types/dist/index.d.ts:214
optional
monitorRunDependencies(left
):void
Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds.
• left: number
void
quickjs-emscripten.EmscriptenModule.monitorRunDependencies
packages/quickjs-ffi-types/dist/index.d.ts:224
stringToUTF8(
str
,outPtr
,maxBytesToRead
?):void
Write JS str
to HeapChar pointer.
https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8
• str: string
• outPtr: OwnedHeapCharPointer
• maxBytesToRead?: number
void
quickjs-emscripten.EmscriptenModule.stringToUTF8
packages/quickjs-ffi-types/dist/index.d.ts:241
Generated using typedoc-plugin-markdown and TypeDoc