logoalt Hacker News

fwlr • yesterday at 10:11 PM • 1 reply • view on HN

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

Replies

ChickeNES • yesterday at 11:27 PM

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