This commit is contained in:
Scott Richmond 2024-07-21 20:00:34 -04:00
parent 121446c5c4
commit 4ca1da1240
4 changed files with 16 additions and 4 deletions

Binary file not shown.

View File

@ -2,8 +2,20 @@ import init from "./out.mjs"
const mod = await init() const mod = await init()
let result = null
export function run (source) { export function run (source) {
const result = mod.ludus(source).value const output = mod.ludus(source).value
console.log(result) console.log(output)
return JSON.parse(result) result = JSON.parse(output)
return result
} }
export function stdout () {
return result.io.console.data
}
export function turtle_commands () {
return result.io.turtle.data
}

View File

@ -6489,7 +6489,7 @@ var __emscripten_stack_alloc = (a0) => (__emscripten_stack_alloc = wasmExports['
var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])(); var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
var ___cxa_is_pointer_type = createExportWrapper('__cxa_is_pointer_type', 1); var ___cxa_is_pointer_type = createExportWrapper('__cxa_is_pointer_type', 1);
var dynCall_jiji = Module['dynCall_jiji'] = createExportWrapper('dynCall_jiji', 5); var dynCall_jiji = Module['dynCall_jiji'] = createExportWrapper('dynCall_jiji', 5);
var ___emscripten_embedded_file_data = Module['___emscripten_embedded_file_data'] = 1840592; var ___emscripten_embedded_file_data = Module['___emscripten_embedded_file_data'] = 1822420;
function invoke_i(index) { function invoke_i(index) {
var sp = stackSave(); var sp = stackSave();
try { try {

Binary file not shown.