1
0
Fork
You've already forked arocc
0
[Fork] A modern fully featured C compiler.
  • Zig 82.7%
  • C 17.2%
Find a file
2026年05月30日 10:20:31 -07:00
.github/workflows add run, fmt and test-fmt build steps 2025年10月21日 13:34:00 +02:00
build Update to zig 0.17.0-dev.251+0db721ec2 2026年05月08日 18:43:19 +03:00
deps/zig Zig update 2026年05月23日 01:31:33 +03:00
include ptrcheck.h: Define do-nothing shims for all bounds check macros 2025年12月23日 23:12:40 +02:00
src zig update: update to new build system 2026年05月30日 10:20:31 -07:00
test Parser: support second argument to deprecated attribute 2026年05月30日 13:32:49 +03:00
.gitattributes gitattributes: mark BuiltinFunction.zig as autogenerated 2023年01月16日 10:11:45 -08:00
.gitignore use .zig-cache in .gitignore 2024年06月15日 23:44:23 +03:00
build.zig zig update: update to new build system 2026年05月30日 10:20:31 -07:00
build.zig.zon update to Zig 0.17.0-dev.298+ad1b746e2 2026年05月13日 21:43:50 +03:00
LICENSE init 2021年02月21日 16:30:21 +02:00
LICENSE-UNICODE CharInfo: implement C23 rules for identifiers 2023年11月08日 10:57:12 +02:00
README.md fix typo in readme 2025年05月29日 11:12:20 +03:00

Aro

Aro

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

The project intends to support standard C and all common extensions:

Version status
C23 Complete excluding Add IEEE 754 interchange and extended types
C17 Complete excluding warnings Ensure C17 compatibility
C11 Complete excluding warnings Ensure C11 compatibility
C99 Complete excluding warnings Ensure C99 compatibility
C95 Complete
C89 Complete
GNU extensions Ensure GNU C extension compatibility
Clang extensions Ensure Clang C extension compatibility

Aro will be used as the C frontend for C to Zig translation in the Zig toolchain.

Codegen

Earlier there was a proof of concept backend capable of producing a valid hello world binary but it was removed to make way for a new more capable backend which is still under construction. The new backend will reuse parts of the self-hosted Zig compiler.

#542

Using aro as a module

The following assumes that your package has a build.zig.zon file.

zig fetch --save git+https://github.com/Vexu/arocc.git

Add the following to your build.zig:

constaro=b.dependency("aro",.{.target=target,.optimize=optimize,});exe.root_module.addImport("aro",aro.module("aro"));// Optional; this will make aro's builtin includes (the `include` directory of this repo) available to `Toolchain`b.installDirectory(.{.source_dir=aro.path("include"),.install_dir=.prefix,.install_subdir="include",});

Now you can do

constaro=@import("aro");

in your Zig code.