znichola / unnamed

Apache License 2.0
0 stars 0 forks source link

emscripten exporting to WEB #4

Open znichola opened 3 weeks ago

znichola commented 3 weeks ago

This is not easy, and there are many places it can go wrong, also visibility into any problems is crap. I will try document fixes as they come up


⚠️ Uncaught RuntimeError: memory access out of bounds

After removing all of my code and iteratively checking, I found it was related to allocators. Removing them fixes the issue, obviously this can't be a longterm solution. Apparently, it's possible to pass a flag -s USE_OFFSET_CONVERTER to emscripten but i could not get this to work.

Go it to work, should be using the c_allocator, should probably dig father, as it's a shame to missout on the other cool allocators possible.

https://github.com/ziglang/zig/issues/10836

znichola commented 2 weeks ago

Links to some maybe useful information https://github.com/zighelp/zighelp/issues/13