rqio run / build / repl
This content is for v0.2.1. Switch to the latest version for up-to-date documentation.
rqio run
Section titled “rqio run”Execute RayQuiro scripts directly using the high-performance Bytecode VM or tree-walk interpreter.
rqio run <file.rq> [args...]rqio run <file.rq> --watch # Hot Reload: automatically reloads on file saverqio run <file.rq> --legacy # Force tree-walk interpreterHot Reload (--watch / -w)
Section titled “Hot Reload (--watch / -w)”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.
rqio run app.rq --watchArguments passed after the script path are accessible within RayQuiro via process.args().
rqio repl
Section titled “rqio repl”Launch the interactive RayQuiro REPL (Read-Eval-Print Loop) shell:
rqio replrqio # Running rqio without arguments in a non-project folder also opens REPLIn the REPL, you can type expressions, test built-in packages, define functions, and inspect values interactively:
RayQuiro 0.2.1 REPLType "exit" or press Ctrl+C to quit.
>>> var x = random.int(1, 100)>>> x * 284>>> fn greet(name) { return "Hello, " + name + "!" }>>> greet("RayQuiro")"Hello, RayQuiro!">>> exitrqio build
Section titled “rqio build”Compile a RayQuiro script into a standalone, bare-metal native binary. The compiled executable has zero external runtime or VM dependencies.
rqio build <file.rq> [-o output] [flags...]Supported Compilers
Section titled “Supported Compilers”RayQuiro 0.2.1 includes autonomous compiler support:
- TinyCC (TCC): Bundled directly with RayQuiro (
tools/tcc/on Windows, systemtccon Linux). Enables fast, zero-dependency autonomous native compilation without requiring Clang, LLVM, or GCC installed on the machine. - LLVM / Clang: For aggressive compiler optimizations and cross-compilation.
| Flag | Description | Details |
|---|---|---|
-o <path> | Output binary path | Defaults to script name (.exe on Windows, no extension on Linux/macOS) |
--tcc | Autonomous TinyCC | Compiles within ~10ms using the bundled TinyCC toolchain (default for normal builds) |
--llvm | Clang / LLVM | Compiles via LLVM Clang |
--release | Maximum performance | Enables -O3 LLVM optimization passes (falls back to TCC if Clang is unavailable) |
--debug | Debug build | Generates -O0 -g debug symbols for GDB / LLDB / VS Code |
--target <triple> | Cross-compilation target | Target architecture and OS (e.g. linux-x64, win-x64, macos-arm64) |
--no-llvm | GCC fallback | Forces compilation using GCC instead of LLVM/Clang |
Target Aliases
Section titled “Target Aliases”The --target flag supports shorthand aliases as well as standard LLVM target triples:
| Alias | Target Triple | Target OS & Architecture |
|---|---|---|
linux-x64 | x86_64-unknown-linux-gnu | Linux 64-bit (x86_64) |
linux-arm64 | aarch64-unknown-linux-gnu | Linux 64-bit ARM (AArch64) |
win-x64, windows-x64 | x86_64-pc-windows-gnu | Windows 64-bit (x86_64) |
macos-arm64, darwin-arm64 | arm64-apple-darwin | macOS Apple Silicon (M1/M2/M3) |
macos-x64, darwin-x64 | x86_64-apple-darwin | macOS 64-bit Intel |
Examples
Section titled “Examples”# Autonomous build via TinyCC (no external compiler required)rqio build app.rq -o app.exe
# Explicitly use TinyCCrqio build math.rq --tcc -o math.exe
# Maximum release optimization with LLVMrqio build game.rq --release -o game.exe
# Cross-compile for Linux x86_64rqio build server.rq --release --target linux-x64 -o server
# Debug build for stepping through with a debuggerrqio build script.rq --debug -o script_debug.exe