Skip to content

Latest commit

 

History

History
1399 lines (735 loc) · 36.4 KB

File metadata and controls

1399 lines (735 loc) · 36.4 KB

quickjs-emscriptenquickjs-emscripten-coreReadme | Exports


quickjs-emscripten / quickjs-emscripten-core / QuickJSFFI

Interface: QuickJSFFI

Low-level FFI bindings to QuickJS's Emscripten module. See instead QuickJSContext, the public Javascript interface exposed by this library.

Contents

Unstable

The FFI interface is considered private and may change.

Properties

DEBUG

readonly DEBUG: boolean

Set at compile time.

Source

packages/quickjs-ffi-types/src/ffi.ts:38


QTS_ArgvGetJSValueConstPointer

QTS_ArgvGetJSValueConstPointer: (argv, index) => JSValueConstPointer

Parameters

argv: JSValuePointer | JSValueConstPointer

index: number

Returns

JSValueConstPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:198


QTS_BuildIsAsyncify

QTS_BuildIsAsyncify: () => number

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:196


QTS_BuildIsDebug

QTS_BuildIsDebug: () => number

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:195


QTS_BuildIsSanitizeLeak

QTS_BuildIsSanitizeLeak: () => number

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:46


QTS_Call

QTS_Call: (ctx, func_obj, this_obj, argc, argv_ptrs) => JSValuePointer

Parameters

ctx: JSContextPointer

func_obj: JSValuePointer | JSValueConstPointer

this_obj: JSValuePointer | JSValueConstPointer

argc: number

argv_ptrs: JSValueConstPointerPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:140


QTS_DefineProp

QTS_DefineProp: (ctx, this_val, prop_name, prop_value, get, set, configurable, enumerable, has_value) => void

Parameters

ctx: JSContextPointer

this_val: JSValuePointer | JSValueConstPointer

prop_name: JSValuePointer | JSValueConstPointer

prop_value: JSValuePointer | JSValueConstPointer

get: JSValuePointer | JSValueConstPointer

set: JSValuePointer | JSValueConstPointer

configurable: boolean

enumerable: boolean

has_value: boolean

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:122


QTS_Dump

QTS_Dump: (ctx, obj) => JSBorrowedCharPointer

Parameters

ctx: JSContextPointer

obj: JSValuePointer | JSValueConstPointer

Returns

JSBorrowedCharPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:148


QTS_DupValuePointer

QTS_DupValuePointer: (ctx, val) => JSValuePointer

Parameters

ctx: JSContextPointer

val: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:60


QTS_Eval

QTS_Eval: (ctx, js_code, js_code_length, filename, detectModule, evalFlags) => JSValuePointer

Parameters

ctx: JSContextPointer

js_code: BorrowedHeapCharPointer

js_code_length: number

filename: string

detectModule: EvalDetectModule

evalFlags: EvalFlags

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:152


QTS_ExecutePendingJob

QTS_ExecutePendingJob: (rt, maxJobsToExecute, lastJobContext) => JSValuePointer

Parameters

rt: JSRuntimePointer

maxJobsToExecute: number

lastJobContext: JSContextPointerPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:101


QTS_FreeCString

QTS_FreeCString: (ctx, str) => void

Parameters

ctx: JSContextPointer

str: JSBorrowedCharPointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:59


QTS_FreeContext

QTS_FreeContext: (ctx) => void

Parameters

ctx: JSContextPointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:55


QTS_FreeRuntime

QTS_FreeRuntime: (rt) => void

Parameters

rt: JSRuntimePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:53


QTS_FreeValuePointer

QTS_FreeValuePointer: (ctx, value) => void

Parameters

ctx: JSContextPointer

value: JSValuePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:56


QTS_FreeValuePointerRuntime

QTS_FreeValuePointerRuntime: (rt, value) => void

Parameters

rt: JSRuntimePointer

value: JSValuePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:57


QTS_FreeVoidPointer

QTS_FreeVoidPointer: (ctx, ptr) => void

Parameters

ctx: JSContextPointer

ptr: JSVoidPointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:58


QTS_GetArrayBuffer

QTS_GetArrayBuffer: (ctx, data) => JSVoidPointer

Parameters

ctx: JSContextPointer

data: JSValuePointer | JSValueConstPointer

Returns

JSVoidPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:82


QTS_GetArrayBufferLength

QTS_GetArrayBufferLength: (ctx, data) => number

Parameters

ctx: JSContextPointer

data: JSValuePointer | JSValueConstPointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:86


QTS_GetDebugLogEnabled

QTS_GetDebugLogEnabled: (rt) => number

Parameters

