Nexus Programming Language


A minimal language for expressive type definitions and systems programming

type Language (str name = "Nexus", f64 version, bool expressive = true);

About Nexus

Nexus is a statically-typed programming language focused on expressive type definitions and memory safety. Created by two developers passionate about minimalism and performance, Nexus provides a clean syntax for systems programming.

Unlike mainstream languages, Nexus emphasizes:

  • Concise syntax for type definitions
  • Zero-cost abstractions
  • Memory safety without garbage collection
  • Minimal runtime requirements

Language Features

Expressive Type System

Define custom types with attributes, methods, visibility modifiers, and generics:

type Vector2 (f64 x, f64 y);
type Vector3 (f64 z) : Vector2;

Memory Safety

Advanced ownership model prevents common memory errors without garbage collection overhead.

Minimal Runtime

Compiles to standalone binaries with no external dependencies.

Code Examples

Custom Type Definition

type LinkedList<T> (
  T val,
  priv LinkedList* prev,
  priv LinkedList* next
);

Constructor and Method

fun Vector2(f64 x_val, f64 y_val) {
  this.x = x_val;
  this.y = y_val;
}

fun Vector2.magnitude() -> f64 {
  return sqrt(x*x + y*y);
}

Getting Started

Installation

Download the latest compiler for your platform:

# Linux/macOS
curl -sSL https://nexus-lang.org/install | sh

# Windows
winget install nexus-lang

Your First Program

// hello.nx
import std.io;

fun main() {
  print("Hello, Nexus!");
}
$ nx hello.nx
Hello, Nexus!

Documentation

Complete language documentation is available online: