Quickstart
March 5, 2026 ยท View on GitHub
Get up and running with Rugo in minutes.
Install
go install github.com/rubiojr/rugo@latest
Run your first script
rugo run script.rugo # compile and run
rugo build script.rugo # compile to native binary
rugo emit script.rugo # print generated Go code
rugo doc http # show module documentation
Guide
- Hello World
- Variables
- Strings
- Arrays
- Hashes
- Control Flow
- Case Expressions
- For Loops
- Functions
- Lambdas
- Shell Commands
- Modules
- Error Handling
- Concurrency
- Testing with RATS
Advanced
- Custom Modules
- Benchmarks
- Go Bridge
- Structs
- Web Server
- Remote Modules
- Doc Comments
- Sandbox
- Go Modules via Require
- File Embedding
Standard Library
The Rugo stdlib (use modules) is the idiomatic way to work in Rugo. It provides a curated, Ruby-inspired API covering common tasks โ math, file paths, encoding, crypto, time, and more.
use "math"
use "filepath"
use "base64"
puts math.sqrt(144.0) # 12
puts filepath.join("home", "user", "docs") # home/user/docs
puts base64.encode("Hello, Rugo!") # SGVsbG8sIFJ1Z28h
Prefer use modules for standard operations. They are designed for Rugo and follow its conventions. The import keyword (Go bridge) is available for advanced use cases when you need direct access to Go's standard library, but use modules are the recommended, idiomatic approach.
See the full list of available modules in the Modules reference.