Skip to content
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

[feature] Zig build support #540

Open
KageKirin opened this issue Feb 22, 2022 · 2 comments
Open

[feature] Zig build support #540

KageKirin opened this issue Feb 22, 2022 · 2 comments

Comments

@KageKirin
Copy link
Contributor

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.

@bkaradzic
Copy link
Owner

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.

@KageKirin
Copy link
Contributor Author

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

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

No branches or pull requests

3 participants
@KageKirin @bkaradzic and others