ZSF fork of Aro. Send issues and pull requests upstream!
  • Zig 80.7%
  • C 19.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-02 02:30:15 +02:00
.github/workflows add run, fmt and test-fmt build steps 2025-10-21 13:34:00 +02:00
build Remove use of deprecated ArrayList API 2026-10-19 12:49:10 -07:00
include Parser: implement _Countof 2026-10-26 15:19:15 +02:00
src Parser: combine atomic and array conversions for arrow expressions 2026-11-02 02:18:48 +02:00
test Parser: implement C23 atomic/qualifier rules for return/cast types 2026-11-02 02:18:48 +02:00
.gitattributes update to Zig 0.17.0-dev.947+36069a2a7 2026-06-22 16:59:12 +03:00
.gitignore use .zig-cache in .gitignore 2024-06-15 23:44:23 +03:00
build.zig add pre-release identifier to version 2026-11-02 02:28:06 +02:00
build.zig.zon add zsf pre-release identifier to version 2026-11-02 02:30:15 +02: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 README: add C2y 2026-10-26 15:19:15 +02: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 Issue
C2Y Partial C2y support
C23 Complete
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 Partial Ensure GNU C extension compatibility
Clang extensions Partial 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:

const aro = 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

const aro = @import("aro");

in your Zig code.