← Back to context

Comment by fwlr

12 hours ago

From https://ziglang.org/intro/overview/

  Zig is also a C compiler

  Here’s an example of Zig building some C code:

  hello.c
  > #include <stdio.h>
  >
  > int main(int argc, char **argv) {
  >   printf("Hello world\n");
  >   return 0;
  > }
  

  $ zig build-exe hello.c -lc
  $ ./hello
  > Hello world

What does that have to do with portability? It doesn’t support a bunch of CPU architectures, the portability metric I care about.

  • I misread the comment I was replying to, thinking it was about using Zig to port something, when it was actually about porting something that uses Zig.