Talinx / jp2a

Converts jpg/png images to ASCII
GNU General Public License v2.0
59 stars 8 forks source link

Idea: Use Zig as build system #17

Open gregorni opened 4 weeks ago

gregorni commented 4 weeks ago

Ziglang is a systems programming language that's still in development. It focuses on having good interoperability with C. One of the outstanding features of its compiler is the ability to compile C code: It can be used as a drop-in replacement for gcc or clang. It doesn't have any dependencies, and is very easy to install. It can also cross-compile C code to other operating systems and/or CPU architectures.

Is there an interest in using Zig as the suggested compiler for the project? While not yet considered stable, it is successfully used at and supported by Uber, Google and Cloudflare.

Using zig cc as a compiler could also open the door to potentially writing parts of the codebase in Zig, which is a bit more memory-safe than C.

Please don't take this as an attempt to enforce Zig upon everyone, I just think it could make for a nicer DX working on this project.

gregorni commented 4 weeks ago

So I actually got this to work so far using the current build system. Essentially follow the build steps as explained in the README, but instead of make -j run make -j CC="zig cc". It actually builds and runs!