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 | 59k LOC · 414 commits · since 2025.12 |
| Split | 36k lines C · 21k lines headers · 2.6k lines C++ templates |
| Tested | 61 compile tests, every module validated by spirv-val |
| Spec | aclang.adoc — 1,818 lines |
| Attributes | 23 (execution model, storage class, layout, builtin, matrix, …) |
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



