Compiled for Speed
Rux compiles directly to native machine code using optimizations. No virtual machine, no interpreter, no runtime surprises — just raw performance. Rux generates binaries like C, C++, Rust, and Zig.
Fast, compiled, strongly typed, multi-paradigm, general-purpose
Rux compiles directly to native machine code using optimizations. No virtual machine, no interpreter, no runtime surprises — just raw performance. Rux generates binaries like C, C++, Rust, and Zig.
No implicit conversions, no hidden boxing, no “maybe copy”. Rux’s type system ensures correctness without verbosity — similar to Rust’s safety, but with a cleaner syntax and simpler rules.
Memory safety is built-in, not bolted on. Rux distinguishes references (&T) and pointers (*T) clearly, allowing both safe high-level code and low-level control. Unlike C++, you don’t need manual discipline.
Rux blends procedural, functional, and object-oriented paradigms seamlessly. You can write clean imperative code, use higher-order functions, or design modular, data-driven systems — all with zero runtime overhead.
When you care about bytes and cycles, Rux gives you direct access. Explicit memory layout, fixed-width data types, and pointer arithmetic when needed. Like Zig or C, but with strong typing and clear mutability rules.
Rux’s syntax is minimal yet expressive — designed to read like pseudocode and compile like assembly. No clutter, no hidden conversions, no unnecessary ceremony. Readable, concise, and fully type-safe.
Nobody likes waiting on builds. Rux features an incremental compiler with near-instant rebuilds and dependency-free binaries. You get Go-like build speed with Rust-like optimization quality — the best of both worlds.
Rux isn’t just for systems programming. It’s equally comfortable writing CLI tools, servers, games, or libraries. Compile to Windows, Linux, macOS, and more — all from the same clean source code.
import System::PrintLine;
// Entry point of the program
func Main() -> int32 {
let greetings = [
"Hello World",
"你好,世界",
"नमस्ते दुनिया",
"Hola Mundo",
"Bonjour le monde",
"مرحبا يا عالم",
"হ্যালো বিশ্ব",
"Привет мир",
"Olá Mundo",
"سلام دنیا",
"Привіт світ",
"🐯🐶🐱🐭"
];
for greeting in greetings {
PrintLine(greeting);
}
return 0;
}import System::Print;
/// Computes the factorial of a number using an iterative approach
func Factorial(n: int32) -> int256 {
let result: int256 = 1;
for i in 2..n {
result *= i;
}
return result;
}
/// Entry point of the program
func Main() -> int32 {
let number = 10;
let fact = Factorial(number);
Print("Factorial of {} is {}\n", number, fact);
return 0;
}import System::Print;
// Regular function
func Add(x, y: int32) -> int32 {
return x + y;
}
// Function with conditional logic
func Max(a, b: int32) -> int32 {
if a > b {
return a;
} else {
return b;
}
}
// Generic function
func Div<T>(x, y: T) -> T {
return x / y;
}
func Main() -> int32 {
let sum = Add(5, 10);
let quotient = Div(10.0, 2.0);
let max = Max(5, 10);
Print("Sum: {}, Quotient: {}, Max: {}", sum, quotient, max);
return 0;
}// Signed integer types
let value: int8; // 1 byte
let value: int16; // 2 bytes
let value: int32; // 4 bytes
let value: int64; // 8 bytes
let value: int128; // 16 bytes
let value: int256; // 32 bytes
let value: int512; // 64 bytes
// Unsigned integer types
let value: uint8; // 1 byte
let value: uint16; // 2 bytes
let value: uint32; // 4 bytes
let value: uint64; // 8 bytes
let value: uint128; // 16 bytes
let value: uint256; // 32 bytes
let value: uint512; // 64 bytes
// Platform-dependent integer types
let value: int; // 4 or 8 bytes
let value: uint; // 4 or 8 bytes
// Integer literals
let value = 42; // decimal
let value = 0x2A; // hexadecimal
let value = 0o52; // octal
let value = 0b101010; // binary
let value = 32i8; // int8
let value = 1000u64; // uint64// Floating-point types
let value: float8; // 1 byte
let value: float16; // 2 bytes
let value: float32; // 4 bytes
let value: float64; // 8 bytes
let value: float80; // 10 bytes
let value: float128; // 16 bytes
let value: float256; // 32 bytes
let value: float512; // 64 bytes
// Platform-dependent floating-point types
let value: float; // 4 or 8 bytes
// Literal floating-point values
let value = 3.141592; // float
let value = 1.2e-6; // float
let value = 3.14f8; // float8
let value = 3.14f16; // float16
let value = 3.14f32; // float32
let value = 3.14f80; // float80
let value = 3.14f128; // float128
let value = 3.14f256; // float256
let value = 3.14f512; // float512// Boolean types
let value: bool8; // 1 byte
let value: bool16; // 2 bytes
let value: bool32; // 4 bytes
let value: bool64; // 8 bytes
let value: bool128; // 16 bytes
let value: bool256; // 32 bytes
let value: bool512; // 64 bytes
// Universal boolean type
let value: bool; // 1 byte
// Boolean literals
let value = true; // bool
let value = false; // bool// Character types
let value: char8; // 1 byte
let value: char16; // 2 bytes
let value: char32; // 4 bytes
let value: char64; // 8 bytes
let value: char128; // 16 bytes
let value: char256; // 32 bytes
let value: char512; // 64 bytes
// Universal character type
let value: char; // 4 bytes
// Character literals
let value = 'A'; // char
let value = '😊'; // char
let value = '\n'; // newline
let value = '\t'; // tab// Example of pointer usage
var ptr: *int32 = null;
// Pointer to a constant value
var ptr: *const int32 = null;
// Floating-point value
var value: float64 = 3.14;
// Constant pointer to a value
const ptr: *float = @value;
// Constant pointer to a constant value
const ptr: *const int32;
// Pointer to a pointer 🤯
var data: **int64;// Variable
var value: int = 10;
// Allowed, as 'var' is mutable
value = 15;
// Immutable variable
let value: int = 20;
// Not allowed, as 'let' is immutable
// This will cause a compile-time error
value = 25;
// Compile-time constant
const value: int = 30;
// Not allowed and will cause a compile-time error
value = 35;// Import module
import Math;
// Import a module with an alias
import Math as Calc;
// Import all items from a module
import Math::*;
// Import specific items from a module
import Math::Sin;
// Import multiple specific items from a module
import Math::{ Sin, Cos };
// Import specific item from a module with an alias
import Math::Cos as Cosine;Subscribe on X, Bluesky, Mastodon, or Telegram to get early updates, dev logs, and sneak peeks. Join the conversation on Discord, GitHub Discussions, or Reddit. We’d love to hear from you! Not sure where to ask your question or how to get involved? Our community team is here to give you the right answer and help you get started at [email protected].