Type-safe Ruby, the TypeScript way
Documentation • T-Ruby Repository
This repository contains the source code for the T-Ruby official documentation website.
The documentation site is built with Docusaurus and supports multiple languages (English, Korean, Japanese).
T-Ruby is a typed superset of Ruby that compiles to plain Ruby — just like TypeScript does for JavaScript.
- Write
.trbfiles with type annotations - Compile to standard
.rbfiles with zero runtime overhead - Automatically generate
.rbssignature files for type checkers
# input.trb
def greet(name: String): String
"Hello, #{name}!"
end# output.rb (compiled)
def greet(name)
"Hello, #{name}!"
end# output.rbs (generated)
def greet: (String name) -> StringFor more information, visit the T-Ruby repository.
- Node.js 20.0 or higher
- pnpm
pnpm installpnpm startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
pnpm buildThis command generates static content into the build directory.
pnpm deployThis command builds the website and pushes to the gh-pages branch for GitHub Pages hosting.
We welcome contributions! Please see our Contributing Guide for details.
- T-Ruby Repository - The main T-Ruby compiler
- Documentation Website - Live documentation site