Starting zig 0.16, zig translate-c is now backed by translate-c project which uses arocc as the c compiler.
It is already advertised that one can depend on the translate-c repository directly to benefit from more translation options.
Since translate-c will soon become a mandatory build-step, we should already express a dependency on translate-c and arocc , and orchestrate the translation from those binaries built from source (or at least offer the option).
This would allow users to benefit from said additional options and overall increased flexibility rather than waiting for newer releases of zig to benefit from translate-c improvements.
For this, I'm not entirely sure of the full API just yet for rules_zig but I was thinking that we could have:
- A build setting to use a
translate-c binary built from source
- A configuration knob at the toolchain level to allow users to control the source of the translate-c repository OR provide
translate-c targets directly.
I already have something in place at ZML for this which takes translate-c target in the zig.toolchain but would love to discuss ideas on that.
We can also be incremental on that and start with a build setting to control legacy vs override behavior and only ask for translate-c label for now + build on top of that for more complete customization.
WDYT ?
Starting zig 0.16,
zig translate-cis now backed bytranslate-cproject which usesaroccas the c compiler.It is already advertised that one can depend on the translate-c repository directly to benefit from more translation options.
Since
translate-cwill soon become a mandatory build-step, we should already express a dependency ontranslate-candarocc, and orchestrate the translation from those binaries built from source (or at least offer the option).This would allow users to benefit from said additional options and overall increased flexibility rather than waiting for newer releases of zig to benefit from translate-c improvements.
For this, I'm not entirely sure of the full API just yet for
rules_zigbut I was thinking that we could have:translate-cbinary built from sourcetranslate-ctargets directly.I already have something in place at ZML for this which takes
translate-ctarget in thezig.toolchainbut would love to discuss ideas on that.We can also be incremental on that and start with a build setting to control legacy vs override behavior and only ask for
translate-clabel for now + build on top of that for more complete customization.WDYT ?