Skip to content

rqio run / build / repl

Execute RayQuiro scripts directly using the high-performance Bytecode VM.

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

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

RayQuiro 1.0 features an enhanced console REPL with full line-editing capabilities:

  • Up / Down arrows (↑ / ↓): browse command history
  • Left / Right arrows (← / →): move the cursor and edit text in-place
  • Backspace & Home/End: precise in-line text editing
RayQuiro 1.0 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 1.0 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, wasm32-wasi)
--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
wasm, wasm32, wasm32-wasiwasm32-wasiWebAssembly (WASI) bytecode .wasm
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

3. Packaging RayQuiro Binaries (rqio pack)

Section titled “3. Packaging RayQuiro Binaries (rqio pack)”

For custom operating systems and lightweight runtime distributions, RayQuiro supports packaging applications into .rqb bytecode bundles:

Terminal window
rqio pack main.rq -o app.rqb
  • Produces a compact standalone binary package with the RQB1 header.
  • Can be executed directly with rqio run app.rqb or registered with Linux binfmt_misc for native OS execution.