zig/lib/compiler/aro
Alex Rønne Petersen eb363bf845
Merge pull request #21572 from alexrp/tests-llvm-targets
`test`: Rewrite the target triple list for `llvm_targets`.
2024-10-04 19:37:12 +02:00
..
aro Merge pull request #21572 from alexrp/tests-llvm-targets 2024-10-04 19:37:12 +02:00
backend Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
aro.zig sync Aro dependency 2024-09-09 12:35:49 +03:00
backend.zig make aro-based translate-c lazily built from source 2024-02-28 13:21:05 -07:00
README.md Sync Aro sources (#19199) 2024-03-06 14:17:41 -05:00

Aro

Aro

A C compiler with the goal of providing fast compilation and low memory usage with good diagnostics.

Aro is included as an alternative C frontend in the Zig compiler for translate-c and eventually compiling C files by translating them to Zig first. Aro is developed in https://github.com/Vexu/arocc and the Zig dependency is updated from there when needed.

Currently most of standard C is supported up to C23 and as are many of the common extensions from GNU, MSVC, and Clang

Basic code generation is supported for x86-64 linux and can produce a valid hello world:

$ cat hello.c
extern int printf(const char *restrict fmt, ...);
int main(void) {
    printf("Hello, world!\n");
    return 0;
}
$ zig build && ./zig-out/bin/arocc hello.c -o hello
$ ./hello
Hello, world!