Mana combines the performance of C++ with modern ergonomics. Zero-cost abstractions, no garbage collector, and explicit control flow—designed for game engines and real-time systems.
// Define a generic Result type
enum Result<T, E> {
Ok(T),
Err(E),
}
fn divide(a: f64, b: f64) -> Result<f64, string> {
if b == 0.0 {
return err("division by zero")
}
return ok(a / b)
}
fn main() -> int {
match divide(10.0, 3.0) {
Ok(result) => println(f"Result: {result}"),
Err(e) => println(f"Error: {e}"),
}
return 0
}Built from the ground up for systems programming with modern developer experience.
High-level constructs compile down to optimal machine code. No hidden allocations, no runtime overhead.
Compile-time ownership tracking prevents data races and memory leaks without garbage collection.
No hidden exceptions or implicit conversions. You always know exactly what your code does.
Clean, readable code with type inference, pattern matching, and expressive generics.
Compiles to clean C++17. Easy integration with existing codebases and libraries.
First-class OpenGL support for game development and graphics applications.
From zero to running code in three simple steps.
Install Mana
Create your first program
Compile and run
"A spellbook written by compiler engineers. We believe systems programming should be powerful without being painful. Every feature in Mana is designed to give you control while keeping your code clear and maintainable."