This commit is contained in:
peterino2 2026-01-26 01:54:12 -08:00
parent 19b392e9aa
commit 209f07df35
1 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,5 @@
Note: if you want actual headers you want to go here [](https://git.peterino.com/searzocom/sdl3bind)
Disclaimer: Disclaimer:
My employer saw fit to give me access to near unlimited claude sonnet tokens for home/personal use. so... that's their mistake I guess. My employer saw fit to give me access to near unlimited claude sonnet tokens for home/personal use. so... that's their mistake I guess.
@ -14,6 +16,7 @@ Parse sdl3 headers into zig interfaces or json objects. can also generate c mock
The zig code has gone through some manual fixups but only where there was actual errors. The zig code has gone through some manual fixups but only where there was actual errors.
# Overview # Overview
works on any header in the sdl3 library. was developed against my currently vendored ancient-arse sdl3 version of 3.2.10 works on any header in the sdl3 library. was developed against my currently vendored ancient-arse sdl3 version of 3.2.10
@ -28,10 +31,12 @@ if you're just interested in the generated outputs (I assume most are.)
zig build generate -Dref=<git ref> # ref is any git ref or branch or version zig build generate -Dref=<git ref> # ref is any git ref or branch or version
``` ```
By default this will fetch the sdl repo at "git@github.com:castholm/SDL.git" and attempt to generate the main APIs associated with it. By default this will fetch the sdl repo at `git@github.com:castholm/SDL.git` and attempt to generate the main APIs associated with it.
You can specify which repo to use with `-Dsdl-url=<repo-url>` the git refs will need to match up with that repo's tags and refs. You can specify which repo to use with `-Dsdl-url=<repo-url>` the git refs will need to match up with that repo's tags and refs.
`-Dofficial` will use libsdl org's github repo.
## Parser Usage ## Parser Usage
building the parser for standalone use or in your own scripts building the parser for standalone use or in your own scripts
@ -60,7 +65,7 @@ As such the code is simple to modify but brittle. However it does put the data i
The jsons and mocks may not be the most well tested. but i aim to daily drive the zig bindings. The jsons and mocks may not be the most well tested. but i aim to daily drive the zig bindings.
After each zig file is generated, it is written out to /tmp then `zig ast-check` is ran on it, if it passes this, then it is staged to the final location/filename you specified with --output. After each zig file is generated, it is written out to `./tmp` then `zig ast-check` is ran on it, if it passes this, then it is staged to the final location/filename you specified with --output.
I reccomend opening this with a zls-enabled code editor and work your way through the bugs. any bugs found on this against any version of sdl3 feel free to report it. I reccomend opening this with a zls-enabled code editor and work your way through the bugs. any bugs found on this against any version of sdl3 feel free to report it.