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

View File

@@ -26,7 +26,6 @@ _Noreturn void abort_msg(const char* message);
// void* aligned_alloc(size_t numBytes, size_t alignmentSize);
//These are our own std-like functions for interacting with WebAssembly memory
WASM_EXPORT(init_mem) void init_mem(size_t numInitialPages);
void* grow_mem(size_t numBytes);
size_t get_mem();