rt: JSRuntimePointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:193


QTS_GetFalse

QTS_GetFalse: () => JSValueConstPointer

Returns

JSValueConstPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:50


QTS_GetFloat64

QTS_GetFloat64: (ctx, value) => number

Parameters

ctx: JSContextPointer

value: JSValuePointer | JSValueConstPointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:76


QTS_GetGlobalObject

QTS_GetGlobalObject: (ctx) => JSValuePointer

Parameters

ctx: JSContextPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:179


QTS_GetLength

QTS_GetLength: (ctx, out_len, value) => number

Parameters

ctx: JSContextPointer

out_len: UInt32Pointer

value: JSValuePointer | JSValueConstPointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:168


QTS_GetModuleNamespace

QTS_GetModuleNamespace: (ctx, module_func_obj) => JSValuePointer

Parameters

ctx: JSContextPointer

module_func_obj: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:160


QTS_GetNull

QTS_GetNull: () => JSValueConstPointer

Returns

JSValueConstPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:49


QTS_GetOwnPropertyNames

QTS_GetOwnPropertyNames: (ctx, out_ptrs, out_len, obj, flags) => JSValuePointer

Parameters

ctx: JSContextPointer

out_ptrs: JSValuePointerPointerPointer

out_len: UInt32Pointer

obj: JSValuePointer | JSValueConstPointer

flags: number

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:133


QTS_GetProp

QTS_GetProp: (ctx, this_val, prop_name) => JSValuePointer

Parameters

ctx: JSContextPointer

this_val: JSValuePointer | JSValueConstPointer

prop_name: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:106


QTS_GetPropNumber

QTS_GetPropNumber: (ctx, this_val, prop_name) => JSValuePointer

Parameters

ctx: JSContextPointer

this_val: JSValuePointer | JSValueConstPointer

prop_name: number

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:111


QTS_GetString

QTS_GetString: (ctx, value) => JSBorrowedCharPointer

Parameters

ctx: JSContextPointer

value: JSValuePointer | JSValueConstPointer

Returns

JSBorrowedCharPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:78


QTS_GetSymbolDescriptionOrKey

QTS_GetSymbolDescriptionOrKey: (ctx, value) => JSBorrowedCharPointer

Parameters

ctx: JSContextPointer

value: JSValuePointer | JSValueConstPointer

Returns

JSBorrowedCharPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:95


QTS_GetTrue

QTS_GetTrue: () => JSValueConstPointer

Returns

JSValueConstPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:51


QTS_GetUndefined

QTS_GetUndefined: () => JSValueConstPointer

Returns

JSValueConstPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:48


QTS_IsEqual

QTS_IsEqual: (ctx, a, b, op) => number

Parameters

ctx: JSContextPointer

a: JSValuePointer | JSValueConstPointer

b: JSValuePointer | JSValueConstPointer

op: IsEqualOp

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:173


QTS_IsGlobalSymbol

QTS_IsGlobalSymbol: (ctx, value) => number

Parameters

ctx: JSContextPointer

value: JSValuePointer | JSValueConstPointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:99


QTS_IsJobPending

QTS_IsJobPending: (rt) => number

Parameters

rt: JSRuntimePointer

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:100


QTS_NewArray

QTS_NewArray: (ctx) => JSValuePointer

Parameters

ctx: JSContextPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:69


QTS_NewArrayBuffer

QTS_NewArrayBuffer: (ctx, buffer, length) => JSValuePointer

Parameters

ctx: JSContextPointer

buffer: JSVoidPointer

length: number

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:70


QTS_NewContext

QTS_NewContext: (rt, intrinsics) => JSContextPointer

Parameters

rt: JSRuntimePointer

intrinsics: IntrinsicsFlags

Returns

JSContextPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:54


QTS_NewError

QTS_NewError: (ctx) => JSValuePointer

Parameters

ctx: JSContextPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:41


QTS_NewFloat64

QTS_NewFloat64: (ctx, num) => JSValuePointer

Parameters

ctx: JSContextPointer

num: number

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:75


QTS_NewFunction

QTS_NewFunction: (ctx, func_id, name) => JSValuePointer

Parameters

ctx: JSContextPointer

func_id: number

name: string

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:197


QTS_NewObject

QTS_NewObject: (ctx) => JSValuePointer

Parameters

ctx: JSContextPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:64


QTS_NewObjectProto

QTS_NewObjectProto: (ctx, proto) => JSValuePointer

Parameters

ctx: JSContextPointer

proto: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:65


QTS_NewPromiseCapability

QTS_NewPromiseCapability: (ctx, resolve_funcs_out) => JSValuePointer

Parameters

