Andre Weissflog eed75175c0 Merge pull request #1111 from floooh/issue1037_bindings_cleanup 1 rok temu
..
.gitignore ae235293fc Add Jai bindgen 1 rok temu
README.md f146fc11dd Add line to README so gen_all.py works with Jai 1 rok temu
gen_all.py df71cc24cb sokol-d bindings: sokol_imgui.h wasn't actually included in the bindings generation 1 rok temu
gen_d.py e7d5229bff cleanup bindings generation scripts 1 rok temu
gen_ir.py 818d12e997 bindings generation: dump intermediate JSON for easier debugging 3 lat temu
gen_jai.py 89501ecea3 Add back sg_trace_hooks & sg_install_trace_hooks, not sure why those were ignored 1 rok temu
gen_nim.py 62b6c44edb update emscripten webgl link flags 1 rok temu
gen_odin.py 1c34132674 Fixed an indentation. 1 rok temu
gen_rust.py e7d5229bff cleanup bindings generation scripts 1 rok temu
gen_util.py 471f125e0a Fix language bindings: 3 lat temu
gen_zig.py e7d5229bff cleanup bindings generation scripts 1 rok temu

README.md

Language Binding Generation Scripts

REMINDER: we can pass -fparse-all-comments to the clang ast-dump command line which adds the following node types to the ast-dump.json: FullComment, ParagraphComment, TextComment. This might allow us to preserve comments in the language bindings (might be useful as part of a bigger change to make sokol header comments autodoc and Intellisense-friendly)

Updating the bindings

First make sure that clang and python3 are in the path:

> clang --version
> python3 --version

...on Windows I simply install those with scoop:

> scoop install llvm
> scoop install python

To update the Zig bindings:

> cd sokol/bindgen
> git clone https://github.com/floooh/sokol-zig
> git clone https://github.com/floooh/sokol-nim
> git clone https://github.com/floooh/sokol-odin
> git clone https://github.com/floooh/sokol-rust
> git clone https://github.com/floooh/sokol-d
> git clone https://github.com/colinbellino/sokol-jai
> python3 gen_all.py

...and then to test and run Zig samples:

> cd sokol/bindgen/sokol-zig
> zig build run-clear
> zig build run-triangle
> zig build run-cube
...