Introduction
Rux is a fast, compiled, strongly typed, and multi-paradigm programming language designed for clarity, safety, and performance. It combines expressive high-level constructs with predictable low-level control, so the same language scales from command-line tools and libraries to applications and services.
Rux is in early development. The work happens in the open across several GitHub repositories — compiler, website and documentation, package manager, and code-editor support — all released under the permissive MIT license. The language is actively evolving and improving with every release.
Design Goals
- Performance — Rux compiles to native machine code with no hidden runtime overhead.
- Safety — A strong static type system catches errors at compile time.
- Clarity — Syntax is regular and readable; the language avoids implicit surprises.
- Multi-paradigm — Rux supports procedural, object-oriented, and functional styles.
- Ergonomic tooling — A single
ruxbinary handles compilation, packaging, formatting, and more.
These goals rest on a few guiding principles: performance matters, developer experience matters, readable code scales, tooling should be first-class, and simplicity beats unnecessary complexity.
Hello, World
import Io::Print;
func Main() -> int {
Print("Hello, World!");
return 0;
}
Main is the entry point of every executable, and import brings Print from the standard library's Std::Io module into scope.
Where to Go Next
- New to Rux? Follow the Get Started guide or try it in the browser on the Playground — nothing to install.
- Looking something up? This reference is organized bottom-up: lexical structure, primitive types, variables and statements, then functions, user-defined types, and modules.
- Shipping a package? Manifests, dependencies, and publishing live in Packaging.
- Calling native code? See the Foreign Function Interface and the attributes that control linking and targets.
- Want to contribute? Bug reports, support, feature requests, documentation improvements, and pull requests are all welcome across the project's repositories.
Table of Contents
The complete Rux language reference — covering lexical structure, primitive types, variables, functions, structs, enums, interfaces, modules, error handling, FFI, and compile-time programming.
Source Files
Rux source files use the .rux extension and must be encoded in UTF-8. By convention, files are stored under the Src/ directory of a package and follow PascalCase naming (e.g., Main.rux, Lib.rux, HttpClient.rux, JsonParser.rux, WebServer.rux).