kairolang/kairo 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 Other 许可证,目前获得 385 个 Star、4 次 Fork。
仓库全名
kairolang/kairo
README 摘要
The Kairo Programming Language Kairo is a statically typed compiled general purpose language, built for systems programming and high-performance applications. Designed with native bi-directional C++ interoperability in mind. Kairo aims to combine the power and control of low-level languages with the safety and clarity of high-level design. The goals of Kairo Safe, and productive programming language. Allow for…
Kairo is a statically typed compiled general purpose language, built for systems programming and high-performance applications. Designed with native bi-directional C++ interoperability in mind. Kairo aims to combine the power and control of low-level languages with the safety and clarity of high-level design.
The goals of Kairo
Safe, and productive programming language.
Allow for low-level programming with fine-grained control.
Native bidirectional C and C++ interoperability.
Include a portable, well-structured standard library.
Encourage clear, maintainable, and reviewable code through strong, expressive semantics.
An alternative to C, C++ or work alongside them.
No runtime, no garbage collector, no hidden costs - safety through visibility, not restriction.
Current Status
The Stage 1 compiler, written in Kairo, is fully self hosted (November 2026). A release build is bootstrapped by the previous release, and having a seed kairo compiler is a strict requirement. there’s a lit suite of about 2,000 tests and builds for 14 targets.
Warning 警告
The documentation covers the language as Stage 1 implements it, and the status page lists what is not built yet. The compiler is not ready for production use. If you want to help with documentation, please reach out to us on Discord
Why Kairo?
Think of programming languages like making coffee
C and C++ hands you all the ingredients and equipment, every knob and button live. No recipe, no instructions. You’ll have to learn and make something, what you make is on you.
Rust provides you with all the ingredients, fancy equipment, and a precise recipe with every step measured. The coffee comes out reliably good, and the recipe catches mistakes before you brew.
Kairo gives you ingredients, equipment, and recipes, and the kitchen is wired into the C and C++ kitchens next door. Borrow their beans and machines, and send finished coffee back through the same door.
Design Rationale
We liked the simplicity of Python’s syntax but wanted more.
We wanted the performance and control of C and C++.
We admired Rust’s safety features but, at times, found them cumbersome.
We liked Rust’s Meta-programming and Trait system.
We liked Zig’s approach to interoperability.
We wanted a powerful module system.
We wanted a robust standard library.
We wanted a language that would work drop-in with any existing C or C++ codebases.
We wanted all; So we created Kairo.
Kairo is built to slot directly into C and C++ ecosystems, offering a fresh syntax and features, without abandoning decades of code.
Example
This builds today with the Stage 1 compiler (build from source for now; see Getting Started).
C++ includes a .k file directly. There is no generated header and no binding layer:
Kairo is licensed under the Apache License 2.0 with the Kairo Runtime Library Exception. LICENSE is the authoritative text. Programs you compile with Kairo are yours: the exception covers the runtime library and the code the compiler generates, so they carry no attribution requirement from Kairo itself (the MIT notice of the runtime’s allocator, mimalloc, is embedded in every program automatically, see NOTICE).
Read The Full Post Here. TLDR: Lang design, Compiler, and Architecture are 100% human. No AI-generated code in the compiler and language design stage1 or stage0. Docs have AI usage; mostly used for polishing.
Acknowledgements
We want to thank all our contributors pushing Kairo forward.
评论