mirror of
https://github.com/hanzoai/quickjs-emscripten.git
synced 2026-10-30 19:37:29 +00:00
* improve error unwrapping fidelity * add purejs variant * call it asmjs * regen * add test * yarn lock * regen doc * bring over bun example * implement enough fs stuff to get example to run * quickjs-for-quickjs * progress * fix package name * regen * d.mts * prettier * changelog * maybe we messed up stack size? * fix stack size * turn off ttylog * lint * update changelog * bump version * upgrade emscripten * regen makefile
11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
import { getQuickJS } from "quickjs-emscripten"
|
|
async function main() {
|
|
const QuickJS = await getQuickJS()
|
|
console.log(QuickJS.evalCode('"QuickJS.evalCode successful"'))
|
|
|
|
const vm = QuickJS.newContext()
|
|
const memoryUsage = vm.runtime.dumpMemoryUsage()
|
|
console.log("Empty VM memory usage:", memoryUsage)
|
|
}
|
|
main()
|