Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 6.0.8 (aeb6792)
clang version 24.0.0git (https:/github.com/llvm/llvm-project 4bfd08c2d769736841ae4f5705d76fa6daa39027)
Target: wasm32-unknown-emscripten
Thread model: posix
Minimal reproducer
#include <emscripten/wasmfs.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main(void) {
printf("creating OPFS backend\n");
backend_t opfs = wasmfs_create_opfs_backend();
if (!opfs) {
printf("FAIL: no OPFS backend\n");
return 1;
}
printf("mounting /opfs ...\n");
if (wasmfs_create_directory("/opfs", 0777, opfs) != 0) {
printf("FAIL: could not mount /opfs\n");
return 1;
}
printf("PASS\n");
return 0;
}
Build with
emcc minimal.c -o minimal.html -sWASMFS -pthread -sPROXY_TO_PTHREAD -sJSPI
Run with
emrun --browser chrome minimal.html
Expected
It should print PASS.
What actually happens
Javascript error in the console:
Uncaught (in promise) SuspendError: trying to suspend without WebAssembly.promising
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 6.0.8 (aeb6792)
clang version 24.0.0git (https:/github.com/llvm/llvm-project 4bfd08c2d769736841ae4f5705d76fa6daa39027)
Target: wasm32-unknown-emscripten
Thread model: posix
Minimal reproducer
Build with
emcc minimal.c -o minimal.html -sWASMFS -pthread -sPROXY_TO_PTHREAD -sJSPIRun with
emrun --browser chrome minimal.htmlExpected
It should print PASS.
What actually happens
Javascript error in the console: