Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 2.08 KB

File metadata and controls

97 lines (65 loc) · 2.08 KB

T-Ruby Logo

T-Ruby Documentation

Type-safe Ruby, the TypeScript way

DocumentationT-Ruby Repository


About This 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).

What is T-Ruby?

T-Ruby is a typed superset of Ruby that compiles to plain Ruby — just like TypeScript does for JavaScript.

  • Write .trb files with type annotations
  • Compile to standard .rb files with zero runtime overhead
  • Automatically generate .rbs signature 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) -> String

For more information, visit the T-Ruby repository.

Local Development

Prerequisites

  • Node.js 20.0 or higher
  • pnpm

Installation

pnpm install

Start Development Server

pnpm start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

pnpm build

This command generates static content into the build directory.

Deployment

pnpm deploy

This command builds the website and pushes to the gh-pages branch for GitHub Pages hosting.

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Related Links