Skip to content

ryolang/ryo

Repository files navigation

Ryo Logo

Ryo Programming Language

Ryo /ˈraɪoʊ/ — Looks like Python. Runs like Rust. Quacks like Ryduck.

Status Build License


Ryo is a statically-typed language designed for high Developer Experience. It combines the ergonomics of Python, the memory safety of Rust ("Ownership Lite"), and the concurrency model of Go.

It targets web backends, CLI tools, and scripting/notebook environments via AOT and JIT compilation.

Warning

Ryo is in pre-alpha. The language design is stabilizing but the compiler is under active construction. Not yet ready for production use.

Key Features

  • Pythonic Syntax: Indentation-based, readable, and concise.
  • Ownership Lite: No Garbage Collector. Memory safety via Mojo-style borrowing (functions borrow by default, assignments move).
  • Green Threads: "Colorless" concurrency with a work-stealing scheduler. No async/await needed.
  • Rich Errors: Zig-style Error Unions (!T) with payload data.
  • Fast: Built on Cranelift for instant compile times and native performance.

Quick Example

fn main():
	print("Hello, World!\n")
fn classify(n: int) -> int:
	if n < 0:
		return -1
	elif n == 0:
		return 0
	else:
		return 1

fn in_range(x: int, lo: int, hi: int) -> bool:
	return x >= lo and x <= hi

fn main():
	c = classify(5)
	if in_range(c, 0, 1):
		print("positive\n")
cargo run -- run examples/classify.ryo

More examples: examples/

Current Status (Milestone 8b2)

The compiler implements through Milestone 8b2: Assert & Panic Builtins:

  • Types: int, float, bool, str (literals)
  • Operators: arithmetic, comparison, logical, unary negation
  • Variables: immutable by default, mut, type annotations, type inference
  • Functions: definitions, calls, forward references, recursion
  • Control flow: if/elif/else, short-circuit and/or
  • Builtins: print(), panic(), assert()
  • Compilation: AOT (native binary) and JIT via Cranelift
  • Tooling: ryo run, ryo build, ryo lex, ryo parse, ryo ir --emit=uir|tir|clif

See the Implementation Roadmap for what's next.

Installation

From Latest Build

curl -fsSL https://raw.githubusercontent.com/ryolang/ryo/main/install.sh | sh
export PATH="$HOME/.ryo/bin:$PATH"
ryo --version

Dev builds are manually triggered and may be unstable. Update with --force:

curl -fsSL https://raw.githubusercontent.com/ryolang/ryo/main/install.sh | sh -s -- --force

From Source

Requires Rust 1.92+ (Install Rust). Zig linker is managed automatically.

git clone https://github.com/ryolang/ryo.git
cd ryo
cargo build --release
cargo run -- run examples/hello.ryo

Next steps: Getting Started

Language Inspirations

  • Python — Clean syntax with colons and indentation, f-strings, type inference
  • Rust — Ownership model, algebraic data types, pattern matching, traits
  • Mojo — Simplified ownership without lifetimes, value semantics
  • Go — Simplicity as a core value, fast compilation, CSP concurrency
  • Zig — Comptime execution, explicit error handling, readable-by-default design

Contributing

We welcome contributions — compiler development, standard library, tooling, documentation, language design, and examples. Check out the open issues.

Documentation

License

Ryo is distributed under the terms of the MIT license. See LICENSE for details.

About

A statically-typed, compiled language combining Python's ergonomics, Rust's memory safety, and Go's concurrency. AOT & JIT via Cranelift.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors