-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add support for C3 to bindgen #1148
Conversation
Looks like there's a python error in gen_c3.py: https://github.com/floooh/sokol/actions/runs/11796284494/job/32872697466?pr=1148#step:9:9 |
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). |
Hi, I think I’ll need a few more weeks. Before merging, I want to ensure that everything is in good shape and makes sense:
I’ll let you know as soon as it’s ready for merging. Thanks for your patience! |
Oki doki, then I'll move to something else in the meantime. I'll keep an eye on the Github notifications to check if there's something to review or merge. If I don't react just explicitly 'at' me :) |
8e7dc3d
to
be57b20
Compare
I wonder if it makes sense to wait with merging floooh/sokol-tools#158 until this PR is ready. Do you have a general ETA? :) |
be57b20
to
91e1e1a
Compare
I'll try to finalize everything during the next week. Till now I have been testing it in a small ImPlot visualization and it works like a charm. Today I have just updated everything and I would like to quickly retest it. |
No pressure ;) |
91e1e1a
to
80a1919
Compare
I've added the |
Oki doki, I'll try to do a thorough review, but it might be until next weekend before I can put the proper time into it. |
Starting to look into your C3 PRs now (the other smaller pending PRs took a bit longer than expected). I'm planning to use my M1 Mac for testing (at least a c3 hello-world works). |
Your samples in https://github.com/floooh/sokol-c3 all work nicely and out of the box :) (actually pretty cool that the C library compilation 'just works' - I guess via that manifest.json magic...) - I want to take my time reviewing the bindings and sokol-tools PR though, but I guess an ETA of tomorrow evening is realistic :) |
Ok, merged. Now I will add a deploy-c3 step into |
Ok, the first automatic commit to sokol-c3 :) I also updated the changelog (floooh/sokol-c3@ac48c0b), and updated the readme (sokol-c3 build badge and added link to https://github.com/floooh/sokol-c3 to the list of language bindings. Many thanks! :) Going forward I would suggest:
|
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/