DEV Community

Rux Language
Rux Language

Posted on

Meet Rux

There's no shortage of new programming languages these days, but every so often one comes along that's worth paying attention to early. Rux is a fast, compiled, strongly typed, multi-paradigm programming language that's been quietly building momentum — and with the v0.3.0 release just dropping in June 2026, now is a great time to take a first look.

What is Rux?

At its core, Rux aims to be:

  • Compiled — emits native x86-64 machine code, no runtime or virtual machine
  • Strongly typed — strict type system with inference, no implicit coercions
  • Multi-paradigm — supports procedural, object-oriented (via extend blocks and interfaces), and structured programming styles
  • General-purpose — designed to work everywhere from system utilities to libraries

The project is MIT-licensed and lives at github.com/rux-lang/Rux.


The Compiler Pipeline

One of the most interesting aspects of Rux is that its compiler is entirely hand-rolled in C++26. It doesn't rely on LLVM or any other backend framework — it walks its own road from source to binary:

Source (.rux)
  → Lexer       (tokenizes with file/line/column diagnostics)
  → Parser      (produces an AST)
  → Sema        (type checking and name resolution)
  → HIR         (high-level intermediate representation)
  → LIR         (low-level IR; three-address, explicit control flow)
  → ASM         (x86-64 assembly emitter, NASM-compatible, Intel syntax)
  → RCU         (native object file format)
  → Linker      (produces a native executable or DLL)
Enter fullscreen mode Exit fullscreen mode

Every stage supports a --dump-* flag for inspection, which is a huge help if you want to understand the compilation process or contribute to the compiler itself.


A Quick Look at the Language

Here's the simplest valid Rux program — it should feel immediately familiar if you've written C, Go, or Rust:

import Std::Io::Print;

func Main() -> int {
    Print("Hello, Rux!");
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Functions use func, return types come after ->, and entry point is Main. Clean and unsurprising.

Types

Rux has explicit-width numeric types — int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64 — plus bool and String. Integer literals can carry type suffixes (10i, 10u).

Composite types include:

  • Structs — named product types
  • Enums — named sum types (tagged unions)
  • Tuples — anonymous fixed-size product types, e.g. (int32, float64)
  • Slices — variable-length views over contiguous memory, e.g. uint8[]
  • Fixed arrays — sized slices, e.g. uint8[4]
  • Pointers — raw pointer types, e.g. *uint8
  • Type aliasestype Name = Type;

Interfaces and extend Blocks

Rux favors composition over inheritance. You define a contract with interface and attach implementations to any type using extend:

interface Display {
    func ToString(self) -> String;
}

struct Point {
    x: float64,
    y: float64,
}

extend Point: Display {
    func ToString(self) -> String {
        // ...
    }
}
Enter fullscreen mode Exit fullscreen mode

This is structurally similar to Rust traits or Go interfaces, and it keeps data and behavior cleanly separated.

Control Flow

All the essentials are there: if/else, for, while, do-while, and match with pattern matching. Range patterns (lo..hi), enum variant destructuring, struct patterns, and wildcard _ are all supported.

Modules and Packages

Source files declare their module with module MyModule;. Packages are defined by a Rux.toml manifest (yes, TOML — familiar territory for Rust developers), and multi-file compilation with cross-module imports is fully supported.

[Package]
Name = "Hello"
Version = "0.1.0"
Type = "Bin"

[Dependencies]
Std = "0.1.0"
Enter fullscreen mode Exit fullscreen mode

Attributes

Rux has a clean attribute syntax: @[AttributeName] or @[Attribute(args)] — PascalCase, no macros, no angle brackets. The most prominent current use is @[Target(...)] for conditional compilation per platform.


The Toolchain (rux CLI)

The rux CLI feels modern and opinionated:

Command What it does
rux new <name> Scaffold a new package
rux build Compile the current package
rux run Build and execute
`rux install Install all dependencies
rux update Update packages to latest versions
rux list List installed packages

The package manager integrates directly with the compiler — no separate tool like cargo vs rustc. One binary to rule them all.


Platform Support

As of v0.3.0, Rux will compile and run natively on:

  • Linux x86-64
  • Windows x86-64 (PE32+ executables and DLLs)
  • macOS x86-64 (Mach-O)
  • FreeBSD, OpenBSD x86-64
  • Illumos/OmniOS x86-64

CI runs on all of the above, which is impressive for a v0.3 release. The BSD and Illumos support in particular shows that the team isn't just targeting the mainstream trio.


Current Status

Rux is honest about where it stands: it's in active development and not yet production-ready. The changelog shows rapid iteration — v0.1.0 was released in late April 2026, v0.3.0 shipped in early June 2026, roughly one significant release every two to three weeks.

The roadmap implicit in the changelog suggests type generics, a richer standard library, and ARM targets are the natural next steps.


Why Watch Rux?

A few things stand out as genuinely interesting design choices:

No external backend. Writing your own x86-64 code generator is hard. Doing it and shipping cross-platform CI for 8 operating systems at v0.3 is a statement of intent.

extend for method dispatch. Decoupling data from behavior is a proven pattern, and Rux's take on it feels clean — no trait objects vs concrete type confusion, just structural contracts.

First-class DLL output. Support for emitting .dll artifacts on Windows from day one signals that the language takes interoperability seriously, not as an afterthought.

Compile-time intrinsics. #line, #column, #file, #function, #date, #time, #module are built-in tokens, so diagnostics and logging metadata is zero-cost and available everywhere.


Getting Involved

If you want to follow along or contribute:


Rux is early, but it's the kind of early that's worth bookmarking. A clean syntax, a real compiler pipeline, and cross-platform ambitions from the start — those are good foundations. Keep an eye on it.

Top comments (0)