Skip to content

Wyn Launch Posts — Drafts

Generated 2026-04-23. Edit freely before posting.


1. Show HN

Title: Show HN: Wyn – Compiled language that generates C, 49KB binaries, 850+ stdlib methods


Wyn is a compiled programming language that transpiles to C, with automatic reference counting, a batteries-included stdlib, and binaries that start at 49KB.

Why I built it. I kept switching between Python (nice syntax, slow), Go (fast, verbose), C (fast, painful), and Bash (glue, fragile). I wanted one language for CLI tools, web servers, and scripts — with clean syntax and native performance. So I built one.

What makes it different:

  • Compiles to C, then to a native binary. No VM, no runtime, no GC. Memory is managed with ARC (automatic reference counting).
  • 850+ methods in the standard library. HTTP server/client, JSON, SQLite, Redis, file I/O, crypto, regex — all built in.
  • A hello-world binary is 49KB. A web server compiles in ~400ms.

Quick taste — a web server in 12 lines:

wyn
import http

fn main() {
    let server = http.Server.new("0.0.0.0", 8080)
    server.get("/", fn(req, res) {
        res.send("Hello from Wyn!")
    })
    server.get("/json", fn(req, res) {
        res.json({"language": "wyn", "version": "1.8"})
    })
    server.listen()
}

wyn build server.wyn → 52KB binary. No dependencies. Ships as a single file.

Honest limitations:

  • Young ecosystem. ~36 official packages vs Go's thousands.
  • No traits/interfaces yet (planned for v2.0).
  • Few production users. I use it for my own tools, but it hasn't been battle-tested at scale.
  • Error messages could be better. The compiler is ~25K lines of Wyn and improving.

147 tests pass on every commit. It's not done, but it works.

Happy to answer questions about the compiler, the design decisions, or why I thought the world needed another programming language.


2. r/programming

Title: I built a compiled language that generates C – 49KB binaries, built-in HTTP/SQLite/JSON, spawn/await concurrency


I've been working on Wyn, a compiled language that targets C. The pipeline is: Wyn source → Wyn compiler (written in Wyn) → C code → gcc/clang → native binary.

No garbage collector. Memory is handled with automatic reference counting — the compiler inserts retain/release calls at compile time. This means predictable performance with no GC pauses.

Some numbers:

  • Hello world: 49KB binary, compiles in ~120ms
  • Web server (12 lines): 52KB binary, ~400ms compile
  • Fibonacci(40): 85x faster than Python, ~1.2x slower than hand-written C
  • Standard library: 850+ methods across HTTP, JSON, SQLite, Redis, crypto, regex, file I/O

Concurrency uses spawn/await — lightweight tasks multiplexed on a thread pool:

wyn
let results = spawn {
    let a = fetch("https://api.example.com/users")
    let b = fetch("https://api.example.com/posts")
    await [a, b]
}

The compiler is self-hosting (~25K lines of Wyn). 147 tests run on every commit. 36 official packages so far (sqlite, redis, pg, gui, bcrypt, smtp, etc.).

It's still young — no traits yet, error messages need work, and the ecosystem is small. But for CLI tools, web servers, and scripts, it's been solid for my own use.

Try it without installing: https://play.wynlang.com

Source: https://github.com/wyn-lang/wyn


3. r/ProgrammingLanguages

Title: Wyn: Design decisions in a compiled-to-C language (ARC, methods in structs, pipe operator, generators)


I've been building Wyn for the past few years — a compiled language that generates C. I wanted to share some design decisions and get feedback.

ARC over GC. I chose automatic reference counting instead of tracing GC. The compiler inserts retain/release calls, and cycle detection runs at well-defined points (end of scope, explicit drop). The tradeoff: cycles require care, but you get deterministic destruction and no GC pauses. For the CLI tools and servers I build, predictable latency matters more than throughput on cyclic data structures.

Methods inside struct bodies. Wyn puts methods directly in the struct definition, not in separate impl blocks. This was controversial with early users, but it keeps related code together and makes the struct the single source of truth for its behavior. The downside: large structs get long. I'm considering foldable regions in the LSP.

Pipe operator. value |> fn() threads the left side as the first argument. This replaced a lot of nested function calls in the stdlib. Chaining transforms reads left-to-right:

wyn
names |> filter(fn(n) { n.len() > 3 }) |> map(fn(n) { n.upper() }) |> sort()

Generators. Functions can yield values lazily. This powers the iterator protocol — for loops work on anything with a generator. It compiles down to a state machine in the generated C, similar to how Kotlin handles coroutines.

No traits yet. This is the biggest missing piece. I'm designing a trait system for v2.0 that avoids the complexity of Rust's trait bounds while still allowing polymorphism. Current workaround: duck-typed generics (if it has the method, it compiles).

More on the type system: https://wynlang.com/blog/type-system

Full language spec: https://github.com/wyn-lang/wyn/tree/main/internal-docs


4. r/Python

Title: I wanted Python's syntax with native performance – built Wyn (compiles to C, 85x faster on fib, 49KB binaries)


I love Python's readability. I don't love waiting 3 seconds for a CLI tool to start, or shipping a Docker container just to run a script.

So I built Wyn — a compiled language with Python-like syntax that generates C. Here's a side-by-side:

Python:

python
def greet(names):
    for name in names:
        if len(name) > 3:
            print(f"Hello, {name}!")

Wyn:

wyn
fn greet(names: []str) {
    for name in names {
        if name.len() > 3 {
            print("Hello, {name}!")
        }
    }
}

The syntax is close. The performance isn't. Fibonacci(40): Wyn finishes in 0.45s, Python takes 38s. That's 85x.

A Wyn hello-world binary is 49KB. No interpreter, no venv, no requirements.txt. Just copy the binary and run it.

When to use Python over Wyn:

  • You need a specific library (pandas, scikit-learn, Django). Python's ecosystem is enormous. Wyn has 36 packages.
  • You're prototyping and don't care about performance.
  • You need dynamic typing / monkey-patching.

When to consider Wyn:

  • CLI tools you want to distribute as a single binary.
  • Web servers / APIs where startup time and memory matter.
  • Replacing Bash scripts that got too complex.
  • Anything where you'd reach for Go but want cleaner syntax.

Wyn isn't a Python replacement. It's for the cases where you love Python's feel but need native speed.

Try it in the browser: https://play.wynlang.com

Comparison page: https://wynlang.com/docs/wyn-vs-python


5. YouTube Screencast Script

Title: Wyn in 5 Minutes


[0:00–0:30] What is Wyn

(Show wynlang.com in browser)

Hey. This is Wyn — a compiled programming language that generates C.

You write clean, readable code. The compiler turns it into C, then into a native binary. No garbage collector, no runtime, no VM. Binaries start at 49 kilobytes.

It comes with 850+ standard library methods — HTTP, JSON, SQLite, crypto, file I/O — all built in. Let me show you how it works.

[0:30–1:00] Install

(Switch to terminal)

Installing takes one command:

bash
curl -fsSL https://wynlang.com/install.sh | sh

(Run the command, show output)

That's it. Let's verify:

bash
wyn --version

You should see wyn 1.8.x. We're good.

[1:00–2:00] Hello World

Let's write something:

bash
mkdir wyn-demo && cd wyn-demo
bash
cat > hello.wyn << 'EOF'
fn main() {
    print("Hello from Wyn!")
}
EOF

Run it directly:

bash
wyn run hello.wyn

(Show "Hello from Wyn!" output)

Now let's build a binary:

bash
wyn build hello.wyn
ls -lh hello

(Show file size)

49 kilobytes. That's the whole thing. No dependencies. You can copy this binary to any Linux machine and it just runs.

Let's time the compile:

bash
time wyn build hello.wyn

(Show ~120ms)

About 120 milliseconds. Not bad.

[2:00–3:00] Web Server

Now something more interesting — a web server:

bash
cat > server.wyn << 'EOF'
import http

fn main() {
    let server = http.Server.new("0.0.0.0", 8080)
    server.get("/", fn(req, res) {
        res.send("Hello from Wyn!")
    })
    server.get("/json", fn(req, res) {
        res.json({"language": "wyn", "version": "1.8"})
    })
    server.listen()
}
EOF

That's 12 lines. Let's build and run it:

bash
wyn build server.wyn
ls -lh server

(Show ~52KB)

52 kilobytes for a web server. Let's run it:

bash
./server &

And hit it with curl:

bash
curl http://localhost:8080/
curl http://localhost:8080/json

(Show "Hello from Wyn!" and the JSON response)

Works. Let's kill the server and move on.

bash
kill %1

[3:00–4:00] Concurrency

Wyn has spawn/await for concurrency. Let me show you:

bash
cat > concurrent.wyn << 'EOF'
import http
import time

fn fetch_url(url: str) -> str {
    return http.get(url).body
}

fn main() {
    let start = time.now()

    let a = spawn fetch_url("https://httpbin.org/delay/1")
    let b = spawn fetch_url("https://httpbin.org/delay/1")
    let c = spawn fetch_url("https://httpbin.org/delay/1")
    let d = spawn fetch_url("https://httpbin.org/delay/1")

    let results = await [a, b, c, d]

    let elapsed = time.since(start)
    print("Fetched 4 URLs in {elapsed}")
}
EOF

Four requests that each take 1 second. Sequentially that's 4 seconds. Let's see:

bash
wyn run concurrent.wyn

(Show output: ~1.1 seconds)

About 1.1 seconds. All four ran in parallel on a thread pool. That's the 4x speedup — no async/await coloring, no callback hell. Just spawn and await.

[4:00–4:30] Playground

Don't want to install anything? There's an online playground.

(Switch to browser, open play.wynlang.com)

You can write Wyn code right here, hit Run, and see the output. It compiles on the server and streams the result back.

(Type a quick example, run it)

You can also share links — click Share, and you get a URL you can send to anyone.

[4:30–5:00] Where to Learn More

That's Wyn in 5 minutes. Here's where to go next:

  • Docs: wynlang.com/docs — the full language reference and tutorials
  • GitHub: github.com/wyn-lang/wyn — the compiler is open source, star it if you're interested
  • Sample apps: 42 examples covering CLI tools, web servers, games, and more
  • Discord: wynlang.com/discord — small community, but I answer every question

It's still a young language. No traits yet, the ecosystem is small, and there are rough edges. But it works, it's fast, and I'm actively building it.

If you try it, let me know what you think. Thanks for watching.

(Show wynlang.com one more time, end)

MIT License — v1.11