ctx: JSContextPointer

resolve_funcs_out: JSValuePointerPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:180


QTS_NewRuntime

QTS_NewRuntime: () => JSRuntimePointer

Returns

JSRuntimePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:52


QTS_NewString

QTS_NewString: (ctx, string) => JSValuePointer

Parameters

ctx: JSContextPointer

string: BorrowedHeapCharPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:77


QTS_NewSymbol

QTS_NewSymbol: (ctx, description, isGlobal) => JSValuePointer

Parameters

ctx: JSContextPointer

description: BorrowedHeapCharPointer

isGlobal: number

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:90


QTS_PromiseResult

QTS_PromiseResult: (ctx, promise) => JSValuePointer

Parameters

ctx: JSContextPointer

promise: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:188


QTS_PromiseState

QTS_PromiseState: (ctx, promise) => JSPromiseStateEnum

Parameters

ctx: JSContextPointer

promise: JSValuePointer | JSValueConstPointer

Returns

JSPromiseStateEnum

Source

packages/quickjs-ffi-types/src/ffi.ts:184


QTS_RecoverableLeakCheck

QTS_RecoverableLeakCheck: () => number

Returns

number

Source

packages/quickjs-ffi-types/src/ffi.ts:45


QTS_ResolveException

QTS_ResolveException: (ctx, maybe_exception) => JSValuePointer

Parameters

ctx: JSContextPointer

maybe_exception: JSValuePointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:147


QTS_RuntimeComputeMemoryUsage

QTS_RuntimeComputeMemoryUsage: (rt, ctx) => JSValuePointer

Parameters

rt: JSRuntimePointer

ctx: JSContextPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:43


QTS_RuntimeDisableInterruptHandler

QTS_RuntimeDisableInterruptHandler: (rt) => void

Parameters

rt: JSRuntimePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:203


QTS_RuntimeDisableModuleLoader

QTS_RuntimeDisableModuleLoader: (rt) => void

Parameters

rt: JSRuntimePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:205


QTS_RuntimeDumpMemoryUsage

QTS_RuntimeDumpMemoryUsage: (rt) => OwnedHeapCharPointer

Parameters

rt: JSRuntimePointer

Returns

OwnedHeapCharPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:44


QTS_RuntimeEnableInterruptHandler

QTS_RuntimeEnableInterruptHandler: (rt) => void

Parameters

rt: JSRuntimePointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:202


QTS_RuntimeEnableModuleLoader

QTS_RuntimeEnableModuleLoader: (rt, use_custom_normalize) => void

Parameters

rt: JSRuntimePointer

use_custom_normalize: number

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:204


QTS_RuntimeSetMaxStackSize

QTS_RuntimeSetMaxStackSize: (rt, stack_size) => void

Parameters

rt: JSRuntimePointer

stack_size: number

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:47


QTS_RuntimeSetMemoryLimit

QTS_RuntimeSetMemoryLimit: (rt, limit) => void

Parameters

rt: JSRuntimePointer

limit: number

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:42


QTS_SetDebugLogEnabled

QTS_SetDebugLogEnabled: (rt, is_enabled) => void

Parameters

rt: JSRuntimePointer

is_enabled: number

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:194


QTS_SetProp

QTS_SetProp: (ctx, this_val, prop_name, prop_value) => void

Parameters

ctx: JSContextPointer

this_val: JSValuePointer | JSValueConstPointer

prop_name: JSValuePointer | JSValueConstPointer

prop_value: JSValuePointer | JSValueConstPointer

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:116


QTS_TestStringArg

QTS_TestStringArg: (string) => void

Parameters

string: string

Returns

void

Source

packages/quickjs-ffi-types/src/ffi.ts:192


QTS_Throw

QTS_Throw: (ctx, error) => JSValuePointer

Parameters

ctx: JSContextPointer

error: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:40


QTS_Typeof

QTS_Typeof: (ctx, value) => OwnedHeapCharPointer

Parameters

ctx: JSContextPointer

value: JSValuePointer | JSValueConstPointer

Returns

OwnedHeapCharPointer

Source

packages/quickjs-ffi-types/src/ffi.ts:164


QTS_bjson_decode

QTS_bjson_decode: (ctx, data) => JSValuePointer

Parameters

ctx: JSContextPointer

data: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:210


QTS_bjson_encode

QTS_bjson_encode: (ctx, val) => JSValuePointer

Parameters

ctx: JSContextPointer

val: JSValuePointer | JSValueConstPointer

Returns

JSValuePointer

Source

packages/quickjs-ffi-types/src/ffi.ts:206


Generated using typedoc-plugin-markdown and TypeDoc