ruru .
Reads like Ruby. Runs like C. Built for code that humans review.
- No null
- No exceptions
- Fast
def fib(n: Int) -> Int
return n if n < 2
fib(n - 1) + fib(n - 2)
end
def main
print(fib(30))
end $ ruru run fib.rur832040 Why ruru
Python and Ruby win on how fast a thought becomes code. Rust wins on how much the compiler catches. With agents writing more of our code, you want both: a surface you can read at a glance, and a strict compiler that acts as a free reviewer.
The trade-off everyone argues about
Pick two of readable, fast and safe. Agents now write code faster than people can review it, which makes the missing one hurt more.
Python, Ruby
Easy to read and quick to write. Slow, and most mistakes only show up when the program runs.
C, Rust
Fast, and Rust catches a lot before you run anything. The code takes more effort to read and review.
ruru
Ruby-like to read, checked by a strict compiler, and fast enough that you don't have to choose.
No null. Missing is a type.
A value that might be absent says so with ?, and the compiler makes you handle it before you can use it.
class User
pub name: String
pub nickname: String?
end
def main
users = [
User(name: "Ada", nickname: "countess"),
User(name: "Grace", nickname: none),
]
for user in users
if user.nickname
print("#{user.name}, aka #{user.nickname}")
else
print("#{user.name} has no nickname")
end
end
end $ ruru run nicknames.rurAda, aka countessGrace has no nickname def check_port(port: Int) -> Result[Int]
raise "port can't be 0" if port == 0
port
end
def main
port = check_port(0) else |err|
print("using the default: #{err}")
8080
end
print(port)
end $ ruru run port.rurusing the default: port can't be 08080 Failures are values.
No exceptions. A call that can fail returns a Result, and else says what happens when it does.
How fast is it?
Early numbers on classic benchmark programs, against the languages people compare it with. ruru matches C on loops and trails it on others. The notes below the chart say how it was measured.
nested loops, outer count n x 25000 inner iterations. Longer bar is faster; C is the 1× baseline.
Mandelbrot escape-time survey on an n x n grid, 50 iterations max; checksum is the count of points inside and the total iterations (no image). Longer bar is faster; C is the 1× baseline.
longest Collatz chain with start <= n. Longer bar is faster; C is the 1× baseline.
dense n x n Float matrix multiply over a transposed right operand, the plb2 form; checksum is the centre entry and the trace of the product. Longer bar is faster; C is the 1× baseline.
build, walk and free many binary trees (the allocation test); n is the maximum depth. Longer bar is faster; C is the 1× baseline.
spectral norm of the n x n matrix A(i,j) = 1/((i+j)(i+j+1)/2+i+1), 10 power iterations; checksum is vBv/vv (the square of the norm, since ruru has no sqrt). Longer bar is faster; C is the 1× baseline.
recursive fib(n). Longer bar is faster; C is the 1× baseline.
Median of 12 runs, outputs checked identical across languages, measured 2026-11-01 on an i7-1255U laptop that was not idle. * Python and Ruby ran smaller inputs; their bars compare work done per second. ruru keeps integer-overflow and stack-overflow checks on, while Rust's release build drops overflow checks.