Created
November 20, 2020 20:53
-
-
Save Potherca/89a4ce1f018c7d39a6fa0320673c8d57 to your computer and use it in GitHub Desktop.
hello3.c file from https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <emscripten/emscripten.h> | |
int main(int argc, char ** argv) { | |
printf("Hello World\n"); | |
} | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
void EMSCRIPTEN_KEEPALIVE myFunction(int argc, char ** argv) { | |
printf("MyFunction Called\n"); | |
} | |
#ifdef __cplusplus | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment