Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.95 KB

File metadata and controls

55 lines (41 loc) · 1.95 KB

Quick Start

This page gives a minimal path from a fresh build of aburi to running a few small example programs.

Build The Compiler

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=/path/to/llvm-18/lib/cmake/llvm
cmake --build build

That produces the compiler executable at build/aburi.

Try A C Example

./build/aburi sample_c/hello_stdio.c -o hello_c
./hello_c

Try A C++ Example

./build/aburi sample_cpp/classes.cpp -o classes_cpp
./classes_cpp

More Samples

  • sample_c/hello_stdio.c: basic C control flow and stdio
  • sample_c/records_and_vla.c: structs, arrays, and variable-length arrays
  • sample_c/c11_features.c: _Static_assert, _Alignas, packed records, and compound literals
  • sample_c/blocks.c: Apple Blocks and __block captures
  • sample_c/attributes_and_builtins.c: packed records and __builtin_offsetof
  • sample_c/compound_literals.c: compound literals and struct-by-value calls
  • sample_c/varargs.c: simple variadic functions with va_list
  • sample_c/function_pointers.c: function pointers passed through helper calls
  • sample_cpp/classes.cpp: constructors, inheritance, and new / delete
  • sample_cpp/references.cpp: references and reference parameters
  • sample_cpp/templates.cpp: a minimal function-template example
  • sample_cpp/overloads.cpp: basic overload resolution for multiple parameter types
  • sample_cpp/namespaces.cpp: namespace-qualified calls
  • sample_cpp/member_pointers.cpp: pointer-to-member syntax for data members

Existing Codebases

The driver for Aburiscript is mostly GCC/Clang compatible meaning it can serve as a drop in replacement in most build systems.

For more info on the compiler driver, see the Usage file.

If you want to try Aburiscript on a C codebase with an advanced build system, an AI coding agent can help you wire aburi into CMake, Meson, or Autotools builds without manually digging through configuration files.