Skip to content

build.zig: use external translate-c - #11

Merged
floooh merged 3 commits into
floooh:mainfrom
Anidetrix:main
Mar 10, 2026
Merged

build.zig: use external translate-c#11
floooh merged 3 commits into
floooh:mainfrom
Anidetrix:main

Conversation

@Anidetrix

@Anidetrix Anidetrix commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

fixes missing bindings on Windows (related issue), breaks 0.15.2 compatibility

@floooh

floooh commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Nice, I wasn't aware that translate-c has already been moved out (and that it actually has fixes already).

I'm not quite ready to drop 0.15 compatibility yet though, do you have time to fix the PR to decide between the new and old code path via a zig version check like I do here in sokol-zig/build.zig? (otherwise I can do that too but it will delay the merge):

https://github.com/floooh/sokol-zig/blob/de5906fb0f81f96e92c1c67a2b8a24dc50872207/build.zig#L480-L484

@Anidetrix

Anidetrix commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

Nice, I wasn't aware that translate-c has already been moved out (and that it actually has fixes already).

It, and underlying arocc, are periodically copy/pasted here and used for addTranslateC under the hood, but it falls a bit behind and either fixes aren't merged yet or something is wrong with the wrapper

do you have time to fix the PR to decide between the new and old code path via a zig version check like I do here in sokol-zig/build.zig

Working on it

@Anidetrix

Anidetrix commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

Done, works for both 0.15.2 and 0.16.0-dev on my Windows machine now. I guess at some point we can either go full external translate-c or go back to bundled one once it's fixed.

@floooh

floooh commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Ok thanks! Before merging I'll also give it a whirl on my Mac.

I guess at some point we can either go full external translate-c...

I would probably go "external translateC" (more future-proof I guess?), and we can also drop the 0.15.x backward compatibility code very soon after 0.16 is released - e.g. a few weeks later)

@floooh

floooh commented Mar 10, 2026

Copy link
Copy Markdown
Owner

...ok also working fine on Mac with current 0.16-dev and 0.15.2. Merging...

@floooh
floooh merged commit f2b1a9b into floooh:main Mar 10, 2026
3 checks passed
@floooh

floooh commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Ok merged. I did one minor 'naming-fix' though :)

f920437

Thanks for the PR!

@floooh

floooh commented Mar 10, 2026

Copy link
Copy Markdown
Owner

...also updated the deps in https://github.com/floooh/sokol-zig-imgui-sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants