v0.3.0 • Production Ready • MIT Licensed

Wyn

One language to rule them all

⚡ 20-30× faster than Python 🎯 Simple as Python 🚀 LLVM-powered
hello.wyn
fn main() {
    print("Hello, World!")
}

Get Started in 30 Seconds

1

Install

curl -sSL https://get.wynlang.com | sh
2

Write

echo 'fn main() { print("Hello!") }' > hello.wyn
3

Run

wyn run hello.wyn

Why Wyn?

The best of all worlds. No compromises.

Blazing Fast

LLVM-powered native compilation. 20-30× faster than Python. Matches C on arrays. 1.3M tasks/sec concurrency.

View Benchmarks →
🎯

Simple Syntax

Python-like simplicity with explicit types. Easy to learn, easy to read, easy to maintain.

View Examples →
🌍

Universal

CLI tools, servers, GUI apps, mobile (iOS). One language for everything you build.

See Examples →
🛡️

Type Safe

Explicit types with compile-time checking. Result and Option types. Pattern matching with destructuring.

View Examples →
📦

Complete Stdlib

120+ functions across 16 modules: io, net, json, crypto, database, http, testing, and more.

Browse Stdlib →
🚀

Production Ready

100% test pass rate (49/49). Self-hosting compiler. Battle-tested. No dependencies.

View on GitHub →

Performance That Destroys

Real benchmarks. Real results. No BS.

vs Python
23.5×
faster on Fibonacci
vs Python
29.5×
faster on arrays
vs Go
2.3×
faster on arrays
vs Java
45×
faster startup

See It In Action

server.wyn
import net

fn main() {
    const server: int = net.server_create(8080)
    print("Server running on :8080")
    
    while true {
        const client: int = net.server_accept(server)
        spawn handle_request(client)
    }
}

fn handle_request(client: int) {
    const req: str = net.server_read_request(client)
    const path: str = net.parse_path(req)
    
    match path {
        "/api" => net.server_send_json(client, 200, "{status:ok}")
        "/" => net.server_send_response(client, 200, "Hello, Wyn!")
        _ => net.server_send_response(client, 404, "Not Found")
    }
    net.close(client)
}
error_handling.wyn
fn divide(a: int, b: int) -> Result[int, str] {
    if b == 0 {
        return err("Division by zero")
    }
    return ok(a / b)
}

fn main() {
    const result = divide(10, 2)
    match result {
        ok(value) => print("Success: " + value.to_str())
        err(msg) => print("Error: " + msg)
    }
    
    // Chain operations
    const chained = parse_number("123")
        .and_then(|n| divide(n, 2))
        .map(|n| n * 2)
    
    print(chained.unwrap_or(0).to_str())
}
concurrent.wyn
import time

fn worker(id: int, ch: Channel[str]) {
    for i in 0..5 {
        const msg = "Worker " + id.to_str() + " task " + i.to_str()
        ch.send(msg)
        time.sleep_ms(100)
    }
    ch.close()
}

fn main() {
    const ch: Channel[str] = channel_new()
    
    // Spawn 3 workers
    for i in 0..3 {
        spawn worker(i, ch.clone())
    }
    
    // Collect results
    while true {
        match ch.recv() {
            some(msg) => print("Received: " + msg)
            none => break
        }
    }
}
data_processing.wyn
import json
import collections

struct User {
    name: str
    age: int
    role: str
}

fn main() {
    // Parse JSON data
    const data = json.parse(`{
        "users": [
            {"name": "Alice", "age": 30, "role": "admin"}
        ]
    }`)
    
    // Process with collections
    const users: [User] = []
    
    for user_data in data.get("users").as_array() {
        const user = User{
            name: user_data.get("name").as_str(),
            age: user_data.get("age").as_int(),
            role: user_data.get("role").as_str()
        }
        users.push(user)
    }
    
    // Filter and transform
    const admins = users.filter(|u| u.role == "admin")
                       .map(|u| u.name.upper())
    
    print("Admins: " + admins.join(", "))
}

Rich Ecosystem

📚 Standard Library

120+ functions across 16 modules

ionetjsoncrypto httptimecollectionsregex
Browse Stdlib →

📦 Package Manager

Install packages directly from GitHub

wyn pkg install aws postgres docker
Browse Packages →

⚡ Performance

LLVM-powered native compilation

23× faster than PythonC-level performance
View Benchmarks →

🛠️ Developer Tools

Complete toolchain included

CompilerREPLLSPFormatter
View on GitHub →

Ready to Build Something Amazing?

Fast, simple, universal programming language