-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add support for C3 to bindgen #1148
base: master
Are you sure you want to change the base?
Conversation
Looks like there's a python error in gen_c3.py: |
060d8f6
to
a0ac7b3
Compare
Oh my, you're right, I somehow managed to use Python 3.12 feature which doesn't work in older Pythons (specifically using single quotes inside single-quoted f-string). |
a0ac7b3
to
b9e6e94
Compare
I have fixed CI (at least in my repo) by adding checkout of |
Oki, before merging C3 support, I'd like to get to a similar state as https://github.com/floooh/sokol-zig, e.g. a repository for the bindings, at least a handful examples ported, and an easy way to build the examples. Should I create a repo under floooh/sokol-c3, and you could populate that? |
Sounds great! Yes, please create the repo. |
Ok see: https://github.com/floooh/sokol-c3 I added you as collaborator so you can push directly (I think Github will send you an invite email). Later we should probably both work through PRs instead of committing directly to main. I also added your name to the LICENSE file. Once everything is setup I will add the code to the sokol CI pipeline to automatically update and push changes. |
b9e6e94
to
8e7dc3d
Compare
Hi @radekm what's the state of the PR, is it ready to merge or should I wait a bit more? There's a curious CI error in the sokol-c3 repo: https://github.com/floooh/sokol-c3/actions/runs/12096168226/job/33730154985 ...any ideas what this is about? If it is some sort of Mac-specific C3 compiler error or regression we can out-comment the Mac build from the CI build matrix for now (I've seen similar stuff in the past in other languages when ARM Macs were new-ish). |
@@ -66,6 +66,10 @@ jobs: | |||
with: | |||
repository: colinbellino/sokol-jai | |||
path: bindgen/sokol-jai | |||
- uses: actions/checkout@main | |||
with: | |||
repository: radekm/sokol-c3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed to floooh/sokol-c3.
And we also should have a build step test-c3
further down which depends on the gen-bindings
job. The test job should basically be a copy of the CI job in the sokol-c3 repo. It's just there to prevent pushing to sokol-c3 if test compilation fails.
(...I can take care of the final deploy-job, since this involves creating an SSH key and some Github shenanigans to allow pushing to the sokol-c3 repo)
@@ -28,6 +28,7 @@ To update the Zig bindings: | |||
> git clone https://github.com/floooh/sokol-rust | |||
> git clone https://github.com/floooh/sokol-d | |||
> git clone https://github.com/colinbellino/sokol-jai | |||
> git clone https://github.com/radekm/sokol-c3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
....also needs to be changed to floooh/sokol-c3
I thought bindgen support for C3 language could be useful, so I created this PR.
Unfortunately I haven't yet ported examples to C3 and have tested it only on macOS arm64.
Generated code can be browsed in my repository https://github.com/radekm/sokol-c3/