Skip to content

rqio run / build / repl

This content is for v0.2.1. Switch to the latest version for up-to-date documentation.

Execute RayQuiro scripts directly using the high-performance Bytecode VM or tree-walk interpreter.

Terminal window
rqio run <file.rq> [args...]
rqio run <file.rq> --watch # Hot Reload: automatically reloads on file save
rqio run <file.rq> --legacy # Force tree-walk interpreter

When the --watch flag is passed, rqio keeps running and continuously monitors the script file. Every time you save changes to the file, the runtime immediately reloads and executes the updated code without restarting your terminal.

Terminal window
rqio run app.rq --watch

Arguments passed after the script path are accessible within RayQuiro via process.args().


Launch the interactive RayQuiro REPL (Read-Eval-Print Loop) shell:

Terminal window
rqio repl
rqio # Running rqio without arguments in a non-project folder also opens REPL

In the REPL, you can type expressions, test built-in packages, define functions, and inspect values interactively:

RayQuiro 0.2.1 REPL
Type "exit" or press Ctrl+C to quit.
>>> var x = random.int(1, 100)
>>> x * 2
84
>>> fn greet(name) { return "Hello, " + name + "!" }
>>> greet("RayQuiro")
"Hello, RayQuiro!"
>>> exit

Compile a RayQuiro script into a standalone, bare-metal native binary. The compiled executable has zero external runtime or VM dependencies.

Terminal window
rqio build <file.rq> [-o output] [flags...]

RayQuiro 0.2.1 includes autonomous compiler support:

  1. TinyCC (TCC): Bundled directly with RayQuiro (tools/tcc/ on Windows, system tcc on Linux). Enables fast, zero-dependency autonomous native compilation without requiring Clang, LLVM, or GCC installed on the machine.
  2. LLVM / Clang: For aggressive compiler optimizations and cross-compilation.
FlagDescriptionDetails
-o <path>Output binary pathDefaults to script name (.exe on Windows, no extension on Linux/macOS)
--tccAutonomous TinyCCCompiles within ~10ms using the bundled TinyCC toolchain (default for normal builds)
--llvmClang / LLVMCompiles via LLVM Clang
--releaseMaximum performanceEnables -O3 LLVM optimization passes (falls back to TCC if Clang is unavailable)
--debugDebug buildGenerates -O0 -g debug symbols for GDB / LLDB / VS Code
--target <triple>Cross-compilation targetTarget architecture and OS (e.g. linux-x64, win-x64, macos-arm64)
--no-llvmGCC fallbackForces compilation using GCC instead of LLVM/Clang

The --target flag supports shorthand aliases as well as standard LLVM target triples:

AliasTarget TripleTarget OS & Architecture
linux-x64x86_64-unknown-linux-gnuLinux 64-bit (x86_64)
linux-arm64aarch64-unknown-linux-gnuLinux 64-bit ARM (AArch64)
win-x64, windows-x64x86_64-pc-windows-gnuWindows 64-bit (x86_64)
macos-arm64, darwin-arm64arm64-apple-darwinmacOS Apple Silicon (M1/M2/M3)
macos-x64, darwin-x64x86_64-apple-darwinmacOS 64-bit Intel
Terminal window
# Autonomous build via TinyCC (no external compiler required)
rqio build app.rq -o app.exe
# Explicitly use TinyCC
rqio build math.rq --tcc -o math.exe
# Maximum release optimization with LLVM
rqio build game.rq --release -o game.exe
# Cross-compile for Linux x86_64
rqio build server.rq --release --target linux-x64 -o server
# Debug build for stepping through with a debugger
rqio build script.rq --debug -o script_debug.exe