diff --git a/webbuildhack.c b/webbuildhack.c deleted file mode 100644 index f179218..0000000 --- a/webbuildhack.c +++ /dev/null @@ -1,28 +0,0 @@ -// Emscripten is completely unable to find Zig's entry point. -// Solution: create a C compatible entry point in zig, -// and then a C file that calls that entry point in the main method -// This is that C file. - -//The entry point found in the zig project -extern int web_emscripten_entry_point(); -//this is the method that emscripten calls automatically when the page loads -int main(int argc, char** argv) -{ - //TODO: possibly pass arguments into zig? - return web_emscripten_entry_point(); -} - -// For some reason zig adds '__stack_chk_guard', '__stack_chk_fail', and 'errno', -// which emscripten doesn't actually support. -// Seems that zig ignores disabling stack checking, -// and I honestly don't know why emscripten doesn't have errno. -// there's a solution, although it's not a good one... -#include - -uintptr_t __stack_chk_guard; - -//Yes, this means that if there is a buffer overflow, nobody is going to know about it. -// However, zig is pretty safe from those, so don't worry about it too much. -void __stack_chk_fail(void){} - -int errno;