mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 12:07:27 +00:00
remove unnecesary file
This commit is contained in:
parent
c76acc242d
commit
6d5722ba35
@ -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 <stdint.h>
|
|
||||||
|
|
||||||
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;
|
|
Loading…
x
Reference in New Issue
Block a user