Professional C#-like/Go-hybrid Language for C-performance Systems
Curium is a modern programming language designed for high-performance systems development. It combines the safety and ergonomics of modern languages like Go and Rust with the raw power and control of C, now powered directly by the TCC backend.
- Language: Clean C#-like/Rust-like semantics that transpile directly to safe C11, compiled seamlessly via an integrated TCC Engine.
- Memory Safety: Effortless automatic memory management using a built-in ARC garbage collector, with Data-Oriented Design override contexts via
reactor arena(size) { ... }. - Unique Typing: Combine string/number operations with the
strnumdual-type, and write safe error flows with?TOptions andResult<T,E>. - Performance Hacks: Use
#[hot]attribute on variables to give the CPU absolute register residency guarantees. - Dynamic Operators: Never be restricted by static operators. Define runtime logic for any syntax operator with
dyn op in (...)and strong safety fallbacks. - C/C++ Interop: Seamlessly inject zero-cost abstraction raw code via
c { ... }blocks. - Developer Experience: Blazing-fast CLI packed with a graphical
Neon-DOD TUI, audio cues, and integrated package/project management natively built-in.
Download and run the installer for your platform:
- Windows:
powershell -ExecutionPolicy Bypass -File .\install.ps1 - Linux/macOS:
bash ./install.sh
Create a file named hello.cm:
fn main() {
println("Hello, Curium v5!");
}
Run it immediately after building the cm CLI (see Installation):
cm run hello.cmRepository language stats on GitHub classify .cm files as C (see .gitattributes) because Linguist does not ship a Curium grammar. For accurate Curium syntax highlighting in VS Code, use the extension under vscode-extension/cm-language/.
Curium allows you to define custom operators at runtime using the dyn keyword:
fn main() {
mut x = 10;
mut y = 20;
mut op = "+";
dyn op in (
"+" => { return x + y; },
"*" => { return x * y; },
"avg" => { return (x + y) / 2; }
) dyn(op == "max") {
return x > y ? x : y;
} dyn($) {
println("Unknown operator!");
return 0;
};
println(x op y); // Output: 30
}
Explore the full Curium documentation suite:
- 📘 Language Guide: A high-level introduction for newcomers.
- 📖 Syntax Reference: A complete, A-Z manual of every keyword and operator.
- 🛠️ CLI Reference: Detailed guide for the
cmcommand and package manager. - 🏢 Project Guide: Information on project structure and modularity.
- 🔌 Compiler Internals: Deep dive into the Lexer, Parser, and C-codegen.
- 🚀 Installation Guide: Setup instructions for all platforms.
- 📝 Implementation Examples: Practical patterns for linked lists, concurrency, and more.
We welcome contributions! Please check out our GitHub repository for more information.
✨ Happy coding with Curium!