gen2brain / raylib-go

Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
zlib License
1.6k stars 164 forks source link

WASM #356

Closed znaniye closed 8 months ago

znaniye commented 8 months ago

Are you still having the issue of not being able to compile to WASM/web with raylib-go?

gen2brain commented 8 months ago

There are no issues, it just is not possible to compile CGo to WASM, you need pure Go for that.

In theory, it should be possible to bundle raylib.wasm and to use wazero runtime to bind functions. That would be the third binding to maintain, besides cgo and purego. I recently tried a similar i.e. https://github.com/gen2brain/jpegxl, it is not pleasant to use and there are many functions here, and not even sure if all that would work. I don't have time to try it.