floooh / sokol-tools

Command line tools for use with sokol headers
MIT License
219 stars 54 forks source link

Add jai generator to shdc #137

Closed NEO97online closed 1 month ago

NEO97online commented 1 month ago

This PR adds a generator to output Jai code for shdc.

floooh commented 1 month ago

Thanks! Will be a bit hard to test for me because I'm not in the Jai Beta, but I trust it works :) (I'll just check if the CI runs through and locally if some output is generated, and then I'll merge later today).

How are the sokol headers accessed from Jai? Does it work good enough with a direct C import, or will it makes sense to add a bindings generator script too?

floooh commented 1 month ago

Ok merged. Thanks! I also added the new source file to build.zig, and added a little note to the changelog.

floooh commented 1 month ago

PS: new binaries will be available when this CI pipeline goes all green: https://github.com/floooh/sokol-tools/actions/runs/10248178377

floooh commented 1 month ago

PS: I missed this readme line, will change it to avoid confusion (since there are no sokol-jai bindings so far) :)

generates output for the sokol-jai bindings

NEO97online commented 1 month ago

How are the sokol headers accessed from Jai? Does it work good enough with a direct C import, or will it makes sense to add a bindings generator script too?

Jai has a built-in Bindings Generator, so I generated my own bindings for sokol_gfx using that. Currently its only generating for sokol_gfx and sokol_imgui, but it could support the rest too.

I'm in crunch mode for a deadline this month, afterwards I'd be happy to help with a public repo if you're interested in that.

Also, sending you an email regarding the beta, in case you're interested...