add emscripten WASM support; this PR #822 written by Alon Zakai @kripken

This commit is contained in:
Daan 2024-03-02 15:00:31 -08:00
parent bccf10e164
commit d21f60f712
2 changed files with 254 additions and 0 deletions

View file

@ -18,6 +18,9 @@ terms of the MIT license. A copy of the license can be found in the file
#define MI_USE_SBRK
#include "wasi/prim.c" // memory-grow or sbrk (Wasm)
#elif defined(__EMSCRIPTEN__)
#include "emscripten/prim.c" // emmalloc_*, + pthread support
#else
#include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.)