Systems Programming Language.
https://nytrix.x3ric.com โ// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 80/100 with only 7 stars
- Accepts sponsorship (github)
// how to help
// readme
Nytrix
Statically typed for native performance, comptime generation, and low-level control.
First program
use core
fn greet(str name) str {
"Hello, " + name + "!"
}
print(greet("Nytrix"))
assert(greet("Nytrix") == "Hello, Nytrix!", "greet")
Run it:
./make ny -run hello.ny
Or build a native executable:
./make ny -o hello hello.ny
./hello
Source can also be run directly from a URL:
./make ny https://raw.githubusercontent.com/nytrix-lang/nytrix/refs/heads/main/etc/labs/ytool.ny
Install
chmod +x make
./make
./make install
ny --version
If ./make cannot be executed directly:
python3 ./make
Language
Data
use core
enum Shape {
Circle(int radius),
Empty
}
fn area(shape) int {
match shape {
Shape.Circle(r) -> r * r
Shape.Empty -> 0
}
}
assert(area(Shape.Circle(4)) == 16, "area")
ADT payloads use Type name in declarations and positional values in
constructors and match patterns.