I seek for portability, not performance.
An annotated C-family language compiler library that lowers to SPIR-V directly from the libclang AST, without going through LLVM IR.
Why not just link clspv? I tried. It built, then I met static initialization order and an infinite loop. The problem was not that library — it was that the compiler boundary lived outside my code. So I moved the boundary inside.
__attribute__((annotate("aclspv_execmodel(0)"))) /* vertex */
void vs(
__attribute__((annotate("aclspv_storage_class(1)"))) const float* in,
__attribute__((annotate("aclspv_storage_class(3)"))) float* out) {
*out = *in * 2.0f;
}| Size | 40k LOC · 365 commits · since 2025.12 |
| Split | 26k lines C · 12k lines headers · 2.3k lines C++ templates |
| Tested | 49 compile tests, every module validated by spirv-val |
| Spec | aclang.adoc — 1,308 lines |
| Attributes | 19 (execution model, storage class, layout, builtin, …) |
Read (ko-kr)
- Overview — timeline, summary, landing page
- I. Input — an IR that loses type is unusable
- II. Shape — I dropped recursion and built a stack
- III. Foundation — the price of a changed requirement
- IV. Boundary — portability is not negotiable
C90 · libclang · SPIR-V · Vulkan · structured control flow · SSA



