From 16186326e65945f4338f19821e7dc0e4b14c211f Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sat, 14 Sep 2024 14:59:13 -0700 Subject: [PATCH 1/4] draft --- c/interface.c | 44 ++----------- exportedRuntimeMethods.json | 9 ++- .../quickjs-emscripten-core/src/runtime.ts | 64 +++++++++++++++---- packages/quickjs-emscripten-core/src/types.ts | 32 ++++++++++ .../quickjs-ffi-types/src/emscripten-types.ts | 1 + 5 files changed, 101 insertions(+), 49 deletions(-) diff --git a/c/interface.c b/c/interface.c index 39eb0c6b..55d61658 100644 --- a/c/interface.c +++ b/c/interface.c @@ -184,43 +184,13 @@ void QTS_RuntimeSetMemoryLimit(JSRuntime *rt, size_t limit) { * Memory diagnostics */ -JSValue *QTS_RuntimeComputeMemoryUsage(JSRuntime *rt, JSContext *ctx) { - JSMemoryUsage s; - JS_ComputeMemoryUsage(rt, &s); - - // Note that we're going to allocate more memory just to report the memory usage. - // A more sound approach would be to bind JSMemoryUsage struct directly - but that's - // a lot of work. This should be okay in the mean time. - JSValue result = JS_NewObject(ctx); - - // Manually generated via editor-fu from JSMemoryUsage struct definition in quickjs.h - JS_SetPropertyStr(ctx, result, "malloc_limit", JS_NewInt64(ctx, s.malloc_limit)); - JS_SetPropertyStr(ctx, result, "memory_used_size", JS_NewInt64(ctx, s.memory_used_size)); - JS_SetPropertyStr(ctx, result, "malloc_count", JS_NewInt64(ctx, s.malloc_count)); - JS_SetPropertyStr(ctx, result, "memory_used_count", JS_NewInt64(ctx, s.memory_used_count)); - JS_SetPropertyStr(ctx, result, "atom_count", JS_NewInt64(ctx, s.atom_count)); - JS_SetPropertyStr(ctx, result, "atom_size", JS_NewInt64(ctx, s.atom_size)); - JS_SetPropertyStr(ctx, result, "str_count", JS_NewInt64(ctx, s.str_count)); - JS_SetPropertyStr(ctx, result, "str_size", JS_NewInt64(ctx, s.str_size)); - JS_SetPropertyStr(ctx, result, "obj_count", JS_NewInt64(ctx, s.obj_count)); - JS_SetPropertyStr(ctx, result, "obj_size", JS_NewInt64(ctx, s.obj_size)); - JS_SetPropertyStr(ctx, result, "prop_count", JS_NewInt64(ctx, s.prop_count)); - JS_SetPropertyStr(ctx, result, "prop_size", JS_NewInt64(ctx, s.prop_size)); - JS_SetPropertyStr(ctx, result, "shape_count", JS_NewInt64(ctx, s.shape_count)); - JS_SetPropertyStr(ctx, result, "shape_size", JS_NewInt64(ctx, s.shape_size)); - JS_SetPropertyStr(ctx, result, "js_func_count", JS_NewInt64(ctx, s.js_func_count)); - JS_SetPropertyStr(ctx, result, "js_func_size", JS_NewInt64(ctx, s.js_func_size)); - JS_SetPropertyStr(ctx, result, "js_func_code_size", JS_NewInt64(ctx, s.js_func_code_size)); - JS_SetPropertyStr(ctx, result, "js_func_pc2line_count", JS_NewInt64(ctx, s.js_func_pc2line_count)); - JS_SetPropertyStr(ctx, result, "js_func_pc2line_size", JS_NewInt64(ctx, s.js_func_pc2line_size)); - JS_SetPropertyStr(ctx, result, "c_func_count", JS_NewInt64(ctx, s.c_func_count)); - JS_SetPropertyStr(ctx, result, "array_count", JS_NewInt64(ctx, s.array_count)); - JS_SetPropertyStr(ctx, result, "fast_array_count", JS_NewInt64(ctx, s.fast_array_count)); - JS_SetPropertyStr(ctx, result, "fast_array_elements", JS_NewInt64(ctx, s.fast_array_elements)); - JS_SetPropertyStr(ctx, result, "binary_object_count", JS_NewInt64(ctx, s.binary_object_count)); - JS_SetPropertyStr(ctx, result, "binary_object_size", JS_NewInt64(ctx, s.binary_object_size)); - - return jsvalue_to_heap(result); +JSMemoryUsage *QTS_RuntimeComputeMemoryUsage(JSRuntime *rt) { + JSMemoryUsage *s = malloc(sizeof(JSMemoryUsage)); + if (s == NULL) { + return NULL; + } + JS_ComputeMemoryUsage(rt, s); + return s; } OwnedHeapChar *QTS_RuntimeDumpMemoryUsage(JSRuntime *rt) { diff --git a/exportedRuntimeMethods.json b/exportedRuntimeMethods.json index dc510003..f63d9e95 100644 --- a/exportedRuntimeMethods.json +++ b/exportedRuntimeMethods.json @@ -1 +1,8 @@ -["cwrap", "stringToUTF8", "lengthBytesUTF8", "UTF8ToString", "___lsan_do_recoverable_leak_check"] +[ + "cwrap", + "stringToUTF8", + "lengthBytesUTF8", + "UTF8ToString", + "___lsan_do_recoverable_leak_check", + "getValue" +] diff --git a/packages/quickjs-emscripten-core/src/runtime.ts b/packages/quickjs-emscripten-core/src/runtime.ts index fd98b406..0578cc7b 100644 --- a/packages/quickjs-emscripten-core/src/runtime.ts +++ b/packages/quickjs-emscripten-core/src/runtime.ts @@ -14,7 +14,13 @@ import type { Disposable } from "./lifetime" import { DisposableResult, Lifetime, Scope, UsingDisposable } from "./lifetime" import { ModuleMemory } from "./memory" import type { QuickJSModuleCallbacks, RuntimeCallbacks } from "./module" -import type { ContextOptions, JSModuleLoader, JSModuleNormalizer, QuickJSHandle } from "./types" +import type { + ContextOptions, + JSMemoryUsage, + JSModuleLoader, + JSModuleNormalizer, + QuickJSHandle, +} from "./types" import { intrinsicsToFlags } from "./types" /** @@ -287,17 +293,53 @@ export class QuickJSRuntime extends UsingDisposable implements Disposable { } /** - * Compute memory usage for this runtime. Returns the result as a handle to a - * JSValue object. Use {@link QuickJSContext#dump} to convert to a native object. - * Calling this method will allocate more memory inside the runtime. The information - * is accurate as of just before the call to `computeMemoryUsage`. - * For a human-digestible representation, see {@link dumpMemoryUsage}. + * Compute memory usage for this runtime. The information is accurate as of + * just before the call to `computeMemoryUsage`. For a human-digestible + * representation, see {@link dumpMemoryUsage}. */ - computeMemoryUsage(): QuickJSHandle { - const serviceContextMemory = this.getSystemContext().getMemory(this.rt.value) - return serviceContextMemory.heapValueHandle( - this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value, serviceContextMemory.ctx.value), - ) + computeMemoryUsage(): JSMemoryUsage { + const ptr = this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value) + if (ptr === 0) { + throw new Error("Failed to compute memory usage") + } + + let offset = 0 + const getNextInt64 = () => { + const value = this.module.getValue(ptr + offset, "i64") + offset += 8 + return value + } + const usage: JSMemoryUsage = { + malloc_size: getNextInt64(), + malloc_limit: getNextInt64(), + memory_used_size: getNextInt64(), + malloc_count: getNextInt64(), + memory_used_count: getNextInt64(), + atom_count: getNextInt64(), + atom_size: getNextInt64(), + str_count: getNextInt64(), + str_size: getNextInt64(), + obj_count: getNextInt64(), + obj_size: getNextInt64(), + prop_count: getNextInt64(), + prop_size: getNextInt64(), + shape_count: getNextInt64(), + shape_size: getNextInt64(), + js_func_count: getNextInt64(), + js_func_size: getNextInt64(), + js_func_code_size: getNextInt64(), + js_func_pc2line_count: getNextInt64(), + js_func_pc2line_size: getNextInt64(), + c_func_count: getNextInt64(), + array_count: getNextInt64(), + fast_array_count: getNextInt64(), + fast_array_elements: getNextInt64(), + binary_object_count: getNextInt64(), + binary_object_size: getNextInt64(), + } + + this.module._free(ptr) + return usage } /** diff --git a/packages/quickjs-emscripten-core/src/types.ts b/packages/quickjs-emscripten-core/src/types.ts index a5684914..0a39969f 100644 --- a/packages/quickjs-emscripten-core/src/types.ts +++ b/packages/quickjs-emscripten-core/src/types.ts @@ -344,3 +344,35 @@ export function concat(...values: Array): T[] { } return result } + +/** + * Result of computing memory usage of a runtime with {@link QuickJSRuntime#computeMemoryUsage}. + */ +export interface JSMemoryUsage { + malloc_size: number + malloc_limit: number + memory_used_size: number + malloc_count: number + memory_used_count: number + atom_count: number + atom_size: number + str_count: number + str_size: number + obj_count: number + obj_size: number + prop_count: number + prop_size: number + shape_count: number + shape_size: number + js_func_count: number + js_func_size: number + js_func_code_size: number + js_func_pc2line_count: number + js_func_pc2line_size: number + c_func_count: number + array_count: number + fast_array_count: number + fast_array_elements: number + binary_object_count: number + binary_object_size: number +} diff --git a/packages/quickjs-ffi-types/src/emscripten-types.ts b/packages/quickjs-ffi-types/src/emscripten-types.ts index e4e08093..ebc33195 100644 --- a/packages/quickjs-ffi-types/src/emscripten-types.ts +++ b/packages/quickjs-ffi-types/src/emscripten-types.ts @@ -152,6 +152,7 @@ export interface EmscriptenModule extends EmscriptenModuleLoaderOptions { argTypes: Emscripten.ValueType[], opts?: Emscripten.CCallOpts, ): (...args: any[]) => any + getValue(ptr: number, type: "i8" | "i16" | "i32" | "i64" | "float" | "double"): number // USE_TYPED_ARRAYS == 2 HEAP8: Int8Array From 67ff7d4fb1a1343225099c79f9b204ba96ddb228 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sat, 14 Sep 2024 15:05:19 -0700 Subject: [PATCH 2/4] regen --- packages/quickjs-ffi-types/src/ffi-async.ts | 3 ++- packages/quickjs-ffi-types/src/ffi-types.ts | 5 +++++ packages/quickjs-ffi-types/src/ffi.ts | 3 ++- .../variant-quickjs-asmjs-mjs-release-sync/src/ffi.ts | 8 ++++++-- .../variant-quickjs-ng-wasmfile-debug-asyncify/src/ffi.ts | 8 ++++++-- .../variant-quickjs-ng-wasmfile-debug-sync/src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../variant-quickjs-ng-wasmfile-release-sync/src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../variant-quickjs-singlefile-cjs-debug-sync/src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../variant-quickjs-singlefile-mjs-debug-sync/src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../src/ffi.ts | 8 ++++++-- .../variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts | 8 ++++++-- packages/variant-quickjs-wasmfile-debug-sync/src/ffi.ts | 8 ++++++-- .../variant-quickjs-wasmfile-release-asyncify/src/ffi.ts | 8 ++++++-- packages/variant-quickjs-wasmfile-release-sync/src/ffi.ts | 8 ++++++-- 24 files changed, 135 insertions(+), 44 deletions(-) diff --git a/packages/quickjs-ffi-types/src/ffi-async.ts b/packages/quickjs-ffi-types/src/ffi-async.ts index 8f50f7b2..a90145e6 100644 --- a/packages/quickjs-ffi-types/src/ffi-async.ts +++ b/packages/quickjs-ffi-types/src/ffi-async.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -41,7 +42,7 @@ export interface QuickJSAsyncFFI { QTS_Throw: (ctx: JSContextPointer, error: JSValuePointer | JSValueConstPointer) => JSValuePointer QTS_NewError: (ctx: JSContextPointer) => JSValuePointer QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer QTS_RecoverableLeakCheck: () => number QTS_BuildIsSanitizeLeak: () => number diff --git a/packages/quickjs-ffi-types/src/ffi-types.ts b/packages/quickjs-ffi-types/src/ffi-types.ts index b8c03033..1b07d5a1 100644 --- a/packages/quickjs-ffi-types/src/ffi-types.ts +++ b/packages/quickjs-ffi-types/src/ffi-types.ts @@ -100,6 +100,11 @@ export type JSVoidPointer = Pointer export type UInt32Pointer = Pointer<"uint32_t"> +/** + * @private + */ +export type JSMemoryUsagePointer = Pointer<"JSMemoryUsage"> + /** * @private */ diff --git a/packages/quickjs-ffi-types/src/ffi.ts b/packages/quickjs-ffi-types/src/ffi.ts index cf9a2096..e860a22c 100644 --- a/packages/quickjs-ffi-types/src/ffi.ts +++ b/packages/quickjs-ffi-types/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -40,7 +41,7 @@ export interface QuickJSFFI { QTS_Throw: (ctx: JSContextPointer, error: JSValuePointer | JSValueConstPointer) => JSValuePointer QTS_NewError: (ctx: JSContextPointer) => JSValuePointer QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer QTS_RecoverableLeakCheck: () => number QTS_BuildIsSanitizeLeak: () => number diff --git a/packages/variant-quickjs-asmjs-mjs-release-sync/src/ffi.ts b/packages/variant-quickjs-asmjs-mjs-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-asmjs-mjs-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-asmjs-mjs-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/ffi.ts b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/ffi.ts index ee3ce88b..a001b450 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/src/ffi.ts b/packages/variant-quickjs-ng-wasmfile-debug-sync/src/ffi.ts index 323a3abc..e5d00222 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/src/ffi.ts +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/ffi.ts b/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/ffi.ts index 83989cf6..c0701c7d 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/src/ffi.ts b/packages/variant-quickjs-ng-wasmfile-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/ffi.ts index ee3ce88b..a001b450 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-browser-debug-sync/src/ffi.ts index 323a3abc..e5d00222 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-browser-release-asyncify/src/ffi.ts index 83989cf6..c0701c7d 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-browser-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-browser-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/ffi.ts index ee3ce88b..a001b450 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-cjs-debug-sync/src/ffi.ts index 323a3abc..e5d00222 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/ffi.ts index 83989cf6..c0701c7d 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-cjs-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/ffi.ts index ee3ce88b..a001b450 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-mjs-debug-sync/src/ffi.ts index 323a3abc..e5d00222 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/ffi.ts b/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/ffi.ts index 83989cf6..c0701c7d 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/src/ffi.ts b/packages/variant-quickjs-singlefile-mjs-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts b/packages/variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts index ee3ce88b..a001b450 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-wasmfile-debug-sync/src/ffi.ts b/packages/variant-quickjs-wasmfile-debug-sync/src/ffi.ts index 323a3abc..e5d00222 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/src/ffi.ts +++ b/packages/variant-quickjs-wasmfile-debug-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/src/ffi.ts b/packages/variant-quickjs-wasmfile-release-asyncify/src/ffi.ts index 83989cf6..c0701c7d 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/src/ffi.ts +++ b/packages/variant-quickjs-wasmfile-release-asyncify/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -56,8 +57,11 @@ export class QuickJSAsyncFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", diff --git a/packages/variant-quickjs-wasmfile-release-sync/src/ffi.ts b/packages/variant-quickjs-wasmfile-release-sync/src/ffi.ts index 419f408d..0ce8c02b 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/src/ffi.ts +++ b/packages/variant-quickjs-wasmfile-release-sync/src/ffi.ts @@ -18,6 +18,7 @@ import { JSBorrowedCharPointer, JSVoidPointer, UInt32Pointer, + JSMemoryUsagePointer, EvalFlags, IntrinsicsFlags, EvalDetectModule, @@ -55,8 +56,11 @@ export class QuickJSFFI { ["number", "number"], ) - QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer = - this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]) + QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer) => JSMemoryUsagePointer = this.module.cwrap( + "QTS_RuntimeComputeMemoryUsage", + "number", + ["number"], + ) QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap( "QTS_RuntimeDumpMemoryUsage", From fc6d5e9ee54a8e6a3e4418f387540eb350e25936 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sat, 14 Sep 2024 16:45:32 -0700 Subject: [PATCH 3/4] enable strict mode & linux emulation for malloc_usable_size --- .vscode/settings.json | 3 +- doc/@jitl/quickjs-ffi-types/exports.md | 16 +- .../interfaces/EmscriptenModule.md | 153 ++++-------- .../interfaces/EmscriptenModuleLoader.md | 2 +- .../QuickJSAsyncEmscriptenModule.md | 205 ++++------------ .../interfaces/QuickJSAsyncFFI.md | 158 ++++++------ .../interfaces/QuickJSEmscriptenModule.md | 205 ++++------------ .../interfaces/QuickJSFFI.md | 140 ++++++----- .../README.md | 1 + .../quickjs-ng-wasmfile-debug-sync/README.md | 1 + .../README.md | 3 +- .../README.md | 3 +- .../README.md | 1 + .../README.md | 1 + .../README.md | 3 +- .../README.md | 3 +- .../README.md | 1 + .../README.md | 1 + .../README.md | 3 +- .../README.md | 3 +- .../README.md | 1 + .../README.md | 1 + .../README.md | 3 +- .../README.md | 3 +- .../quickjs-wasmfile-debug-asyncify/README.md | 1 + .../quickjs-wasmfile-debug-sync/README.md | 1 + .../README.md | 3 +- .../quickjs-wasmfile-release-sync/README.md | 3 +- .../classes/QuickJSAsyncRuntime.md | 40 ++- .../classes/QuickJSRuntime.md | 48 ++-- doc/quickjs-emscripten-core/exports.md | 20 +- .../interfaces/EmscriptenModule.md | 153 ++++-------- .../interfaces/EmscriptenModuleLoader.md | 2 +- .../QuickJSAsyncEmscriptenModule.md | 205 ++++------------ .../interfaces/QuickJSAsyncFFI.md | 158 ++++++------ .../interfaces/QuickJSEmscriptenModule.md | 205 ++++------------ .../interfaces/QuickJSFFI.md | 140 ++++++----- .../classes/QuickJSAsyncRuntime.md | 40 ++- .../classes/QuickJSRuntime.md | 48 ++-- doc/quickjs-emscripten/exports.md | 24 +- .../interfaces/EmscriptenModule.md | 175 ++++---------- .../interfaces/EmscriptenModuleLoader.md | 2 +- .../EmscriptenModuleLoaderOptions.md | 10 +- .../QuickJSAsyncEmscriptenModule.md | 227 +++++------------- .../interfaces/QuickJSAsyncFFI.md | 158 ++++++------ .../interfaces/QuickJSAsyncVariant.md | 6 +- .../interfaces/QuickJSEmscriptenModule.md | 227 +++++------------- .../interfaces/QuickJSFFI.md | 140 ++++++----- .../interfaces/QuickJSSyncVariant.md | 6 +- .../interfaces/SourceMapData.md | 8 +- exportedRuntimeMethods.json | 1 + .../quickjs-emscripten-core/src/context.ts | 2 +- .../quickjs-emscripten-core/src/runtime.ts | 4 +- .../quickjs-emscripten/src/quickjs.test.ts | 13 +- .../quickjs-ffi-types/src/emscripten-types.ts | 25 +- .../Makefile | 11 +- .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 1 + .../Makefile | 12 +- .../README.md | 3 +- .../Makefile | 12 +- .../README.md | 3 +- scripts/prepareVariants.ts | 5 +- templates/Variant.mk | 11 +- 98 files changed, 1288 insertions(+), 2028 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9ad76c27..af0d9002 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,8 @@ "math.h": "c", "stdbool.h": "c", "emscripten.h": "c", - "quickjs-atom.h": "c" + "quickjs-atom.h": "c", + "malloc.h": "c" }, "files.exclude": { ".yarn/releases/*": true diff --git a/doc/@jitl/quickjs-ffi-types/exports.md b/doc/@jitl/quickjs-ffi-types/exports.md index 880f8785..5e342aba 100644 --- a/doc/@jitl/quickjs-ffi-types/exports.md +++ b/doc/@jitl/quickjs-ffi-types/exports.md @@ -84,7 +84,7 @@ for the Emscripten stack. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L246) +[packages/quickjs-ffi-types/src/emscripten-types.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L248) *** @@ -145,7 +145,7 @@ State of a promise. #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) +[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) *** @@ -368,7 +368,7 @@ module code #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L106) +[packages/quickjs-ffi-types/src/ffi-types.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L111) *** @@ -410,7 +410,7 @@ Bitfield options for QTS_GetOwnPropertyNames #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:121](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L121) +[packages/quickjs-ffi-types/src/ffi-types.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L126) *** @@ -488,7 +488,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L111) +[packages/quickjs-ffi-types/src/ffi-types.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L116) *** @@ -512,7 +512,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L126) +[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) *** @@ -536,7 +536,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) +[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) ## Functions @@ -569,7 +569,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) +[packages/quickjs-ffi-types/src/ffi-types.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L141) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md index 6ca46e91..e7504a7c 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - - [HEAP16](EmscriptenModule.md#heap16) - - [HEAP32](EmscriptenModule.md#heap32) - - [HEAP8](EmscriptenModule.md#heap8) - - [HEAPF32](EmscriptenModule.md#heapf32) - - [HEAPF64](EmscriptenModule.md#heapf64) - - [HEAPU16](EmscriptenModule.md#heapu16) - - [HEAPU32](EmscriptenModule.md#heapu32) - [HEAPU8](EmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - - [TOTAL\_STACK](EmscriptenModule.md#total-stack) - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [wasmMemory?](EmscriptenModule.md#wasmmemory) - [Methods](EmscriptenModule.md#methods) @@ -31,6 +21,7 @@ QuickJS. - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [getValue()](EmscriptenModule.md#getvalue) - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) - [locateFile()?](EmscriptenModule.md#locatefile) @@ -43,113 +34,13 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -277,6 +168,46 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md index 4192e3ac..5644610b 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md @@ -22,7 +22,7 @@ ## Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L249) +[packages/quickjs-ffi-types/src/emscripten-types.ts:251](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L251) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md index 5236da5a..c31192da 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSAsyncEmscriptenModule.md#extends) - [Properties](QuickJSAsyncEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSAsyncEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSAsyncEmscriptenModule.md#heap16) - - [HEAP32](QuickJSAsyncEmscriptenModule.md#heap32) - - [HEAP8](QuickJSAsyncEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSAsyncEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSAsyncEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSAsyncEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSAsyncEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSAsyncEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSAsyncEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [getValue()](QuickJSAsyncEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -205,7 +56,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L243) +[packages/quickjs-ffi-types/src/emscripten-types.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L245) *** @@ -219,7 +70,7 @@ Implement this field #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:242](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L242) +[packages/quickjs-ffi-types/src/emscripten-types.ts:244](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L244) *** @@ -363,6 +214,54 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md index db50ca6a..856f1840 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md @@ -105,7 +105,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L39) +[packages/quickjs-ffi-types/src/ffi-async.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L40) *** @@ -125,7 +125,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:250](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L250) +[packages/quickjs-ffi-types/src/ffi-async.ts:251](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L251) *** @@ -139,7 +139,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L248) +[packages/quickjs-ffi-types/src/ffi-async.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L249) *** @@ -153,7 +153,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:247](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L247) +[packages/quickjs-ffi-types/src/ffi-async.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L248) *** @@ -167,7 +167,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) +[packages/quickjs-ffi-types/src/ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) *** @@ -193,7 +193,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L173) +[packages/quickjs-ffi-types/src/ffi-async.ts:174](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L174) *** @@ -219,7 +219,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L180) +[packages/quickjs-ffi-types/src/ffi-async.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L181) *** @@ -253,7 +253,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L148) +[packages/quickjs-ffi-types/src/ffi-async.ts:149](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L149) *** @@ -273,7 +273,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L188) +[packages/quickjs-ffi-types/src/ffi-async.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L189) *** @@ -293,7 +293,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L192) +[packages/quickjs-ffi-types/src/ffi-async.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L193) *** @@ -313,7 +313,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L61) +[packages/quickjs-ffi-types/src/ffi-async.ts:62](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L62) *** @@ -341,7 +341,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L196) +[packages/quickjs-ffi-types/src/ffi-async.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L197) *** @@ -369,7 +369,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L204) +[packages/quickjs-ffi-types/src/ffi-async.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L205) *** @@ -391,7 +391,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L106) +[packages/quickjs-ffi-types/src/ffi-async.ts:107](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L107) *** @@ -413,7 +413,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L111) +[packages/quickjs-ffi-types/src/ffi-async.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L112) *** @@ -433,7 +433,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) +[packages/quickjs-ffi-types/src/ffi-async.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L61) *** @@ -451,7 +451,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L56) +[packages/quickjs-ffi-types/src/ffi-async.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L57) *** @@ -469,7 +469,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) +[packages/quickjs-ffi-types/src/ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) *** @@ -489,7 +489,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L57) +[packages/quickjs-ffi-types/src/ffi-async.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L58) *** @@ -509,7 +509,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L58) +[packages/quickjs-ffi-types/src/ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) *** @@ -529,7 +529,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) +[packages/quickjs-ffi-types/src/ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) *** @@ -549,7 +549,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L83) +[packages/quickjs-ffi-types/src/ffi-async.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L84) *** @@ -569,7 +569,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L87) +[packages/quickjs-ffi-types/src/ffi-async.ts:88](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L88) *** @@ -587,7 +587,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L245) +[packages/quickjs-ffi-types/src/ffi-async.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L246) *** @@ -601,7 +601,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) +[packages/quickjs-ffi-types/src/ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) *** @@ -621,7 +621,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) +[packages/quickjs-ffi-types/src/ffi-async.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L78) *** @@ -639,7 +639,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:231](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L231) +[packages/quickjs-ffi-types/src/ffi-async.ts:232](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L232) *** @@ -661,7 +661,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:220](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L220) +[packages/quickjs-ffi-types/src/ffi-async.ts:221](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L221) *** @@ -681,7 +681,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:212](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L212) +[packages/quickjs-ffi-types/src/ffi-async.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L213) *** @@ -695,7 +695,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) +[packages/quickjs-ffi-types/src/ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) *** @@ -721,7 +721,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L159) +[packages/quickjs-ffi-types/src/ffi-async.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L160) *** @@ -747,7 +747,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L166) +[packages/quickjs-ffi-types/src/ffi-async.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L167) *** @@ -769,7 +769,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L116) +[packages/quickjs-ffi-types/src/ffi-async.ts:117](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L117) *** @@ -791,7 +791,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L126) +[packages/quickjs-ffi-types/src/ffi-async.ts:127](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L127) *** @@ -813,7 +813,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L131) +[packages/quickjs-ffi-types/src/ffi-async.ts:132](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L132) *** @@ -835,7 +835,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:121](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L121) +[packages/quickjs-ffi-types/src/ffi-async.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L122) *** @@ -855,7 +855,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L79) +[packages/quickjs-ffi-types/src/ffi-async.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L80) *** @@ -875,7 +875,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L96) +[packages/quickjs-ffi-types/src/ffi-async.ts:97](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L97) *** @@ -895,7 +895,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L100) +[packages/quickjs-ffi-types/src/ffi-async.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L101) *** @@ -909,7 +909,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) +[packages/quickjs-ffi-types/src/ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) *** @@ -923,7 +923,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) +[packages/quickjs-ffi-types/src/ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) *** @@ -947,7 +947,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L225) +[packages/quickjs-ffi-types/src/ffi-async.ts:226](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L226) *** @@ -967,7 +967,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:104](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L104) +[packages/quickjs-ffi-types/src/ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) *** @@ -985,7 +985,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) +[packages/quickjs-ffi-types/src/ffi-async.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L106) *** @@ -1003,7 +1003,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L70) +[packages/quickjs-ffi-types/src/ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) *** @@ -1025,7 +1025,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) +[packages/quickjs-ffi-types/src/ffi-async.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L72) *** @@ -1045,7 +1045,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) +[packages/quickjs-ffi-types/src/ffi-async.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L56) *** @@ -1063,7 +1063,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) +[packages/quickjs-ffi-types/src/ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) *** @@ -1083,7 +1083,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L76) +[packages/quickjs-ffi-types/src/ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) *** @@ -1105,7 +1105,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L249) +[packages/quickjs-ffi-types/src/ffi-async.ts:250](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L250) *** @@ -1123,7 +1123,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L65) +[packages/quickjs-ffi-types/src/ffi-async.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L66) *** @@ -1143,7 +1143,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L66) +[packages/quickjs-ffi-types/src/ffi-async.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L67) *** @@ -1163,7 +1163,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:232](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L232) +[packages/quickjs-ffi-types/src/ffi-async.ts:233](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L233) *** @@ -1177,7 +1177,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) +[packages/quickjs-ffi-types/src/ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) *** @@ -1197,7 +1197,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L78) +[packages/quickjs-ffi-types/src/ffi-async.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L79) *** @@ -1219,7 +1219,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:91](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L91) +[packages/quickjs-ffi-types/src/ffi-async.ts:92](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L92) *** @@ -1239,7 +1239,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:240](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L240) +[packages/quickjs-ffi-types/src/ffi-async.ts:241](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L241) *** @@ -1259,7 +1259,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:236](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L236) +[packages/quickjs-ffi-types/src/ffi-async.ts:237](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L237) *** @@ -1273,7 +1273,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) +[packages/quickjs-ffi-types/src/ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) *** @@ -1293,27 +1293,25 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L187) +[packages/quickjs-ffi-types/src/ffi-async.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L188) *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) +[packages/quickjs-ffi-types/src/ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) *** @@ -1331,7 +1329,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:255](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L255) +[packages/quickjs-ffi-types/src/ffi-async.ts:256](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L256) *** @@ -1349,7 +1347,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:257](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L257) +[packages/quickjs-ffi-types/src/ffi-async.ts:258](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L258) *** @@ -1367,7 +1365,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) +[packages/quickjs-ffi-types/src/ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) *** @@ -1385,7 +1383,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:254](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L254) +[packages/quickjs-ffi-types/src/ffi-async.ts:255](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L255) *** @@ -1405,7 +1403,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:256](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L256) +[packages/quickjs-ffi-types/src/ffi-async.ts:257](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L257) *** @@ -1425,7 +1423,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) +[packages/quickjs-ffi-types/src/ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) *** @@ -1445,7 +1443,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) +[packages/quickjs-ffi-types/src/ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) *** @@ -1465,7 +1463,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L246) +[packages/quickjs-ffi-types/src/ffi-async.ts:247](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L247) *** @@ -1489,7 +1487,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L136) +[packages/quickjs-ffi-types/src/ffi-async.ts:137](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L137) *** @@ -1513,7 +1511,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:142](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L142) +[packages/quickjs-ffi-types/src/ffi-async.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L143) *** @@ -1531,7 +1529,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:244](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L244) +[packages/quickjs-ffi-types/src/ffi-async.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L245) *** @@ -1551,7 +1549,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L41) +[packages/quickjs-ffi-types/src/ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) *** @@ -1571,7 +1569,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:216](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L216) +[packages/quickjs-ffi-types/src/ffi-async.ts:217](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L217) *** @@ -1591,7 +1589,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:262](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L262) +[packages/quickjs-ffi-types/src/ffi-async.ts:263](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L263) *** @@ -1611,7 +1609,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:258](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L258) +[packages/quickjs-ffi-types/src/ffi-async.ts:259](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L259) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md index 84d6d2d0..3ef2abdd 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSEmscriptenModule.md#extends) - [Properties](QuickJSEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSEmscriptenModule.md#heap16) - - [HEAP32](QuickJSEmscriptenModule.md#heap32) - - [HEAP8](QuickJSEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [getValue()](QuickJSEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`@jitl/quickjs-ffi-types.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -205,7 +56,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:237](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L237) +[packages/quickjs-ffi-types/src/emscripten-types.ts:239](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L239) *** @@ -215,7 +66,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:236](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L236) +[packages/quickjs-ffi-types/src/emscripten-types.ts:238](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L238) *** @@ -359,6 +210,54 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md index eb92840e..84095c53 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md @@ -96,7 +96,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L38) +[packages/quickjs-ffi-types/src/ffi.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L39) *** @@ -116,7 +116,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L198) +[packages/quickjs-ffi-types/src/ffi.ts:199](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L199) *** @@ -130,7 +130,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L196) +[packages/quickjs-ffi-types/src/ffi.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L197) *** @@ -144,7 +144,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:195](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L195) +[packages/quickjs-ffi-types/src/ffi.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L196) *** @@ -158,7 +158,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) +[packages/quickjs-ffi-types/src/ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) *** @@ -184,7 +184,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L140) +[packages/quickjs-ffi-types/src/ffi.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L141) *** @@ -218,7 +218,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L122) +[packages/quickjs-ffi-types/src/ffi.ts:123](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L123) *** @@ -238,7 +238,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L148) +[packages/quickjs-ffi-types/src/ffi.ts:149](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L149) *** @@ -258,7 +258,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L60) +[packages/quickjs-ffi-types/src/ffi.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L61) *** @@ -286,7 +286,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:152](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L152) +[packages/quickjs-ffi-types/src/ffi.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L153) *** @@ -308,7 +308,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L101) +[packages/quickjs-ffi-types/src/ffi.ts:102](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L102) *** @@ -328,7 +328,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) +[packages/quickjs-ffi-types/src/ffi.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L60) *** @@ -346,7 +346,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L55) +[packages/quickjs-ffi-types/src/ffi.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L56) *** @@ -364,7 +364,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) +[packages/quickjs-ffi-types/src/ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) *** @@ -384,7 +384,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L56) +[packages/quickjs-ffi-types/src/ffi.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L57) *** @@ -404,7 +404,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L57) +[packages/quickjs-ffi-types/src/ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) *** @@ -424,7 +424,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) +[packages/quickjs-ffi-types/src/ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) *** @@ -444,7 +444,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:82](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L82) +[packages/quickjs-ffi-types/src/ffi.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L83) *** @@ -464,7 +464,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:86](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L86) +[packages/quickjs-ffi-types/src/ffi.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L87) *** @@ -482,7 +482,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L193) +[packages/quickjs-ffi-types/src/ffi.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L194) *** @@ -496,7 +496,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) +[packages/quickjs-ffi-types/src/ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) *** @@ -516,7 +516,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) +[packages/quickjs-ffi-types/src/ffi.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L77) *** @@ -534,7 +534,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:179](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L179) +[packages/quickjs-ffi-types/src/ffi.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L180) *** @@ -556,7 +556,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L168) +[packages/quickjs-ffi-types/src/ffi.ts:169](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L169) *** @@ -576,7 +576,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L160) +[packages/quickjs-ffi-types/src/ffi.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L161) *** @@ -590,7 +590,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) +[packages/quickjs-ffi-types/src/ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) *** @@ -616,7 +616,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:133](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L133) +[packages/quickjs-ffi-types/src/ffi.ts:134](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L134) *** @@ -638,7 +638,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L106) +[packages/quickjs-ffi-types/src/ffi.ts:107](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L107) *** @@ -660,7 +660,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L111) +[packages/quickjs-ffi-types/src/ffi.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L112) *** @@ -680,7 +680,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L78) +[packages/quickjs-ffi-types/src/ffi.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L79) *** @@ -700,7 +700,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:95](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L95) +[packages/quickjs-ffi-types/src/ffi.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L96) *** @@ -714,7 +714,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) +[packages/quickjs-ffi-types/src/ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) *** @@ -728,7 +728,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) +[packages/quickjs-ffi-types/src/ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) *** @@ -752,7 +752,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L173) +[packages/quickjs-ffi-types/src/ffi.ts:174](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L174) *** @@ -772,7 +772,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L99) +[packages/quickjs-ffi-types/src/ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) *** @@ -790,7 +790,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) +[packages/quickjs-ffi-types/src/ffi.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L101) *** @@ -808,7 +808,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L69) +[packages/quickjs-ffi-types/src/ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) *** @@ -830,7 +830,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) +[packages/quickjs-ffi-types/src/ffi.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L71) *** @@ -850,7 +850,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) +[packages/quickjs-ffi-types/src/ffi.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L55) *** @@ -868,7 +868,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) +[packages/quickjs-ffi-types/src/ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) *** @@ -888,7 +888,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:75](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L75) +[packages/quickjs-ffi-types/src/ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) *** @@ -910,7 +910,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L197) +[packages/quickjs-ffi-types/src/ffi.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L198) *** @@ -928,7 +928,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L64) +[packages/quickjs-ffi-types/src/ffi.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L65) *** @@ -948,7 +948,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L65) +[packages/quickjs-ffi-types/src/ffi.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L66) *** @@ -968,7 +968,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L180) +[packages/quickjs-ffi-types/src/ffi.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L181) *** @@ -982,7 +982,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) +[packages/quickjs-ffi-types/src/ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) *** @@ -1002,7 +1002,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L77) +[packages/quickjs-ffi-types/src/ffi.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L78) *** @@ -1024,7 +1024,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:90](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L90) +[packages/quickjs-ffi-types/src/ffi.ts:91](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L91) *** @@ -1044,7 +1044,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L188) +[packages/quickjs-ffi-types/src/ffi.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L189) *** @@ -1064,7 +1064,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:184](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L184) +[packages/quickjs-ffi-types/src/ffi.ts:185](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L185) *** @@ -1078,7 +1078,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) +[packages/quickjs-ffi-types/src/ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) *** @@ -1098,27 +1098,25 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:147](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L147) +[packages/quickjs-ffi-types/src/ffi.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L148) *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -[packages/quickjs-ffi-types/src/ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) +[packages/quickjs-ffi-types/src/ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) *** @@ -1136,7 +1134,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:203](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L203) +[packages/quickjs-ffi-types/src/ffi.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L204) *** @@ -1154,7 +1152,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L205) +[packages/quickjs-ffi-types/src/ffi.ts:206](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L206) *** @@ -1172,7 +1170,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) +[packages/quickjs-ffi-types/src/ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) *** @@ -1190,7 +1188,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:202](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L202) +[packages/quickjs-ffi-types/src/ffi.ts:203](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L203) *** @@ -1210,7 +1208,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L204) +[packages/quickjs-ffi-types/src/ffi.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L205) *** @@ -1230,7 +1228,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) +[packages/quickjs-ffi-types/src/ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) *** @@ -1250,7 +1248,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) +[packages/quickjs-ffi-types/src/ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) *** @@ -1270,7 +1268,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L194) +[packages/quickjs-ffi-types/src/ffi.ts:195](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L195) *** @@ -1294,7 +1292,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L116) +[packages/quickjs-ffi-types/src/ffi.ts:117](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L117) *** @@ -1312,7 +1310,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L192) +[packages/quickjs-ffi-types/src/ffi.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L193) *** @@ -1332,7 +1330,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L40) +[packages/quickjs-ffi-types/src/ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) *** @@ -1352,7 +1350,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L164) +[packages/quickjs-ffi-types/src/ffi.ts:165](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L165) *** @@ -1372,7 +1370,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:210](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L210) +[packages/quickjs-ffi-types/src/ffi.ts:211](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L211) *** @@ -1392,7 +1390,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:206](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L206) +[packages/quickjs-ffi-types/src/ffi.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L207) *** diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md index 4623ca4d..d76388d7 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md @@ -101,6 +101,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md index beeca5e2..2649bad9 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md @@ -94,6 +94,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md index 1384d2cc..640e84bc 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md @@ -97,7 +97,8 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md b/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md index f274ae8f..9ea2d522 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md @@ -90,7 +90,8 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md index ebee4f29..774032e6 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md @@ -90,6 +90,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md index 01563189..cfcbfd6a 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md @@ -83,6 +83,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-singlefile-browser-release-asyncify/README.md b/doc/@jitl/quickjs-singlefile-browser-release-asyncify/README.md index 36cd5931..c63fda8b 100644 --- a/doc/@jitl/quickjs-singlefile-browser-release-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-release-asyncify/README.md @@ -86,7 +86,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-browser-release-sync/README.md b/doc/@jitl/quickjs-singlefile-browser-release-sync/README.md index 63480bc7..47fe7259 100644 --- a/doc/@jitl/quickjs-singlefile-browser-release-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-release-sync/README.md @@ -79,7 +79,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md index 0b243d0d..1a396ea5 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md @@ -90,6 +90,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md index 2f70a692..7be2c21b 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md @@ -83,6 +83,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/README.md b/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/README.md index 46778d06..735dcf9c 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/README.md @@ -86,7 +86,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-cjs-release-sync/README.md b/doc/@jitl/quickjs-singlefile-cjs-release-sync/README.md index 830ed202..39730d2c 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-release-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-release-sync/README.md @@ -79,7 +79,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md index 52805212..fbfd26eb 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md @@ -90,6 +90,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md index 7cb244b7..b2e25eb3 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md @@ -83,6 +83,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/README.md b/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/README.md index 4e8e77f0..655ee510 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/README.md @@ -86,7 +86,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-mjs-release-sync/README.md b/doc/@jitl/quickjs-singlefile-mjs-release-sync/README.md index c1f99406..2421c6fd 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-release-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-release-sync/README.md @@ -79,7 +79,8 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md index f6f33a94..89452be3 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md @@ -101,6 +101,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-wasmfile-debug-sync/README.md b/doc/@jitl/quickjs-wasmfile-debug-sync/README.md index b54dfe0e..a87369fb 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-sync/README.md +++ b/doc/@jitl/quickjs-wasmfile-debug-sync/README.md @@ -94,6 +94,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md b/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md index 3e85eec7..2317ee25 100644 --- a/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md +++ b/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md @@ -97,7 +97,8 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/@jitl/quickjs-wasmfile-release-sync/README.md b/doc/@jitl/quickjs-wasmfile-release-sync/README.md index 0f5cb10b..a82e5afc 100644 --- a/doc/@jitl/quickjs-wasmfile-release-sync/README.md +++ b/doc/@jitl/quickjs-wasmfile-release-sync/README.md @@ -90,7 +90,8 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/doc/quickjs-emscripten-core/classes/QuickJSAsyncRuntime.md b/doc/quickjs-emscripten-core/classes/QuickJSAsyncRuntime.md index d6c4945f..1609638d 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSAsyncRuntime.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSAsyncRuntime.md @@ -96,7 +96,7 @@ false after the object has been [dispose](QuickJSAsyncRuntime.md#dispose-1)d #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:125](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L125) +[packages/quickjs-emscripten-core/src/runtime.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L131) ## Methods @@ -144,23 +144,21 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:327](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L327) +[packages/quickjs-emscripten-core/src/runtime.ts:369](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L369) *** ### computeMemoryUsage() -> **computeMemoryUsage**(): [`QuickJSHandle`](../exports.md#quickjshandle) +> **computeMemoryUsage**(): `JSMemoryUsage` -Compute memory usage for this runtime. Returns the result as a handle to a -JSValue object. Use [QuickJSContext#dump](QuickJSContext.md#dump) to convert to a native object. -Calling this method will allocate more memory inside the runtime. The information -is accurate as of just before the call to `computeMemoryUsage`. -For a human-digestible representation, see [dumpMemoryUsage](QuickJSAsyncRuntime.md#dumpmemoryusage). +Compute memory usage for this runtime. The information is accurate as of +just before the call to `computeMemoryUsage`. For a human-digestible +representation, see [dumpMemoryUsage](QuickJSAsyncRuntime.md#dumpmemoryusage). #### Returns -[`QuickJSHandle`](../exports.md#quickjshandle) +`JSMemoryUsage` #### Inherited from @@ -168,7 +166,7 @@ For a human-digestible representation, see [dumpMemoryUsage](QuickJSAsyncRuntime #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:296](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L296) +[packages/quickjs-emscripten-core/src/runtime.ts:300](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L300) *** @@ -195,7 +193,7 @@ manipulation if debug logging is disabled. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:363](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L363) +[packages/quickjs-emscripten-core/src/runtime.ts:405](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L405) *** @@ -215,7 +213,7 @@ Dispose of the underlying resources used by this object. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L129) +[packages/quickjs-emscripten-core/src/runtime.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L135) *** @@ -236,7 +234,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSAsy #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:307](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L307) +[packages/quickjs-emscripten-core/src/runtime.ts:349](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L349) *** @@ -274,7 +272,7 @@ functions or rejected promises. Those errors are available by calling #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L243) +[packages/quickjs-emscripten-core/src/runtime.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L249) *** @@ -297,7 +295,7 @@ true if there is at least one pendingJob queued up. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L194) +[packages/quickjs-emscripten-core/src/runtime.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L200) *** @@ -317,7 +315,7 @@ true if debug logging is enabled #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:353](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L353) +[packages/quickjs-emscripten-core/src/runtime.ts:395](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L395) *** @@ -366,7 +364,7 @@ See [setInterruptHandler](QuickJSAsyncRuntime.md#setinterrupthandler). #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:219](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L219) +[packages/quickjs-emscripten-core/src/runtime.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L225) *** @@ -386,7 +384,7 @@ Remove the the loader set by [setModuleLoader](QuickJSAsyncRuntime.md#setmodulel #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L181) +[packages/quickjs-emscripten-core/src/runtime.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L187) *** @@ -413,7 +411,7 @@ code. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:343](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L343) +[packages/quickjs-emscripten-core/src/runtime.ts:385](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L385) *** @@ -441,7 +439,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSAsyncR #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L207) +[packages/quickjs-emscripten-core/src/runtime.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L213) *** @@ -494,7 +492,7 @@ To remove the limit, set to `-1`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:281](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L281) +[packages/quickjs-emscripten-core/src/runtime.ts:287](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L287) *** diff --git a/doc/quickjs-emscripten-core/classes/QuickJSRuntime.md b/doc/quickjs-emscripten-core/classes/QuickJSRuntime.md index f8bf2eff..2c595a99 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSRuntime.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSRuntime.md @@ -79,7 +79,7 @@ A context here may be allocated if one is needed by the runtime, eg for [compute #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L78) +[packages/quickjs-emscripten-core/src/runtime.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L84) ## Accessors @@ -97,7 +97,7 @@ false after the object has been [dispose](QuickJSRuntime.md#dispose-1)d #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:125](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L125) +[packages/quickjs-emscripten-core/src/runtime.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L131) ## Methods @@ -145,27 +145,25 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:327](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L327) +[packages/quickjs-emscripten-core/src/runtime.ts:369](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L369) *** ### computeMemoryUsage() -> **computeMemoryUsage**(): [`QuickJSHandle`](../exports.md#quickjshandle) +> **computeMemoryUsage**(): `JSMemoryUsage` -Compute memory usage for this runtime. Returns the result as a handle to a -JSValue object. Use [QuickJSContext#dump](QuickJSContext.md#dump) to convert to a native object. -Calling this method will allocate more memory inside the runtime. The information -is accurate as of just before the call to `computeMemoryUsage`. -For a human-digestible representation, see [dumpMemoryUsage](QuickJSRuntime.md#dumpmemoryusage). +Compute memory usage for this runtime. The information is accurate as of +just before the call to `computeMemoryUsage`. For a human-digestible +representation, see [dumpMemoryUsage](QuickJSRuntime.md#dumpmemoryusage). #### Returns -[`QuickJSHandle`](../exports.md#quickjshandle) +`JSMemoryUsage` #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:296](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L296) +[packages/quickjs-emscripten-core/src/runtime.ts:300](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L300) *** @@ -188,7 +186,7 @@ manipulation if debug logging is disabled. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:363](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L363) +[packages/quickjs-emscripten-core/src/runtime.ts:405](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L405) *** @@ -212,7 +210,7 @@ Dispose of the underlying resources used by this object. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L129) +[packages/quickjs-emscripten-core/src/runtime.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L135) *** @@ -229,7 +227,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSRun #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:307](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L307) +[packages/quickjs-emscripten-core/src/runtime.ts:349](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L349) *** @@ -263,7 +261,7 @@ functions or rejected promises. Those errors are available by calling #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L243) +[packages/quickjs-emscripten-core/src/runtime.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L249) *** @@ -282,7 +280,7 @@ true if there is at least one pendingJob queued up. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L194) +[packages/quickjs-emscripten-core/src/runtime.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L200) *** @@ -298,7 +296,7 @@ true if debug logging is enabled #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:353](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L353) +[packages/quickjs-emscripten-core/src/runtime.ts:395](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L395) *** @@ -322,7 +320,7 @@ You should dispose a created context before disposing this runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L140) +[packages/quickjs-emscripten-core/src/runtime.ts:146](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L146) *** @@ -339,7 +337,7 @@ See [setInterruptHandler](QuickJSRuntime.md#setinterrupthandler). #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:219](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L219) +[packages/quickjs-emscripten-core/src/runtime.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L225) *** @@ -355,7 +353,7 @@ Remove the the loader set by [setModuleLoader](QuickJSRuntime.md#setmoduleloader #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L181) +[packages/quickjs-emscripten-core/src/runtime.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L187) *** @@ -378,7 +376,7 @@ code. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:343](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L343) +[packages/quickjs-emscripten-core/src/runtime.ts:385](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L385) *** @@ -402,7 +400,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSRuntim #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L207) +[packages/quickjs-emscripten-core/src/runtime.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L213) *** @@ -423,7 +421,7 @@ To remove the limit, set to `0`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:315](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L315) +[packages/quickjs-emscripten-core/src/runtime.ts:357](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L357) *** @@ -444,7 +442,7 @@ To remove the limit, set to `-1`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:281](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L281) +[packages/quickjs-emscripten-core/src/runtime.ts:287](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L287) *** @@ -469,7 +467,7 @@ The loader can be removed with [removeModuleLoader](QuickJSRuntime.md#removemodu #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:172](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L172) +[packages/quickjs-emscripten-core/src/runtime.ts:178](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L178) *** diff --git a/doc/quickjs-emscripten-core/exports.md b/doc/quickjs-emscripten-core/exports.md index 51df2323..20aae0fe 100644 --- a/doc/quickjs-emscripten-core/exports.md +++ b/doc/quickjs-emscripten-core/exports.md @@ -215,7 +215,7 @@ An `Array` that also implements [Disposable](interfaces/Disposable.md): #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L246) +[packages/quickjs-ffi-types/src/emscripten-types.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L248) *** @@ -231,7 +231,7 @@ by the runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L35) +[packages/quickjs-emscripten-core/src/runtime.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L41) *** @@ -256,7 +256,7 @@ Determines if a VM's execution should be interrupted. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:27](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L27) +[packages/quickjs-emscripten-core/src/runtime.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L33) *** @@ -472,7 +472,7 @@ State of a promise. #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) +[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) *** @@ -973,7 +973,7 @@ module code #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L106) +[packages/quickjs-ffi-types/src/ffi-types.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L111) *** @@ -1015,7 +1015,7 @@ Bitfield options for QTS_GetOwnPropertyNames #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:121](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L121) +[packages/quickjs-ffi-types/src/ffi-types.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L126) *** @@ -1093,7 +1093,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L111) +[packages/quickjs-ffi-types/src/ffi-types.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L116) *** @@ -1117,7 +1117,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L126) +[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) *** @@ -1141,7 +1141,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L131) +[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) ## Functions @@ -1174,7 +1174,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -[packages/quickjs-ffi-types/src/ffi-types.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L136) +[packages/quickjs-ffi-types/src/ffi-types.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L141) *** diff --git a/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md index b9200602..cf38eed2 100644 --- a/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - - [HEAP16](EmscriptenModule.md#heap16) - - [HEAP32](EmscriptenModule.md#heap32) - - [HEAP8](EmscriptenModule.md#heap8) - - [HEAPF32](EmscriptenModule.md#heapf32) - - [HEAPF64](EmscriptenModule.md#heapf64) - - [HEAPU16](EmscriptenModule.md#heapu16) - - [HEAPU32](EmscriptenModule.md#heapu32) - [HEAPU8](EmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - - [TOTAL\_STACK](EmscriptenModule.md#total-stack) - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [wasmMemory?](EmscriptenModule.md#wasmmemory) - [Methods](EmscriptenModule.md#methods) @@ -31,6 +21,7 @@ QuickJS. - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [getValue()](EmscriptenModule.md#getvalue) - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) - [locateFile()?](EmscriptenModule.md#locatefile) @@ -43,113 +34,13 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -277,6 +168,46 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md index e31d5f43..4a3050cb 100644 --- a/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md +++ b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md @@ -22,7 +22,7 @@ ## Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L249) +[packages/quickjs-ffi-types/src/emscripten-types.ts:251](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L251) *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md index 5d3924f3..5ba20af6 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSAsyncEmscriptenModule.md#extends) - [Properties](QuickJSAsyncEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSAsyncEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSAsyncEmscriptenModule.md#heap16) - - [HEAP32](QuickJSAsyncEmscriptenModule.md#heap32) - - [HEAP8](QuickJSAsyncEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSAsyncEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSAsyncEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSAsyncEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSAsyncEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSAsyncEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSAsyncEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [getValue()](QuickJSAsyncEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -205,7 +56,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L243) +[packages/quickjs-ffi-types/src/emscripten-types.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L245) *** @@ -219,7 +70,7 @@ Implement this field #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:242](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L242) +[packages/quickjs-ffi-types/src/emscripten-types.ts:244](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L244) *** @@ -363,6 +214,54 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md index cbcad748..fd3f2361 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md @@ -105,7 +105,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L39) +[packages/quickjs-ffi-types/src/ffi-async.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L40) *** @@ -125,7 +125,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:250](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L250) +[packages/quickjs-ffi-types/src/ffi-async.ts:251](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L251) *** @@ -139,7 +139,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L248) +[packages/quickjs-ffi-types/src/ffi-async.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L249) *** @@ -153,7 +153,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:247](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L247) +[packages/quickjs-ffi-types/src/ffi-async.ts:248](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L248) *** @@ -167,7 +167,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) +[packages/quickjs-ffi-types/src/ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) *** @@ -193,7 +193,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L173) +[packages/quickjs-ffi-types/src/ffi-async.ts:174](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L174) *** @@ -219,7 +219,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L180) +[packages/quickjs-ffi-types/src/ffi-async.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L181) *** @@ -253,7 +253,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L148) +[packages/quickjs-ffi-types/src/ffi-async.ts:149](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L149) *** @@ -273,7 +273,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L188) +[packages/quickjs-ffi-types/src/ffi-async.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L189) *** @@ -293,7 +293,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L192) +[packages/quickjs-ffi-types/src/ffi-async.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L193) *** @@ -313,7 +313,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L61) +[packages/quickjs-ffi-types/src/ffi-async.ts:62](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L62) *** @@ -341,7 +341,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L196) +[packages/quickjs-ffi-types/src/ffi-async.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L197) *** @@ -369,7 +369,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L204) +[packages/quickjs-ffi-types/src/ffi-async.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L205) *** @@ -391,7 +391,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L106) +[packages/quickjs-ffi-types/src/ffi-async.ts:107](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L107) *** @@ -413,7 +413,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L111) +[packages/quickjs-ffi-types/src/ffi-async.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L112) *** @@ -433,7 +433,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) +[packages/quickjs-ffi-types/src/ffi-async.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L61) *** @@ -451,7 +451,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L56) +[packages/quickjs-ffi-types/src/ffi-async.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L57) *** @@ -469,7 +469,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) +[packages/quickjs-ffi-types/src/ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) *** @@ -489,7 +489,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L57) +[packages/quickjs-ffi-types/src/ffi-async.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L58) *** @@ -509,7 +509,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L58) +[packages/quickjs-ffi-types/src/ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) *** @@ -529,7 +529,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) +[packages/quickjs-ffi-types/src/ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) *** @@ -549,7 +549,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L83) +[packages/quickjs-ffi-types/src/ffi-async.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L84) *** @@ -569,7 +569,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L87) +[packages/quickjs-ffi-types/src/ffi-async.ts:88](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L88) *** @@ -587,7 +587,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L245) +[packages/quickjs-ffi-types/src/ffi-async.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L246) *** @@ -601,7 +601,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) +[packages/quickjs-ffi-types/src/ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) *** @@ -621,7 +621,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) +[packages/quickjs-ffi-types/src/ffi-async.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L78) *** @@ -639,7 +639,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:231](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L231) +[packages/quickjs-ffi-types/src/ffi-async.ts:232](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L232) *** @@ -661,7 +661,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:220](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L220) +[packages/quickjs-ffi-types/src/ffi-async.ts:221](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L221) *** @@ -681,7 +681,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:212](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L212) +[packages/quickjs-ffi-types/src/ffi-async.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L213) *** @@ -695,7 +695,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) +[packages/quickjs-ffi-types/src/ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) *** @@ -721,7 +721,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L159) +[packages/quickjs-ffi-types/src/ffi-async.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L160) *** @@ -747,7 +747,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L166) +[packages/quickjs-ffi-types/src/ffi-async.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L167) *** @@ -769,7 +769,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L116) +[packages/quickjs-ffi-types/src/ffi-async.ts:117](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L117) *** @@ -791,7 +791,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L126) +[packages/quickjs-ffi-types/src/ffi-async.ts:127](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L127) *** @@ -813,7 +813,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L131) +[packages/quickjs-ffi-types/src/ffi-async.ts:132](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L132) *** @@ -835,7 +835,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:121](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L121) +[packages/quickjs-ffi-types/src/ffi-async.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L122) *** @@ -855,7 +855,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L79) +[packages/quickjs-ffi-types/src/ffi-async.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L80) *** @@ -875,7 +875,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L96) +[packages/quickjs-ffi-types/src/ffi-async.ts:97](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L97) *** @@ -895,7 +895,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L100) +[packages/quickjs-ffi-types/src/ffi-async.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L101) *** @@ -909,7 +909,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) +[packages/quickjs-ffi-types/src/ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) *** @@ -923,7 +923,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) +[packages/quickjs-ffi-types/src/ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) *** @@ -947,7 +947,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L225) +[packages/quickjs-ffi-types/src/ffi-async.ts:226](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L226) *** @@ -967,7 +967,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:104](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L104) +[packages/quickjs-ffi-types/src/ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) *** @@ -985,7 +985,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) +[packages/quickjs-ffi-types/src/ffi-async.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L106) *** @@ -1003,7 +1003,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L70) +[packages/quickjs-ffi-types/src/ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) *** @@ -1025,7 +1025,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) +[packages/quickjs-ffi-types/src/ffi-async.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L72) *** @@ -1045,7 +1045,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) +[packages/quickjs-ffi-types/src/ffi-async.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L56) *** @@ -1063,7 +1063,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) +[packages/quickjs-ffi-types/src/ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) *** @@ -1083,7 +1083,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L76) +[packages/quickjs-ffi-types/src/ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) *** @@ -1105,7 +1105,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L249) +[packages/quickjs-ffi-types/src/ffi-async.ts:250](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L250) *** @@ -1123,7 +1123,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L65) +[packages/quickjs-ffi-types/src/ffi-async.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L66) *** @@ -1143,7 +1143,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L66) +[packages/quickjs-ffi-types/src/ffi-async.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L67) *** @@ -1163,7 +1163,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:232](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L232) +[packages/quickjs-ffi-types/src/ffi-async.ts:233](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L233) *** @@ -1177,7 +1177,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) +[packages/quickjs-ffi-types/src/ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) *** @@ -1197,7 +1197,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L78) +[packages/quickjs-ffi-types/src/ffi-async.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L79) *** @@ -1219,7 +1219,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:91](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L91) +[packages/quickjs-ffi-types/src/ffi-async.ts:92](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L92) *** @@ -1239,7 +1239,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:240](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L240) +[packages/quickjs-ffi-types/src/ffi-async.ts:241](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L241) *** @@ -1259,7 +1259,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:236](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L236) +[packages/quickjs-ffi-types/src/ffi-async.ts:237](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L237) *** @@ -1273,7 +1273,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) +[packages/quickjs-ffi-types/src/ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) *** @@ -1293,27 +1293,25 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L187) +[packages/quickjs-ffi-types/src/ffi-async.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L188) *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) +[packages/quickjs-ffi-types/src/ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) *** @@ -1331,7 +1329,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:255](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L255) +[packages/quickjs-ffi-types/src/ffi-async.ts:256](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L256) *** @@ -1349,7 +1347,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:257](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L257) +[packages/quickjs-ffi-types/src/ffi-async.ts:258](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L258) *** @@ -1367,7 +1365,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) +[packages/quickjs-ffi-types/src/ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) *** @@ -1385,7 +1383,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:254](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L254) +[packages/quickjs-ffi-types/src/ffi-async.ts:255](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L255) *** @@ -1405,7 +1403,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:256](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L256) +[packages/quickjs-ffi-types/src/ffi-async.ts:257](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L257) *** @@ -1425,7 +1423,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) +[packages/quickjs-ffi-types/src/ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) *** @@ -1445,7 +1443,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) +[packages/quickjs-ffi-types/src/ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) *** @@ -1465,7 +1463,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:246](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L246) +[packages/quickjs-ffi-types/src/ffi-async.ts:247](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L247) *** @@ -1489,7 +1487,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:136](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L136) +[packages/quickjs-ffi-types/src/ffi-async.ts:137](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L137) *** @@ -1513,7 +1511,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:142](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L142) +[packages/quickjs-ffi-types/src/ffi-async.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L143) *** @@ -1531,7 +1529,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:244](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L244) +[packages/quickjs-ffi-types/src/ffi-async.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L245) *** @@ -1551,7 +1549,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L41) +[packages/quickjs-ffi-types/src/ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) *** @@ -1571,7 +1569,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:216](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L216) +[packages/quickjs-ffi-types/src/ffi-async.ts:217](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L217) *** @@ -1591,7 +1589,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:262](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L262) +[packages/quickjs-ffi-types/src/ffi-async.ts:263](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L263) *** @@ -1611,7 +1609,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi-async.ts:258](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L258) +[packages/quickjs-ffi-types/src/ffi-async.ts:259](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L259) *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md index f3621bfe..0c2bbd4e 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSEmscriptenModule.md#extends) - [Properties](QuickJSEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSEmscriptenModule.md#heap16) - - [HEAP32](QuickJSEmscriptenModule.md#heap32) - - [HEAP8](QuickJSEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [getValue()](QuickJSEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L168) - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L161) - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:167](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L167) - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`quickjs-emscripten-core.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -[packages/quickjs-ffi-types/src/emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -205,7 +56,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:237](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L237) +[packages/quickjs-ffi-types/src/emscripten-types.ts:239](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L239) *** @@ -215,7 +66,7 @@ QuickJS. #### Source -[packages/quickjs-ffi-types/src/emscripten-types.ts:236](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L236) +[packages/quickjs-ffi-types/src/emscripten-types.ts:238](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L238) *** @@ -359,6 +210,54 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString *** +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) + +*** + ### instantiateWasm()? > **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md b/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md index 4251716a..bc393dca 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md @@ -96,7 +96,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L38) +[packages/quickjs-ffi-types/src/ffi.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L39) *** @@ -116,7 +116,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L198) +[packages/quickjs-ffi-types/src/ffi.ts:199](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L199) *** @@ -130,7 +130,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L196) +[packages/quickjs-ffi-types/src/ffi.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L197) *** @@ -144,7 +144,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:195](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L195) +[packages/quickjs-ffi-types/src/ffi.ts:196](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L196) *** @@ -158,7 +158,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) +[packages/quickjs-ffi-types/src/ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) *** @@ -184,7 +184,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L140) +[packages/quickjs-ffi-types/src/ffi.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L141) *** @@ -218,7 +218,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L122) +[packages/quickjs-ffi-types/src/ffi.ts:123](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L123) *** @@ -238,7 +238,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L148) +[packages/quickjs-ffi-types/src/ffi.ts:149](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L149) *** @@ -258,7 +258,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L60) +[packages/quickjs-ffi-types/src/ffi.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L61) *** @@ -286,7 +286,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:152](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L152) +[packages/quickjs-ffi-types/src/ffi.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L153) *** @@ -308,7 +308,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L101) +[packages/quickjs-ffi-types/src/ffi.ts:102](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L102) *** @@ -328,7 +328,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) +[packages/quickjs-ffi-types/src/ffi.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L60) *** @@ -346,7 +346,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L55) +[packages/quickjs-ffi-types/src/ffi.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L56) *** @@ -364,7 +364,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) +[packages/quickjs-ffi-types/src/ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) *** @@ -384,7 +384,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L56) +[packages/quickjs-ffi-types/src/ffi.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L57) *** @@ -404,7 +404,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L57) +[packages/quickjs-ffi-types/src/ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) *** @@ -424,7 +424,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) +[packages/quickjs-ffi-types/src/ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) *** @@ -444,7 +444,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:82](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L82) +[packages/quickjs-ffi-types/src/ffi.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L83) *** @@ -464,7 +464,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:86](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L86) +[packages/quickjs-ffi-types/src/ffi.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L87) *** @@ -482,7 +482,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L193) +[packages/quickjs-ffi-types/src/ffi.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L194) *** @@ -496,7 +496,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) +[packages/quickjs-ffi-types/src/ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) *** @@ -516,7 +516,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) +[packages/quickjs-ffi-types/src/ffi.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L77) *** @@ -534,7 +534,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:179](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L179) +[packages/quickjs-ffi-types/src/ffi.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L180) *** @@ -556,7 +556,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:168](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L168) +[packages/quickjs-ffi-types/src/ffi.ts:169](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L169) *** @@ -576,7 +576,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L160) +[packages/quickjs-ffi-types/src/ffi.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L161) *** @@ -590,7 +590,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) +[packages/quickjs-ffi-types/src/ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) *** @@ -616,7 +616,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:133](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L133) +[packages/quickjs-ffi-types/src/ffi.ts:134](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L134) *** @@ -638,7 +638,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L106) +[packages/quickjs-ffi-types/src/ffi.ts:107](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L107) *** @@ -660,7 +660,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L111) +[packages/quickjs-ffi-types/src/ffi.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L112) *** @@ -680,7 +680,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L78) +[packages/quickjs-ffi-types/src/ffi.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L79) *** @@ -700,7 +700,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:95](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L95) +[packages/quickjs-ffi-types/src/ffi.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L96) *** @@ -714,7 +714,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) +[packages/quickjs-ffi-types/src/ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) *** @@ -728,7 +728,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) +[packages/quickjs-ffi-types/src/ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) *** @@ -752,7 +752,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L173) +[packages/quickjs-ffi-types/src/ffi.ts:174](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L174) *** @@ -772,7 +772,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L99) +[packages/quickjs-ffi-types/src/ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) *** @@ -790,7 +790,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) +[packages/quickjs-ffi-types/src/ffi.ts:101](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L101) *** @@ -808,7 +808,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L69) +[packages/quickjs-ffi-types/src/ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) *** @@ -830,7 +830,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) +[packages/quickjs-ffi-types/src/ffi.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L71) *** @@ -850,7 +850,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) +[packages/quickjs-ffi-types/src/ffi.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L55) *** @@ -868,7 +868,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) +[packages/quickjs-ffi-types/src/ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) *** @@ -888,7 +888,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:75](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L75) +[packages/quickjs-ffi-types/src/ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) *** @@ -910,7 +910,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L197) +[packages/quickjs-ffi-types/src/ffi.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L198) *** @@ -928,7 +928,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L64) +[packages/quickjs-ffi-types/src/ffi.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L65) *** @@ -948,7 +948,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L65) +[packages/quickjs-ffi-types/src/ffi.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L66) *** @@ -968,7 +968,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L180) +[packages/quickjs-ffi-types/src/ffi.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L181) *** @@ -982,7 +982,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) +[packages/quickjs-ffi-types/src/ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) *** @@ -1002,7 +1002,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L77) +[packages/quickjs-ffi-types/src/ffi.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L78) *** @@ -1024,7 +1024,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:90](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L90) +[packages/quickjs-ffi-types/src/ffi.ts:91](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L91) *** @@ -1044,7 +1044,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:188](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L188) +[packages/quickjs-ffi-types/src/ffi.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L189) *** @@ -1064,7 +1064,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:184](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L184) +[packages/quickjs-ffi-types/src/ffi.ts:185](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L185) *** @@ -1078,7 +1078,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) +[packages/quickjs-ffi-types/src/ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) *** @@ -1098,27 +1098,25 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:147](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L147) +[packages/quickjs-ffi-types/src/ffi.ts:148](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L148) *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -[packages/quickjs-ffi-types/src/ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) +[packages/quickjs-ffi-types/src/ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) *** @@ -1136,7 +1134,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:203](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L203) +[packages/quickjs-ffi-types/src/ffi.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L204) *** @@ -1154,7 +1152,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L205) +[packages/quickjs-ffi-types/src/ffi.ts:206](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L206) *** @@ -1172,7 +1170,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) +[packages/quickjs-ffi-types/src/ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) *** @@ -1190,7 +1188,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:202](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L202) +[packages/quickjs-ffi-types/src/ffi.ts:203](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L203) *** @@ -1210,7 +1208,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:204](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L204) +[packages/quickjs-ffi-types/src/ffi.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L205) *** @@ -1230,7 +1228,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) +[packages/quickjs-ffi-types/src/ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) *** @@ -1250,7 +1248,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) +[packages/quickjs-ffi-types/src/ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) *** @@ -1270,7 +1268,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L194) +[packages/quickjs-ffi-types/src/ffi.ts:195](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L195) *** @@ -1294,7 +1292,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:116](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L116) +[packages/quickjs-ffi-types/src/ffi.ts:117](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L117) *** @@ -1312,7 +1310,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L192) +[packages/quickjs-ffi-types/src/ffi.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L193) *** @@ -1332,7 +1330,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L40) +[packages/quickjs-ffi-types/src/ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) *** @@ -1352,7 +1350,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L164) +[packages/quickjs-ffi-types/src/ffi.ts:165](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L165) *** @@ -1372,7 +1370,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:210](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L210) +[packages/quickjs-ffi-types/src/ffi.ts:211](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L211) *** @@ -1392,7 +1390,7 @@ Set at compile time. #### Source -[packages/quickjs-ffi-types/src/ffi.ts:206](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L206) +[packages/quickjs-ffi-types/src/ffi.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L207) *** diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md b/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md index 1167449a..38bbf7a1 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md @@ -96,7 +96,7 @@ false after the object has been [dispose](QuickJSAsyncRuntime.md#dispose-1)d #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:125](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L125) +[packages/quickjs-emscripten-core/src/runtime.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L131) ## Methods @@ -144,23 +144,21 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:327](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L327) +[packages/quickjs-emscripten-core/src/runtime.ts:369](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L369) *** ### computeMemoryUsage() -> **computeMemoryUsage**(): [`QuickJSHandle`](../exports.md#quickjshandle) +> **computeMemoryUsage**(): `JSMemoryUsage` -Compute memory usage for this runtime. Returns the result as a handle to a -JSValue object. Use [QuickJSContext#dump](QuickJSContext.md#dump) to convert to a native object. -Calling this method will allocate more memory inside the runtime. The information -is accurate as of just before the call to `computeMemoryUsage`. -For a human-digestible representation, see [dumpMemoryUsage](QuickJSAsyncRuntime.md#dumpmemoryusage). +Compute memory usage for this runtime. The information is accurate as of +just before the call to `computeMemoryUsage`. For a human-digestible +representation, see [dumpMemoryUsage](QuickJSAsyncRuntime.md#dumpmemoryusage). #### Returns -[`QuickJSHandle`](../exports.md#quickjshandle) +`JSMemoryUsage` #### Inherited from @@ -168,7 +166,7 @@ For a human-digestible representation, see [dumpMemoryUsage](QuickJSAsyncRuntime #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:296](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L296) +[packages/quickjs-emscripten-core/src/runtime.ts:300](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L300) *** @@ -195,7 +193,7 @@ manipulation if debug logging is disabled. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:363](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L363) +[packages/quickjs-emscripten-core/src/runtime.ts:405](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L405) *** @@ -215,7 +213,7 @@ Dispose of the underlying resources used by this object. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L129) +[packages/quickjs-emscripten-core/src/runtime.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L135) *** @@ -236,7 +234,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSAsy #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:307](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L307) +[packages/quickjs-emscripten-core/src/runtime.ts:349](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L349) *** @@ -274,7 +272,7 @@ functions or rejected promises. Those errors are available by calling #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L243) +[packages/quickjs-emscripten-core/src/runtime.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L249) *** @@ -297,7 +295,7 @@ true if there is at least one pendingJob queued up. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L194) +[packages/quickjs-emscripten-core/src/runtime.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L200) *** @@ -317,7 +315,7 @@ true if debug logging is enabled #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:353](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L353) +[packages/quickjs-emscripten-core/src/runtime.ts:395](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L395) *** @@ -366,7 +364,7 @@ See [setInterruptHandler](QuickJSAsyncRuntime.md#setinterrupthandler). #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:219](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L219) +[packages/quickjs-emscripten-core/src/runtime.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L225) *** @@ -386,7 +384,7 @@ Remove the the loader set by [setModuleLoader](QuickJSAsyncRuntime.md#setmodulel #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L181) +[packages/quickjs-emscripten-core/src/runtime.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L187) *** @@ -413,7 +411,7 @@ code. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:343](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L343) +[packages/quickjs-emscripten-core/src/runtime.ts:385](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L385) *** @@ -441,7 +439,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSAsyncR #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L207) +[packages/quickjs-emscripten-core/src/runtime.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L213) *** @@ -494,7 +492,7 @@ To remove the limit, set to `-1`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:281](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L281) +[packages/quickjs-emscripten-core/src/runtime.ts:287](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L287) *** diff --git a/doc/quickjs-emscripten/classes/QuickJSRuntime.md b/doc/quickjs-emscripten/classes/QuickJSRuntime.md index a6c48a82..c0841ee9 100644 --- a/doc/quickjs-emscripten/classes/QuickJSRuntime.md +++ b/doc/quickjs-emscripten/classes/QuickJSRuntime.md @@ -79,7 +79,7 @@ A context here may be allocated if one is needed by the runtime, eg for [compute #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L78) +[packages/quickjs-emscripten-core/src/runtime.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L84) ## Accessors @@ -97,7 +97,7 @@ false after the object has been [dispose](QuickJSRuntime.md#dispose-1)d #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:125](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L125) +[packages/quickjs-emscripten-core/src/runtime.ts:131](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L131) ## Methods @@ -145,27 +145,25 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:327](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L327) +[packages/quickjs-emscripten-core/src/runtime.ts:369](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L369) *** ### computeMemoryUsage() -> **computeMemoryUsage**(): [`QuickJSHandle`](../exports.md#quickjshandle) +> **computeMemoryUsage**(): `JSMemoryUsage` -Compute memory usage for this runtime. Returns the result as a handle to a -JSValue object. Use [QuickJSContext#dump](QuickJSContext.md#dump) to convert to a native object. -Calling this method will allocate more memory inside the runtime. The information -is accurate as of just before the call to `computeMemoryUsage`. -For a human-digestible representation, see [dumpMemoryUsage](QuickJSRuntime.md#dumpmemoryusage). +Compute memory usage for this runtime. The information is accurate as of +just before the call to `computeMemoryUsage`. For a human-digestible +representation, see [dumpMemoryUsage](QuickJSRuntime.md#dumpmemoryusage). #### Returns -[`QuickJSHandle`](../exports.md#quickjshandle) +`JSMemoryUsage` #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:296](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L296) +[packages/quickjs-emscripten-core/src/runtime.ts:300](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L300) *** @@ -188,7 +186,7 @@ manipulation if debug logging is disabled. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:363](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L363) +[packages/quickjs-emscripten-core/src/runtime.ts:405](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L405) *** @@ -212,7 +210,7 @@ Dispose of the underlying resources used by this object. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L129) +[packages/quickjs-emscripten-core/src/runtime.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L135) *** @@ -229,7 +227,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSRun #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:307](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L307) +[packages/quickjs-emscripten-core/src/runtime.ts:349](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L349) *** @@ -263,7 +261,7 @@ functions or rejected promises. Those errors are available by calling #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:243](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L243) +[packages/quickjs-emscripten-core/src/runtime.ts:249](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L249) *** @@ -282,7 +280,7 @@ true if there is at least one pendingJob queued up. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:194](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L194) +[packages/quickjs-emscripten-core/src/runtime.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L200) *** @@ -298,7 +296,7 @@ true if debug logging is enabled #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:353](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L353) +[packages/quickjs-emscripten-core/src/runtime.ts:395](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L395) *** @@ -322,7 +320,7 @@ You should dispose a created context before disposing this runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L140) +[packages/quickjs-emscripten-core/src/runtime.ts:146](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L146) *** @@ -339,7 +337,7 @@ See [setInterruptHandler](QuickJSRuntime.md#setinterrupthandler). #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:219](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L219) +[packages/quickjs-emscripten-core/src/runtime.ts:225](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L225) *** @@ -355,7 +353,7 @@ Remove the the loader set by [setModuleLoader](QuickJSRuntime.md#setmoduleloader #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:181](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L181) +[packages/quickjs-emscripten-core/src/runtime.ts:187](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L187) *** @@ -378,7 +376,7 @@ code. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:343](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L343) +[packages/quickjs-emscripten-core/src/runtime.ts:385](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L385) *** @@ -402,7 +400,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSRuntim #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:207](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L207) +[packages/quickjs-emscripten-core/src/runtime.ts:213](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L213) *** @@ -423,7 +421,7 @@ To remove the limit, set to `0`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:315](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L315) +[packages/quickjs-emscripten-core/src/runtime.ts:357](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L357) *** @@ -444,7 +442,7 @@ To remove the limit, set to `-1`. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:281](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L281) +[packages/quickjs-emscripten-core/src/runtime.ts:287](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L287) *** @@ -469,7 +467,7 @@ The loader can be removed with [removeModuleLoader](QuickJSRuntime.md#removemodu #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:172](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L172) +[packages/quickjs-emscripten-core/src/runtime.ts:178](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L178) *** diff --git a/doc/quickjs-emscripten/exports.md b/doc/quickjs-emscripten/exports.md index fc574efb..bc719927 100644 --- a/doc/quickjs-emscripten/exports.md +++ b/doc/quickjs-emscripten/exports.md @@ -219,7 +219,7 @@ An `Array` that also implements [Disposable](interfaces/Disposable.md): #### Source -packages/quickjs-ffi-types/dist/index.d.ts:538 +packages/quickjs-ffi-types/dist/index.d.ts:534 *** @@ -229,7 +229,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:538 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:332 +packages/quickjs-ffi-types/dist/index.d.ts:328 *** @@ -245,7 +245,7 @@ by the runtime. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L35) +[packages/quickjs-emscripten-core/src/runtime.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L41) *** @@ -270,7 +270,7 @@ Determines if a VM's execution should be interrupted. #### Source -[packages/quickjs-emscripten-core/src/runtime.ts:27](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L27) +[packages/quickjs-emscripten-core/src/runtime.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/runtime.ts#L33) *** @@ -486,7 +486,7 @@ State of a promise. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:145 +packages/quickjs-ffi-types/dist/index.d.ts:149 *** @@ -757,7 +757,7 @@ Property key for getting or setting a property on a handle with #### Source -packages/quickjs-ffi-types/dist/index.d.ts:537 +packages/quickjs-ffi-types/dist/index.d.ts:533 *** @@ -1033,7 +1033,7 @@ module code #### Source -packages/quickjs-ffi-types/dist/index.d.ts:94 +packages/quickjs-ffi-types/dist/index.d.ts:98 *** @@ -1075,7 +1075,7 @@ Bitfield options for QTS_GetOwnPropertyNames #### Source -packages/quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:158 *** @@ -1153,7 +1153,7 @@ Bitfield options for QTS_NewContext intrinsics #### Source -packages/quickjs-ffi-types/dist/index.d.ts:122 +packages/quickjs-ffi-types/dist/index.d.ts:126 *** @@ -1177,7 +1177,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:122 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:168 +packages/quickjs-ffi-types/dist/index.d.ts:172 *** @@ -1201,7 +1201,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:168 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:145 +packages/quickjs-ffi-types/dist/index.d.ts:149 *** @@ -1280,7 +1280,7 @@ packages/variant-quickjs-wasmfile-release-sync/dist/index.d.ts:18 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:90 +packages/quickjs-ffi-types/dist/index.d.ts:94 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModule.md b/doc/quickjs-emscripten/interfaces/EmscriptenModule.md index 3ae98434..5c0b305a 100644 --- a/doc/quickjs-emscripten/interfaces/EmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - - [HEAP16](EmscriptenModule.md#heap16) - - [HEAP32](EmscriptenModule.md#heap32) - - [HEAP8](EmscriptenModule.md#heap8) - - [HEAPF32](EmscriptenModule.md#heapf32) - - [HEAPF64](EmscriptenModule.md#heapf64) - - [HEAPU16](EmscriptenModule.md#heapu16) - - [HEAPU32](EmscriptenModule.md#heapu32) - [HEAPU8](EmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - - [TOTAL\_STACK](EmscriptenModule.md#total-stack) - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [wasmMemory?](EmscriptenModule.md#wasmmemory) - [Methods](EmscriptenModule.md#methods) @@ -31,6 +21,7 @@ QuickJS. - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [getValue()](EmscriptenModule.md#getvalue) - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) - [locateFile()?](EmscriptenModule.md#locatefile) @@ -43,113 +34,13 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:289 - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:280 - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:281 - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:279 - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:285 - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:286 - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:283 - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:284 - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` #### Source -packages/quickjs-ffi-types/dist/index.d.ts:282 - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:288 - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:287 +packages/quickjs-ffi-types/dist/index.d.ts:285 *** @@ -165,7 +56,7 @@ Compile this to WebAssembly.Module #### Source -packages/quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:250 *** @@ -181,7 +72,7 @@ If provided, use this WebAssembly.Memory instead of an automatically created one #### Source -packages/quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:252 ## Methods @@ -204,7 +95,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:274 +packages/quickjs-ffi-types/dist/index.d.ts:278 *** @@ -222,7 +113,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:274 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:277 +packages/quickjs-ffi-types/dist/index.d.ts:281 *** @@ -240,7 +131,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:277 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:276 +packages/quickjs-ffi-types/dist/index.d.ts:280 *** @@ -273,7 +164,47 @@ packages/quickjs-ffi-types/dist/index.d.ts:276 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:278 +packages/quickjs-ffi-types/dist/index.d.ts:282 + +*** + +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:283 + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:284 *** @@ -299,7 +230,7 @@ Create an instance of the WASM module, call onSuccess(instance), then return ins #### Source -packages/quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:254 *** @@ -317,7 +248,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:250 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:275 +packages/quickjs-ffi-types/dist/index.d.ts:279 *** @@ -361,7 +292,7 @@ Often `''` (empty string) #### Source -packages/quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:246 *** @@ -385,7 +316,7 @@ Called by emscripten as dependencies blocking initialization are added or fulfil #### Source -packages/quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:256 *** @@ -410,7 +341,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:269 +packages/quickjs-ffi-types/dist/index.d.ts:273 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md index 5a7ed44d..01155a12 100644 --- a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md @@ -22,7 +22,7 @@ ## Source -packages/quickjs-ffi-types/dist/index.d.ts:334 +packages/quickjs-ffi-types/dist/index.d.ts:330 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md index a13ee856..d87ea2da 100644 --- a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md @@ -35,7 +35,7 @@ Compile this to WebAssembly.Module #### Source -packages/quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:250 *** @@ -47,7 +47,7 @@ If provided, use this WebAssembly.Memory instead of an automatically created one #### Source -packages/quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:252 ## Methods @@ -69,7 +69,7 @@ Create an instance of the WASM module, call onSuccess(instance), then return ins #### Source -packages/quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:254 *** @@ -109,7 +109,7 @@ Often `''` (empty string) #### Source -packages/quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:246 *** @@ -129,7 +129,7 @@ Called by emscripten as dependencies blocking initialization are added or fulfil #### Source -packages/quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:256 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md index 3818ee38..318b7781 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSAsyncEmscriptenModule.md#extends) - [Properties](QuickJSAsyncEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSAsyncEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSAsyncEmscriptenModule.md#heap16) - - [HEAP32](QuickJSAsyncEmscriptenModule.md#heap32) - - [HEAP8](QuickJSAsyncEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSAsyncEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSAsyncEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSAsyncEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSAsyncEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSAsyncEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSAsyncEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [getValue()](QuickJSAsyncEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:289 - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:280 - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:281 - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:279 - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:285 - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:286 - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:283 - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:284 - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:284 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:282 - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:288 - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:287 +packages/quickjs-ffi-types/dist/index.d.ts:285 *** @@ -205,7 +56,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:287 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:330 +packages/quickjs-ffi-types/dist/index.d.ts:326 *** @@ -219,7 +70,7 @@ Implement this field #### Source -packages/quickjs-ffi-types/dist/index.d.ts:329 +packages/quickjs-ffi-types/dist/index.d.ts:325 *** @@ -235,7 +86,7 @@ Compile this to WebAssembly.Module #### Source -packages/quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:250 *** @@ -251,7 +102,7 @@ If provided, use this WebAssembly.Memory instead of an automatically created one #### Source -packages/quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:252 ## Methods @@ -278,7 +129,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:274 +packages/quickjs-ffi-types/dist/index.d.ts:278 *** @@ -300,7 +151,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:274 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:277 +packages/quickjs-ffi-types/dist/index.d.ts:281 *** @@ -322,7 +173,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:277 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:276 +packages/quickjs-ffi-types/dist/index.d.ts:280 *** @@ -359,7 +210,55 @@ packages/quickjs-ffi-types/dist/index.d.ts:276 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:278 +packages/quickjs-ffi-types/dist/index.d.ts:282 + +*** + +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`quickjs-emscripten.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:283 + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`quickjs-emscripten.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:284 *** @@ -385,7 +284,7 @@ Create an instance of the WASM module, call onSuccess(instance), then return ins #### Source -packages/quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:254 *** @@ -407,7 +306,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:250 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:275 +packages/quickjs-ffi-types/dist/index.d.ts:279 *** @@ -451,7 +350,7 @@ Often `''` (empty string) #### Source -packages/quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:246 *** @@ -475,7 +374,7 @@ Called by emscripten as dependencies blocking initialization are added or fulfil #### Source -packages/quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:256 *** @@ -504,7 +403,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:269 +packages/quickjs-ffi-types/dist/index.d.ts:273 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md index 0d45618c..5267032d 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md @@ -105,7 +105,7 @@ Set at compile time. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:424 +packages/quickjs-ffi-types/dist/index.d.ts:420 *** @@ -125,7 +125,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:424 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:493 +packages/quickjs-ffi-types/dist/index.d.ts:489 *** @@ -139,7 +139,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:493 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:491 +packages/quickjs-ffi-types/dist/index.d.ts:487 *** @@ -153,7 +153,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:491 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:490 +packages/quickjs-ffi-types/dist/index.d.ts:486 *** @@ -167,7 +167,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:490 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:431 +packages/quickjs-ffi-types/dist/index.d.ts:427 *** @@ -193,7 +193,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:431 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:472 +packages/quickjs-ffi-types/dist/index.d.ts:468 *** @@ -219,7 +219,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:472 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:473 +packages/quickjs-ffi-types/dist/index.d.ts:469 *** @@ -253,7 +253,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:473 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:469 +packages/quickjs-ffi-types/dist/index.d.ts:465 *** @@ -273,7 +273,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:469 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:475 +packages/quickjs-ffi-types/dist/index.d.ts:471 *** @@ -293,7 +293,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:475 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:476 +packages/quickjs-ffi-types/dist/index.d.ts:472 *** @@ -313,7 +313,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:476 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:445 +packages/quickjs-ffi-types/dist/index.d.ts:441 *** @@ -341,7 +341,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:445 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:477 +packages/quickjs-ffi-types/dist/index.d.ts:473 *** @@ -369,7 +369,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:477 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:478 +packages/quickjs-ffi-types/dist/index.d.ts:474 *** @@ -391,7 +391,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:478 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:461 +packages/quickjs-ffi-types/dist/index.d.ts:457 *** @@ -413,7 +413,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:461 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:462 +packages/quickjs-ffi-types/dist/index.d.ts:458 *** @@ -433,7 +433,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:462 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:444 +packages/quickjs-ffi-types/dist/index.d.ts:440 *** @@ -451,7 +451,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:444 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:440 +packages/quickjs-ffi-types/dist/index.d.ts:436 *** @@ -469,7 +469,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:440 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:438 +packages/quickjs-ffi-types/dist/index.d.ts:434 *** @@ -489,7 +489,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:438 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:441 +packages/quickjs-ffi-types/dist/index.d.ts:437 *** @@ -509,7 +509,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:441 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:442 +packages/quickjs-ffi-types/dist/index.d.ts:438 *** @@ -529,7 +529,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:442 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:443 +packages/quickjs-ffi-types/dist/index.d.ts:439 *** @@ -549,7 +549,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:443 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:454 +packages/quickjs-ffi-types/dist/index.d.ts:450 *** @@ -569,7 +569,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:454 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:455 +packages/quickjs-ffi-types/dist/index.d.ts:451 *** @@ -587,7 +587,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:455 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:488 +packages/quickjs-ffi-types/dist/index.d.ts:484 *** @@ -601,7 +601,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:488 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:435 +packages/quickjs-ffi-types/dist/index.d.ts:431 *** @@ -621,7 +621,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:435 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:451 +packages/quickjs-ffi-types/dist/index.d.ts:447 *** @@ -639,7 +639,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:451 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:483 +packages/quickjs-ffi-types/dist/index.d.ts:479 *** @@ -661,7 +661,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:483 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:481 +packages/quickjs-ffi-types/dist/index.d.ts:477 *** @@ -681,7 +681,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:481 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:479 +packages/quickjs-ffi-types/dist/index.d.ts:475 *** @@ -695,7 +695,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:479 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:434 +packages/quickjs-ffi-types/dist/index.d.ts:430 *** @@ -721,7 +721,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:434 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:470 +packages/quickjs-ffi-types/dist/index.d.ts:466 *** @@ -747,7 +747,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:470 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:471 +packages/quickjs-ffi-types/dist/index.d.ts:467 *** @@ -769,7 +769,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:471 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:463 +packages/quickjs-ffi-types/dist/index.d.ts:459 *** @@ -791,7 +791,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:463 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:465 +packages/quickjs-ffi-types/dist/index.d.ts:461 *** @@ -813,7 +813,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:465 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:466 +packages/quickjs-ffi-types/dist/index.d.ts:462 *** @@ -835,7 +835,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:466 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:464 +packages/quickjs-ffi-types/dist/index.d.ts:460 *** @@ -855,7 +855,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:464 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:453 +packages/quickjs-ffi-types/dist/index.d.ts:449 *** @@ -875,7 +875,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:453 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:457 +packages/quickjs-ffi-types/dist/index.d.ts:453 *** @@ -895,7 +895,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:457 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:458 +packages/quickjs-ffi-types/dist/index.d.ts:454 *** @@ -909,7 +909,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:458 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:436 +packages/quickjs-ffi-types/dist/index.d.ts:432 *** @@ -923,7 +923,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:436 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:433 +packages/quickjs-ffi-types/dist/index.d.ts:429 *** @@ -947,7 +947,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:433 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:482 +packages/quickjs-ffi-types/dist/index.d.ts:478 *** @@ -967,7 +967,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:482 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:459 +packages/quickjs-ffi-types/dist/index.d.ts:455 *** @@ -985,7 +985,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:459 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:460 +packages/quickjs-ffi-types/dist/index.d.ts:456 *** @@ -1003,7 +1003,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:460 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:448 +packages/quickjs-ffi-types/dist/index.d.ts:444 *** @@ -1025,7 +1025,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:448 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:449 +packages/quickjs-ffi-types/dist/index.d.ts:445 *** @@ -1045,7 +1045,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:449 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:439 +packages/quickjs-ffi-types/dist/index.d.ts:435 *** @@ -1063,7 +1063,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:439 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:426 +packages/quickjs-ffi-types/dist/index.d.ts:422 *** @@ -1083,7 +1083,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:426 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:450 +packages/quickjs-ffi-types/dist/index.d.ts:446 *** @@ -1105,7 +1105,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:450 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:492 +packages/quickjs-ffi-types/dist/index.d.ts:488 *** @@ -1123,7 +1123,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:492 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:446 +packages/quickjs-ffi-types/dist/index.d.ts:442 *** @@ -1143,7 +1143,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:446 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:447 +packages/quickjs-ffi-types/dist/index.d.ts:443 *** @@ -1163,7 +1163,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:447 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:484 +packages/quickjs-ffi-types/dist/index.d.ts:480 *** @@ -1177,7 +1177,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:484 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:437 +packages/quickjs-ffi-types/dist/index.d.ts:433 *** @@ -1197,7 +1197,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:437 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:452 +packages/quickjs-ffi-types/dist/index.d.ts:448 *** @@ -1219,7 +1219,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:452 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:456 +packages/quickjs-ffi-types/dist/index.d.ts:452 *** @@ -1239,7 +1239,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:456 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:486 +packages/quickjs-ffi-types/dist/index.d.ts:482 *** @@ -1259,7 +1259,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:486 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:485 +packages/quickjs-ffi-types/dist/index.d.ts:481 *** @@ -1273,7 +1273,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:485 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:430 +packages/quickjs-ffi-types/dist/index.d.ts:426 *** @@ -1293,27 +1293,25 @@ packages/quickjs-ffi-types/dist/index.d.ts:430 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:474 +packages/quickjs-ffi-types/dist/index.d.ts:470 *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -packages/quickjs-ffi-types/dist/index.d.ts:428 +packages/quickjs-ffi-types/dist/index.d.ts:424 *** @@ -1331,7 +1329,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:428 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:495 +packages/quickjs-ffi-types/dist/index.d.ts:491 *** @@ -1349,7 +1347,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:495 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:497 +packages/quickjs-ffi-types/dist/index.d.ts:493 *** @@ -1367,7 +1365,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:497 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:429 +packages/quickjs-ffi-types/dist/index.d.ts:425 *** @@ -1385,7 +1383,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:429 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:494 +packages/quickjs-ffi-types/dist/index.d.ts:490 *** @@ -1405,7 +1403,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:494 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:496 +packages/quickjs-ffi-types/dist/index.d.ts:492 *** @@ -1425,7 +1423,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:496 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:432 +packages/quickjs-ffi-types/dist/index.d.ts:428 *** @@ -1445,7 +1443,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:432 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:427 +packages/quickjs-ffi-types/dist/index.d.ts:423 *** @@ -1465,7 +1463,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:427 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:489 +packages/quickjs-ffi-types/dist/index.d.ts:485 *** @@ -1489,7 +1487,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:489 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:467 +packages/quickjs-ffi-types/dist/index.d.ts:463 *** @@ -1513,7 +1511,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:467 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:468 +packages/quickjs-ffi-types/dist/index.d.ts:464 *** @@ -1531,7 +1529,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:468 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:487 +packages/quickjs-ffi-types/dist/index.d.ts:483 *** @@ -1551,7 +1549,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:487 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:425 +packages/quickjs-ffi-types/dist/index.d.ts:421 *** @@ -1571,7 +1569,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:425 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:480 +packages/quickjs-ffi-types/dist/index.d.ts:476 *** @@ -1591,7 +1589,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:480 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:499 +packages/quickjs-ffi-types/dist/index.d.ts:495 *** @@ -1611,7 +1609,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:499 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:498 +packages/quickjs-ffi-types/dist/index.d.ts:494 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md index 20da3711..29b2db4d 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md @@ -36,7 +36,7 @@ build variant to [newQuickJSWASMModule](../exports.md#newquickjswasmmodule) or [ #### Source -packages/quickjs-ffi-types/dist/index.d.ts:534 +packages/quickjs-ffi-types/dist/index.d.ts:530 *** @@ -50,7 +50,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:534 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:535 +packages/quickjs-ffi-types/dist/index.d.ts:531 *** @@ -60,7 +60,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:535 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:533 +packages/quickjs-ffi-types/dist/index.d.ts:529 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md b/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md index 8220ecd3..ffb726b3 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md @@ -13,17 +13,7 @@ QuickJS. - [Extends](QuickJSEmscriptenModule.md#extends) - [Properties](QuickJSEmscriptenModule.md#properties) - - [FAST\_MEMORY](QuickJSEmscriptenModule.md#fast-memory) - - [HEAP16](QuickJSEmscriptenModule.md#heap16) - - [HEAP32](QuickJSEmscriptenModule.md#heap32) - - [HEAP8](QuickJSEmscriptenModule.md#heap8) - - [HEAPF32](QuickJSEmscriptenModule.md#heapf32) - - [HEAPF64](QuickJSEmscriptenModule.md#heapf64) - - [HEAPU16](QuickJSEmscriptenModule.md#heapu16) - - [HEAPU32](QuickJSEmscriptenModule.md#heapu32) - [HEAPU8](QuickJSEmscriptenModule.md#heapu8) - - [TOTAL\_MEMORY](QuickJSEmscriptenModule.md#total-memory) - - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) @@ -33,6 +23,7 @@ QuickJS. - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [getValue()](QuickJSEmscriptenModule.md#getvalue) - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) @@ -45,118 +36,6 @@ QuickJS. ## Properties -### FAST\_MEMORY - -> **FAST\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.FAST_MEMORY`](EmscriptenModule.md#fast-memory) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:289 - -*** - -### HEAP16 - -> **HEAP16**: `Int16Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP16`](EmscriptenModule.md#heap16) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:280 - -*** - -### HEAP32 - -> **HEAP32**: `Int32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP32`](EmscriptenModule.md#heap32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:281 - -*** - -### HEAP8 - -> **HEAP8**: `Int8Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAP8`](EmscriptenModule.md#heap8) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:279 - -*** - -### HEAPF32 - -> **HEAPF32**: `Float32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPF32`](EmscriptenModule.md#heapf32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:285 - -*** - -### HEAPF64 - -> **HEAPF64**: `Float64Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPF64`](EmscriptenModule.md#heapf64) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:286 - -*** - -### HEAPU16 - -> **HEAPU16**: `Uint16Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPU16`](EmscriptenModule.md#heapu16) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:283 - -*** - -### HEAPU32 - -> **HEAPU32**: `Uint32Array` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.HEAPU32`](EmscriptenModule.md#heapu32) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:284 - -*** - ### HEAPU8 > **HEAPU8**: `Uint8Array` @@ -167,35 +46,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:284 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:282 - -*** - -### TOTAL\_MEMORY - -> **TOTAL\_MEMORY**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.TOTAL_MEMORY`](EmscriptenModule.md#total-memory) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:288 - -*** - -### TOTAL\_STACK - -> **TOTAL\_STACK**: `number` - -#### Inherited from - -[`quickjs-emscripten.EmscriptenModule.TOTAL_STACK`](EmscriptenModule.md#total-stack) - -#### Source - -packages/quickjs-ffi-types/dist/index.d.ts:287 +packages/quickjs-ffi-types/dist/index.d.ts:285 *** @@ -205,7 +56,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:287 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:325 +packages/quickjs-ffi-types/dist/index.d.ts:321 *** @@ -215,7 +66,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:325 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:324 +packages/quickjs-ffi-types/dist/index.d.ts:320 *** @@ -231,7 +82,7 @@ Compile this to WebAssembly.Module #### Source -packages/quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:250 *** @@ -247,7 +98,7 @@ If provided, use this WebAssembly.Memory instead of an automatically created one #### Source -packages/quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:252 ## Methods @@ -274,7 +125,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:274 +packages/quickjs-ffi-types/dist/index.d.ts:278 *** @@ -296,7 +147,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:274 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:277 +packages/quickjs-ffi-types/dist/index.d.ts:281 *** @@ -318,7 +169,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:277 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:276 +packages/quickjs-ffi-types/dist/index.d.ts:280 *** @@ -355,7 +206,55 @@ packages/quickjs-ffi-types/dist/index.d.ts:276 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:278 +packages/quickjs-ffi-types/dist/index.d.ts:282 + +*** + +### getValue() + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `number` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i8"` \| `"i16"` \| `"i32"` \| `"float"` \| `"double"` + +##### Returns + +`number` + +##### Inherited from + +[`quickjs-emscripten.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:283 + +#### getValue(ptr, type) + +> **getValue**(`ptr`, `type`): `bigint` + +##### Parameters + +• **ptr**: `number` + +• **type**: `"i64"` + +##### Returns + +`bigint` + +##### Inherited from + +[`quickjs-emscripten.EmscriptenModule.getValue`](EmscriptenModule.md#getvalue) + +##### Source + +packages/quickjs-ffi-types/dist/index.d.ts:284 *** @@ -381,7 +280,7 @@ Create an instance of the WASM module, call onSuccess(instance), then return ins #### Source -packages/quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:254 *** @@ -403,7 +302,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:250 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:275 +packages/quickjs-ffi-types/dist/index.d.ts:279 *** @@ -447,7 +346,7 @@ Often `''` (empty string) #### Source -packages/quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:246 *** @@ -471,7 +370,7 @@ Called by emscripten as dependencies blocking initialization are added or fulfil #### Source -packages/quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:256 *** @@ -500,7 +399,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:269 +packages/quickjs-ffi-types/dist/index.d.ts:273 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSFFI.md b/doc/quickjs-emscripten/interfaces/QuickJSFFI.md index 0239d3df..ffaa9595 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSFFI.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSFFI.md @@ -96,7 +96,7 @@ Set at compile time. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:346 +packages/quickjs-ffi-types/dist/index.d.ts:342 *** @@ -116,7 +116,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:346 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:406 +packages/quickjs-ffi-types/dist/index.d.ts:402 *** @@ -130,7 +130,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:406 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:404 +packages/quickjs-ffi-types/dist/index.d.ts:400 *** @@ -144,7 +144,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:404 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:403 +packages/quickjs-ffi-types/dist/index.d.ts:399 *** @@ -158,7 +158,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:403 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:353 +packages/quickjs-ffi-types/dist/index.d.ts:349 *** @@ -184,7 +184,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:353 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:388 +packages/quickjs-ffi-types/dist/index.d.ts:384 *** @@ -218,7 +218,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:388 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:386 +packages/quickjs-ffi-types/dist/index.d.ts:382 *** @@ -238,7 +238,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:386 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:390 +packages/quickjs-ffi-types/dist/index.d.ts:386 *** @@ -258,7 +258,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:390 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:367 +packages/quickjs-ffi-types/dist/index.d.ts:363 *** @@ -286,7 +286,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:367 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:391 +packages/quickjs-ffi-types/dist/index.d.ts:387 *** @@ -308,7 +308,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:391 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:382 +packages/quickjs-ffi-types/dist/index.d.ts:378 *** @@ -328,7 +328,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:382 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:366 +packages/quickjs-ffi-types/dist/index.d.ts:362 *** @@ -346,7 +346,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:366 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:362 +packages/quickjs-ffi-types/dist/index.d.ts:358 *** @@ -364,7 +364,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:362 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:360 +packages/quickjs-ffi-types/dist/index.d.ts:356 *** @@ -384,7 +384,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:360 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:363 +packages/quickjs-ffi-types/dist/index.d.ts:359 *** @@ -404,7 +404,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:363 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:364 +packages/quickjs-ffi-types/dist/index.d.ts:360 *** @@ -424,7 +424,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:364 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:365 +packages/quickjs-ffi-types/dist/index.d.ts:361 *** @@ -444,7 +444,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:365 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:376 +packages/quickjs-ffi-types/dist/index.d.ts:372 *** @@ -464,7 +464,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:376 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:377 +packages/quickjs-ffi-types/dist/index.d.ts:373 *** @@ -482,7 +482,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:377 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:401 +packages/quickjs-ffi-types/dist/index.d.ts:397 *** @@ -496,7 +496,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:401 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:357 +packages/quickjs-ffi-types/dist/index.d.ts:353 *** @@ -516,7 +516,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:357 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:373 +packages/quickjs-ffi-types/dist/index.d.ts:369 *** @@ -534,7 +534,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:373 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:396 +packages/quickjs-ffi-types/dist/index.d.ts:392 *** @@ -556,7 +556,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:396 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:394 +packages/quickjs-ffi-types/dist/index.d.ts:390 *** @@ -576,7 +576,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:394 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:392 +packages/quickjs-ffi-types/dist/index.d.ts:388 *** @@ -590,7 +590,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:392 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:356 +packages/quickjs-ffi-types/dist/index.d.ts:352 *** @@ -616,7 +616,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:356 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:387 +packages/quickjs-ffi-types/dist/index.d.ts:383 *** @@ -638,7 +638,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:387 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:383 +packages/quickjs-ffi-types/dist/index.d.ts:379 *** @@ -660,7 +660,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:383 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:384 +packages/quickjs-ffi-types/dist/index.d.ts:380 *** @@ -680,7 +680,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:384 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:375 +packages/quickjs-ffi-types/dist/index.d.ts:371 *** @@ -700,7 +700,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:375 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:379 +packages/quickjs-ffi-types/dist/index.d.ts:375 *** @@ -714,7 +714,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:379 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:358 +packages/quickjs-ffi-types/dist/index.d.ts:354 *** @@ -728,7 +728,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:358 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:355 +packages/quickjs-ffi-types/dist/index.d.ts:351 *** @@ -752,7 +752,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:355 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:395 +packages/quickjs-ffi-types/dist/index.d.ts:391 *** @@ -772,7 +772,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:395 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:380 +packages/quickjs-ffi-types/dist/index.d.ts:376 *** @@ -790,7 +790,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:380 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:381 +packages/quickjs-ffi-types/dist/index.d.ts:377 *** @@ -808,7 +808,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:381 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:370 +packages/quickjs-ffi-types/dist/index.d.ts:366 *** @@ -830,7 +830,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:370 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:371 +packages/quickjs-ffi-types/dist/index.d.ts:367 *** @@ -850,7 +850,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:371 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:361 +packages/quickjs-ffi-types/dist/index.d.ts:357 *** @@ -868,7 +868,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:361 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:348 +packages/quickjs-ffi-types/dist/index.d.ts:344 *** @@ -888,7 +888,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:348 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:372 +packages/quickjs-ffi-types/dist/index.d.ts:368 *** @@ -910,7 +910,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:372 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:405 +packages/quickjs-ffi-types/dist/index.d.ts:401 *** @@ -928,7 +928,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:405 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:368 +packages/quickjs-ffi-types/dist/index.d.ts:364 *** @@ -948,7 +948,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:368 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:369 +packages/quickjs-ffi-types/dist/index.d.ts:365 *** @@ -968,7 +968,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:369 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:397 +packages/quickjs-ffi-types/dist/index.d.ts:393 *** @@ -982,7 +982,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:397 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:359 +packages/quickjs-ffi-types/dist/index.d.ts:355 *** @@ -1002,7 +1002,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:359 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:374 +packages/quickjs-ffi-types/dist/index.d.ts:370 *** @@ -1024,7 +1024,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:374 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:378 +packages/quickjs-ffi-types/dist/index.d.ts:374 *** @@ -1044,7 +1044,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:378 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:399 +packages/quickjs-ffi-types/dist/index.d.ts:395 *** @@ -1064,7 +1064,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:399 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:398 +packages/quickjs-ffi-types/dist/index.d.ts:394 *** @@ -1078,7 +1078,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:398 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:352 +packages/quickjs-ffi-types/dist/index.d.ts:348 *** @@ -1098,27 +1098,25 @@ packages/quickjs-ffi-types/dist/index.d.ts:352 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:389 +packages/quickjs-ffi-types/dist/index.d.ts:385 *** ### QTS\_RuntimeComputeMemoryUsage -> **QTS\_RuntimeComputeMemoryUsage**: (`rt`, `ctx`) => [`JSValuePointer`](../exports.md#jsvaluepointer) +> **QTS\_RuntimeComputeMemoryUsage**: (`rt`) => `JSMemoryUsagePointer` #### Parameters • **rt**: [`JSRuntimePointer`](../exports.md#jsruntimepointer) -• **ctx**: [`JSContextPointer`](../exports.md#jscontextpointer) - #### Returns -[`JSValuePointer`](../exports.md#jsvaluepointer) +`JSMemoryUsagePointer` #### Source -packages/quickjs-ffi-types/dist/index.d.ts:350 +packages/quickjs-ffi-types/dist/index.d.ts:346 *** @@ -1136,7 +1134,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:350 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:408 +packages/quickjs-ffi-types/dist/index.d.ts:404 *** @@ -1154,7 +1152,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:408 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:410 +packages/quickjs-ffi-types/dist/index.d.ts:406 *** @@ -1172,7 +1170,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:410 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:351 +packages/quickjs-ffi-types/dist/index.d.ts:347 *** @@ -1190,7 +1188,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:351 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:407 +packages/quickjs-ffi-types/dist/index.d.ts:403 *** @@ -1210,7 +1208,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:407 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:409 +packages/quickjs-ffi-types/dist/index.d.ts:405 *** @@ -1230,7 +1228,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:409 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:354 +packages/quickjs-ffi-types/dist/index.d.ts:350 *** @@ -1250,7 +1248,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:354 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:349 +packages/quickjs-ffi-types/dist/index.d.ts:345 *** @@ -1270,7 +1268,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:349 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:402 +packages/quickjs-ffi-types/dist/index.d.ts:398 *** @@ -1294,7 +1292,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:402 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:385 +packages/quickjs-ffi-types/dist/index.d.ts:381 *** @@ -1312,7 +1310,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:385 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:400 +packages/quickjs-ffi-types/dist/index.d.ts:396 *** @@ -1332,7 +1330,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:400 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:347 +packages/quickjs-ffi-types/dist/index.d.ts:343 *** @@ -1352,7 +1350,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:347 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:393 +packages/quickjs-ffi-types/dist/index.d.ts:389 *** @@ -1372,7 +1370,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:393 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:412 +packages/quickjs-ffi-types/dist/index.d.ts:408 *** @@ -1392,7 +1390,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:412 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:411 +packages/quickjs-ffi-types/dist/index.d.ts:407 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md b/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md index 5f0cc956..5e7e1222 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md @@ -36,7 +36,7 @@ build variant to [newQuickJSWASMModule](../exports.md#newquickjswasmmodule) or [ #### Source -packages/quickjs-ffi-types/dist/index.d.ts:520 +packages/quickjs-ffi-types/dist/index.d.ts:516 *** @@ -50,7 +50,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:520 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:521 +packages/quickjs-ffi-types/dist/index.d.ts:517 *** @@ -60,7 +60,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:521 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:519 +packages/quickjs-ffi-types/dist/index.d.ts:515 *** diff --git a/doc/quickjs-emscripten/interfaces/SourceMapData.md b/doc/quickjs-emscripten/interfaces/SourceMapData.md index f4318f17..a8e914fd 100644 --- a/doc/quickjs-emscripten/interfaces/SourceMapData.md +++ b/doc/quickjs-emscripten/interfaces/SourceMapData.md @@ -22,7 +22,7 @@ #### Source -packages/quickjs-ffi-types/dist/index.d.ts:205 +packages/quickjs-ffi-types/dist/index.d.ts:209 *** @@ -32,7 +32,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:205 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:204 +packages/quickjs-ffi-types/dist/index.d.ts:208 *** @@ -42,7 +42,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:204 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:203 +packages/quickjs-ffi-types/dist/index.d.ts:207 *** @@ -52,7 +52,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:203 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:202 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/exportedRuntimeMethods.json b/exportedRuntimeMethods.json index f63d9e95..f15ff30d 100644 --- a/exportedRuntimeMethods.json +++ b/exportedRuntimeMethods.json @@ -1,4 +1,5 @@ [ + "HEAPU8", "cwrap", "stringToUTF8", "lengthBytesUTF8", diff --git a/packages/quickjs-emscripten-core/src/context.ts b/packages/quickjs-emscripten-core/src/context.ts index d2a19bdb..b81987a3 100644 --- a/packages/quickjs-emscripten-core/src/context.ts +++ b/packages/quickjs-emscripten-core/src/context.ts @@ -933,7 +933,7 @@ export class QuickJSContext } const len = this.uint32Out.value.typedArray[0] const ptr = outPtr.value.typedArray[0] - const pointerArray = new Uint32Array(this.module.HEAP8.buffer, ptr, len) + const pointerArray = new Uint32Array(this.module.HEAPU8.buffer, ptr, len) const handles = Array.from(pointerArray).map((ptr) => this.memory.heapValueHandle(ptr as JSValuePointer), ) diff --git a/packages/quickjs-emscripten-core/src/runtime.ts b/packages/quickjs-emscripten-core/src/runtime.ts index 0578cc7b..61494877 100644 --- a/packages/quickjs-emscripten-core/src/runtime.ts +++ b/packages/quickjs-emscripten-core/src/runtime.ts @@ -304,10 +304,10 @@ export class QuickJSRuntime extends UsingDisposable implements Disposable { } let offset = 0 - const getNextInt64 = () => { + const getNextInt64 = (): number => { const value = this.module.getValue(ptr + offset, "i64") offset += 8 - return value + return Number(value) } const usage: JSMemoryUsage = { malloc_size: getNextInt64(), diff --git a/packages/quickjs-emscripten/src/quickjs.test.ts b/packages/quickjs-emscripten/src/quickjs.test.ts index f9fc2336..719553c8 100644 --- a/packages/quickjs-emscripten/src/quickjs.test.ts +++ b/packages/quickjs-emscripten/src/quickjs.test.ts @@ -92,6 +92,8 @@ function contextTests(getContext: GetTestContext, isDebug = false) { } }) + it.only = baseIt.only + beforeEach(async () => { testId++ thisTestFailed = false @@ -903,9 +905,7 @@ export default "the default"; describe(".computeMemoryUsage", () => { it("returns an object with JSON memory usage info", () => { - const result = vm.runtime.computeMemoryUsage() - const resultObj = vm.dump(result) - result.dispose() + const resultObj = vm.runtime.computeMemoryUsage() const example = { array_count: 1, @@ -937,6 +937,13 @@ export default "the default"; assert.deepEqual(Object.keys(resultObj).sort(), Object.keys(example).sort()) }) + + it.only("matches the dump output", () => { + const memoryUsageString = vm.runtime.dumpMemoryUsage() + const memoryUsageObject = vm.runtime.computeMemoryUsage() + console.log(memoryUsageString) + console.log(memoryUsageObject) + }) }) describe(".setMemoryLimit", () => { diff --git a/packages/quickjs-ffi-types/src/emscripten-types.ts b/packages/quickjs-ffi-types/src/emscripten-types.ts index ebc33195..6bc14b1a 100644 --- a/packages/quickjs-ffi-types/src/emscripten-types.ts +++ b/packages/quickjs-ffi-types/src/emscripten-types.ts @@ -152,21 +152,22 @@ export interface EmscriptenModule extends EmscriptenModuleLoaderOptions { argTypes: Emscripten.ValueType[], opts?: Emscripten.CCallOpts, ): (...args: any[]) => any - getValue(ptr: number, type: "i8" | "i16" | "i32" | "i64" | "float" | "double"): number + getValue(ptr: number, type: "i8" | "i16" | "i32" | "float" | "double"): number + getValue(ptr: number, type: "i64"): bigint // USE_TYPED_ARRAYS == 2 - HEAP8: Int8Array - HEAP16: Int16Array - HEAP32: Int32Array + // HEAP8: Int8Array + // HEAP16: Int16Array + // HEAP32: Int32Array HEAPU8: Uint8Array - HEAPU16: Uint16Array - HEAPU32: Uint32Array - HEAPF32: Float32Array - HEAPF64: Float64Array - - TOTAL_STACK: number - TOTAL_MEMORY: number - FAST_MEMORY: number + // HEAPU16: Uint16Array + // HEAPU32: Uint32Array + // HEAPF32: Float32Array + // HEAPF64: Float64Array + + // TOTAL_STACK: number + // TOTAL_MEMORY: number + // FAST_MEMORY: number } // This isn't the real return type of handleAsync, but it's better to treat it this way. diff --git a/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile b/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile index 8b0076b0..61e605f0 100644 --- a/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile index 8c2b2a38..22183827 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -88,6 +89,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-O3 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md index 5a194c53..cf9cf8a9 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md @@ -88,6 +88,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile index 8eab16ee..a34f62ed 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -81,6 +82,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md b/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md index c3e762f9..e6f7b3d3 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md @@ -81,6 +81,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile index 66dc3f74..32316da6 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -85,6 +86,7 @@ CFLAGS_WASM+=--closure 1 CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md b/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md index 6624c67a..771ae9f1 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md @@ -84,6 +84,7 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile index ce4a8ce7..3143f6ba 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -78,6 +79,7 @@ CFLAGS_WASM+=--closure 1 CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/README.md b/packages/variant-quickjs-ng-wasmfile-release-sync/README.md index cb980f8b..28005465 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/README.md +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/README.md @@ -77,6 +77,7 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile index 84953e75..b569a692 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -89,6 +90,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-O3 diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md index 38304e33..1e882ddf 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md @@ -77,6 +77,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile index 199a275a..db8eafea 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -82,6 +83,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/README.md b/packages/variant-quickjs-singlefile-browser-debug-sync/README.md index 47cabbbc..d939e9fa 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/README.md @@ -70,6 +70,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile index fbb8c343..adde3f41 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -86,6 +87,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/README.md b/packages/variant-quickjs-singlefile-browser-release-asyncify/README.md index 18e25022..f0f48512 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/README.md @@ -73,6 +73,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile index 1b881b01..4b1401a4 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -79,6 +80,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/README.md b/packages/variant-quickjs-singlefile-browser-release-sync/README.md index 1c708546..bdfb3939 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/README.md +++ b/packages/variant-quickjs-singlefile-browser-release-sync/README.md @@ -66,6 +66,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile index e9f520c1..ab4e6bd0 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -89,6 +90,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-O3 CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md index b99a07f5..e8931d85 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md @@ -77,6 +77,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile index 1f65e61b..87d7a09e 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -82,6 +83,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md b/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md index ffc735a7..b522f6f8 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md @@ -70,6 +70,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile index a9566b72..6360cc13 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -86,6 +87,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/README.md b/packages/variant-quickjs-singlefile-cjs-release-asyncify/README.md index 532103c9..156f9c2f 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/README.md @@ -73,6 +73,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile index 29392d85..4e59e428 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -79,6 +80,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/README.md b/packages/variant-quickjs-singlefile-cjs-release-sync/README.md index e85c6210..b891ce45 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/README.md +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/README.md @@ -66,6 +66,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile index 9c0abf44..8069c945 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -89,6 +90,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-O3 CFLAGS_MJS+=-s ENVIRONMENT=node diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md index 5d8e35e2..e15e8ee5 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md @@ -77,6 +77,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile index 855979a5..ace60b78 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -82,6 +83,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md b/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md index a8380376..c5518bd6 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md @@ -70,6 +70,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile index 4e1b8a1a..f7617391 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -86,6 +87,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_MJS+=-s ENVIRONMENT=node diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/README.md b/packages/variant-quickjs-singlefile-mjs-release-asyncify/README.md index d6b327d4..f49fe65e 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/README.md @@ -73,6 +73,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile index dac0b9c3..b257fdd1 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -79,6 +80,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js CFLAGS_WASM+=-s SINGLE_FILE=1 +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_MJS+=-s ENVIRONMENT=node diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/README.md b/packages/variant-quickjs-singlefile-mjs-release-sync/README.md index 1a1801c2..ad6426e8 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/README.md +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/README.md @@ -66,6 +66,7 @@ Variant-specific Emscripten build flags: "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s SINGLE_FILE=1" + "-s SINGLE_FILE=1", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile index f0f6d634..4534d195 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -88,6 +89,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-O3 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/README.md b/packages/variant-quickjs-wasmfile-debug-asyncify/README.md index 2a559f55..a7cbb01e 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/README.md +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/README.md @@ -88,6 +88,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-O3" ] ``` diff --git a/packages/variant-quickjs-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-wasmfile-debug-sync/Makefile index 10075fa1..fa98a3b2 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -81,6 +82,7 @@ CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 diff --git a/packages/variant-quickjs-wasmfile-debug-sync/README.md b/packages/variant-quickjs-wasmfile-debug-sync/README.md index 57a672a7..29dc1c6b 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/README.md +++ b/packages/variant-quickjs-wasmfile-debug-sync/README.md @@ -81,6 +81,7 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile index 467cbe41..b318ded1 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -85,6 +86,7 @@ CFLAGS_WASM+=--closure 1 CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/README.md b/packages/variant-quickjs-wasmfile-release-asyncify/README.md index 0f41e6cf..08362331 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/README.md +++ b/packages/variant-quickjs-wasmfile-release-asyncify/README.md @@ -84,6 +84,7 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/packages/variant-quickjs-wasmfile-release-sync/Makefile b/packages/variant-quickjs-wasmfile-release-sync/Makefile index 8b19b6aa..5175b553 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-release-sync/Makefile @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 @@ -78,6 +79,7 @@ CFLAGS_WASM+=--closure 1 CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmMemory.js +CFLAGS_WASM+=-s WASM_BIGINT=1 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker diff --git a/packages/variant-quickjs-wasmfile-release-sync/README.md b/packages/variant-quickjs-wasmfile-release-sync/README.md index a95a36fb..b606b568 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/README.md +++ b/packages/variant-quickjs-wasmfile-release-sync/README.md @@ -77,6 +77,7 @@ Variant-specific Emscripten build flags: "--closure 1", "-s FILESYSTEM=0", "--pre-js $(TEMPLATES)/pre-extension.js", - "--pre-js $(TEMPLATES)/pre-wasmMemory.js" + "--pre-js $(TEMPLATES)/pre-wasmMemory.js", + "-s WASM_BIGINT=1" ] ``` diff --git a/scripts/prepareVariants.ts b/scripts/prepareVariants.ts index f29040b1..ab6abc7b 100755 --- a/scripts/prepareVariants.ts +++ b/scripts/prepareVariants.ts @@ -219,9 +219,10 @@ const ReleaseModeFlags = { ], } +const WASM_ONLY_FLAGS = [`-s WASM_BIGINT=1`] const EmscriptenInclusionFlags = { - [EmscriptenInclusion.Separate]: [], - [EmscriptenInclusion.SingleFile]: [`-s SINGLE_FILE=1`], + [EmscriptenInclusion.Separate]: WASM_ONLY_FLAGS, + [EmscriptenInclusion.SingleFile]: [`-s SINGLE_FILE=1`, ...WASM_ONLY_FLAGS], [EmscriptenInclusion.AsmJs]: [`-s WASM=0`, `-s SINGLE_FILE=1`], } diff --git a/templates/Variant.mk b/templates/Variant.mk index fd4711d3..ac614eb4 100644 --- a/templates/Variant.mk +++ b/templates/Variant.mk @@ -27,7 +27,7 @@ ifeq ($(QUICKJS_LIB),quickjs-ng) CFLAGS_WASM+=-DQTS_USE_QUICKJS_NG else QUICKJS_CONFIG_VERSION=$(shell cat $(QUICKJS_ROOT)/VERSION) - QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM + QUICKJS_DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(QUICKJS_CONFIG_VERSION)\" -DCONFIG_STACK_CHECK -DCONFIG_BIGNUM -D__linux__ CFLAGS_WASM+=-DCONFIG_BIGNUM endif VARIANT_QUICKJS_OBJS=$(patsubst %.o, $(BUILD_QUICKJS)/%.o, $(QUICKJS_OBJS)) @@ -52,13 +52,14 @@ CFLAGS_WASM+=-s SUPPORT_ERRNO=0 # Emscripten options - like STRICT # https://github.com/emscripten-core/emscripten/blob/fa339b76424ca9fbe5cf15faea0295d2ac8d58cc/src/settings.js#L1095-L1109 # CFLAGS_WASM+=-s STRICT_JS=1 # Doesn't work with MODULARIZE +CFLAGS_WASM+=-s STRICT=1 CFLAGS_WASM+=-s IGNORE_MISSING_MAIN=0 --no-entry CFLAGS_WASM+=-s AUTO_JS_LIBRARIES=0 CFLAGS_WASM+=-s -lccall.js -CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 -CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 -CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 -CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 +# CFLAGS_WASM+=-s AUTO_NATIVE_LIBRARIES=0 +# CFLAGS_WASM+=-s AUTO_ARCHIVE_INDEXES=0 +# CFLAGS_WASM+=-s DEFAULT_TO_CXX=0 +# CFLAGS_WASM+=-s ALLOW_UNIMPLEMENTED_SYSCALLS=0 # Emscripten options - NodeJS CFLAGS_WASM+=-s MIN_NODE_VERSION=160000 From 13458bcbe032d05064d71533f98986ce47da73b5 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Sat, 14 Sep 2024 16:57:21 -0700 Subject: [PATCH 4/4] remove getSystemContext (unused) --- packages/quickjs-emscripten-core/src/runtime.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/quickjs-emscripten-core/src/runtime.ts b/packages/quickjs-emscripten-core/src/runtime.ts index 61494877..724b8baf 100644 --- a/packages/quickjs-emscripten-core/src/runtime.ts +++ b/packages/quickjs-emscripten-core/src/runtime.ts @@ -79,7 +79,6 @@ export class QuickJSRuntime extends UsingDisposable implements Disposable { * associated with the runtime. * * If this runtime was created stand-alone, this may or may not contain a context. - * A context here may be allocated if one is needed by the runtime, eg for {@link computeMemoryUsage}. */ public context: QuickJSContext | undefined @@ -416,14 +415,6 @@ export class QuickJSRuntime extends UsingDisposable implements Disposable { return `${this.constructor.name} { rt: ${this.rt.value} }` } - private getSystemContext() { - if (!this.context) { - // We own this context and should dispose of it. - this.context = this.scope.manage(this.newContext()) - } - return this.context - } - private cToHostCallbacks: RuntimeCallbacks = { shouldInterrupt: (rt) => { if (rt !== this.rt.value) {