GENie icon indicating copy to clipboard operation
GENie copied to clipboard

[feature] Zig build support

Open KageKirin opened this issue 3 years ago • 2 comments

Hi, this is less a request, more a fyi:

I'm working on adding Zig build support, i.e. generating a build.zig file to use zig build to build C and C++ projects.

So far, genie builds. I just want to make sure that we're on the same page concerning the required litmus tests:

  • build genie
  • build bx + bgfx
  • build my own project (that's what I'm adding this for to start with). Anything else to test it with?

Also, Zig introduces a few restrictions wrt config names (Debug, ReleaseFast, ReleaseSafe and ReleaseSmall are the only config names supported by Zig; for compatibility , Release gets renamed internally to ReleaseFast), and supported source files (only C and C++, not C#, Vala nor Swift). I hope the way of handling this is fine by you.

This is the current WIP branch: https://github.com/KageKirin/GENie/tree/zig-build-support. I'll push out a PR once it works with bgfx.

Cheers.

KageKirin avatar Feb 22 '22 02:02 KageKirin

Ideally you wouldn't change anything other than add Zig build support...

Release gets renamed internally to ReleaseFast

For example, if others use Release, you would just add some translation that in Zig that means ReleaseFast instead renaming Release everywhere else. Also Zig specific features should not leak outside Zig build itself.

bkaradzic avatar Feb 22 '22 03:02 bkaradzic

oh, that's fine. I meant to say that Release gets changed to ReleaseFast when writing the zig file. nothing really hard.

KageKirin avatar Feb 22 '22 06:02 KageKirin