Used __builtin_wasm_memory_size(0) instead of having the Javascript code call init_mem with the initial page count. Added a simple <div> below the canvas that can hold any number of labels that can be filled/updated through jsSetLabel which lives in a new file misc_functions.js.

This commit is contained in:
2025-09-02 16:05:53 -07:00
parent f45c2d88e0
commit 04028b29d3
10 changed files with 117 additions and 30 deletions

12
cwasm_misc_js_imports.h Normal file
View File

@@ -0,0 +1,12 @@
/*
File: cwasm_misc_js_imports.h
Author: Taylor Robbins
Date: 09\02\2025
*/
#ifndef _CWASM_MISC_JS_IMPORTS_H
#define _CWASM_MISC_JS_IMPORTS_H
MAYBE_EXTERN_C void jsSetLabel(const char* labelIdStr, const char* labelStr);
#endif // _CWASM_MISC_JS_IMPORTS_H