inkyblackness/imgui-go

Compile for WASM?

Closed this issue · 5 comments

Yo, reffering to AllenDang/giu#431
have you ever tought about compiling this wisth GOOS=js GOARCH=wasm?

flyover's implementation of ImGUI+WebGL might be of use here -> https://github.com/flyover/imgui-js/tree/master/example/src

Hi @gucio321 , thank you for the question.

I haven't tried this compilation variant. It would be curious if cgo would be invoked together for this target.
If that works, I doubt there would be an issue since imgui itself is unrelated to both the platform and the renderer.

I am a little short on time to try this out; It would be a fun additon to imgui-go-examples, which is also a good candidate to start with as it already separates renderer and platform dependencies.
Would you be able to try this out? It seems you have more experience with wasm.

@dertseha sadly, I'm not much familiar with C/cgo so idk if I'll be able to solve this problem. But, sure, if I get some time, I can play with that.

All good. If someone is willing to jump in, please go ahead. Adding the "help wanted" label.

I doubt any movement will happen for this wrapper.
However, consider looking at https://github.com/AllenDang/cimgui-go instead. That project has a brighter future.
Closing this one down.