wizer
wizer copied to clipboard
Wizer and Emscripten
Hi all,
Not sure whether Wizer is supposed to work with Emscripten. I tried compiling the following c++ code with emcc
#include <iostream>
#include <wizer.h>
#include <emscripten.h>
WIZER_DEFAULT_INIT();
EMSCRIPTEN_KEEPALIVE int SayHello() {
std::cout << "Hello World!";
return 0;
}
I got some compiling errors.
All the Wizer and C++ testing we've done so far has been with wasi-sdk and main functions. We haven't done anything with Emscripten or without a main function.
In principle, it should work, but may require a different header to include or tweaks to the existing header, since the existing header bakes in some knowledge of the wasi-sdk libc. We will probably need to do equivalent-but-Emscripten-specific things for Emscripten's libc.
cc @sunfishcode, who knows a bit more about Emscripten than I do.
All I know right now is that Emscripten changed how its main function works since I last looked at it.