Installation
Choose the method that works best for you
Prebuilt Binaries
RecommendedFastest way to get started. No Rust or LLVM required.
# Linux & macOS
curl -fsSL https://raw.githubusercontent.com/DerekCorniello/mux-lang/main/scripts/install.sh | sh
# Windows PowerShell
iwr -useb https://raw.githubusercontent.com/DerekCorniello/mux-lang/main/scripts/install.ps1 | iex
From crates.io
For Rust developers who already have cargo installed.
cargo install mux-lang
# Verify installation
mux doctor
Build from Source
For contributors and those who want the latest features.
git clone https://github.com/DerekCorniello/mux-lang
cd mux-lang
./scripts/bootstrap-dev.sh
./scripts/dev-cargo.sh build
Write Your First Program
Mux is designed to be instantly familiar. Here is a complete program that demonstrates error handling, pattern matching, and type safety.
hello.muxmux run hello.muxfunc divide(int a, int b) returns result<int, string> {
if b == 0 {
return err("division by zero")
}
return ok(a / b)
}
func main() returns void {
auto result = divide(10, 2)
match result {
ok(value) {
print("Result: " + value.to_string())
}
err(error) {
print("Error: " + error)
}
}
}
Why Developers Love Mux
Built with modern software development in mind
Simple & Intuitive
Clean syntax without semicolons, Python-like readability with Go-inspired simplicity. Write code that is easy to understand and maintain.
Type Safe
Strong static typing with no implicit conversions. Catch errors at compile time with powerful generics and exhaustive pattern matching.
Fast & Native
LLVM-powered compilation delivers native performance. Reference-counted memory management provides safety without GC pauses or complex ownership.
Pattern Matching
Expressive match expressions with guards for enums, Result types, and Optional types. Exhaustiveness checking ensures you handle all cases.
Modern Features
Full-featured with generics, interfaces, tagged unions, collection literals, and first-class functions. Everything you need for modern development.
Developer Friendly
Built for humans with helpful error messages, built-in tooling, and comprehensive documentation. Start writing code in minutes, not hours.
See Mux in Action
Real code that showcases Mux's powerful features
Generics & Collections
class Stack<T> {
list<T> items
func push(T item) returns void {
self.items.push_back(item)
}
func pop() returns optional<T> {
if self.items.is_empty() {
return none
}
return self.items.pop_back()
}
func peek() returns optional<T> {
return self.items.get(self.items.length() - 1)
}
}
auto stack = Stack<int>.new()
stack.push(42)
match stack.pop() {
some(value) { print(value.to_string()) }
none { print("Stack is empty") }
}
Pattern Matching
enum Shape {
Circle(float radius)
Rectangle(float width, float height)
Square(float size)
}
func area(Shape shape) returns float {
match shape {
Circle(r) { return 3.14159 * r * r }
Rectangle(w, h) { return w * h }
Square(s) { return s * s }
}
}
auto shapes = [
Circle.new(5.0),
Rectangle.new(4.0, 6.0)
]
for shape in shapes {
print(area(shape).to_string())
}
Ready to Start Building?
Join the growing community of developers using Mux to build fast, reliable, and maintainable applications.
