A modern fully featured C compiler.
Find a file
RedStealthDev 535ace2ab0
Some checks failed
CI / build (ubuntu-latest) (push) Failing after 1m47s
CI / build (macos-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
update to 0.15.1
2025-09-22 18:30:04 +02:00
.github/workflows CI: skip running tests in release mode 2025-05-24 23:42:11 +03:00
build update to 0.15.1 2025-09-22 18:30:04 +02:00
deps/zig Zig update: change setCold to branchHint (#763) 2024-08-28 08:37:13 -07:00
include limits.h: prevent GlibC from include_next'ing GCC's limits.h 2025-01-06 19:56:56 +02:00
src update to 0.15.1 2025-09-22 18:30:04 +02:00
test Preprocessor: use placemarker instead of empty variadic arguments when pasting 2025-09-07 14:18:01 +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 update to writergate changes 2025-07-19 12:56:27 +03:00
build.zig.zon update to 0.15.1 2025-09-22 18:30:04 +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 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:

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.