Cross-Platform Guide
RayQuiro was engineered from the ground up for strict cross-platform compatibility across Windows, Linux, and macOS.
1. Cross-Platform Core Guidelines
Section titled “1. Cross-Platform Core Guidelines”1. File Paths
Section titled “1. File Paths”Never hardcode path separators (\\ or /). Always use path.join:
var config_path = path.join(process.cwd(), "config", "settings.json");2. Platform Detection
Section titled “2. Platform Detection”Use os.name() and os.arch() to conditionally handle platform-specific tasks:
if (os.name() == "windows") { print("Running on Windows");} else if (os.name() == "linux") { print("Running on Linux");} else if (os.name() == "macos") { print("Running on macOS");}3. Cross-Compiling with LLVM
Section titled “3. Cross-Compiling with LLVM”You can cross-compile RayQuiro applications from your development machine to target other operating systems using the --target flag:
# Build for Linux (ELF 64-bit):rqio build app.rq --target linux-x64 -o app_linux
# Build for Windows (.exe):rqio build app.rq --target win-x64 -o app.exe
# Build for Apple Silicon macOS:rqio build app.rq --target macos-arm64 -o app_macos2. Platform Installation Methods
Section titled “2. Platform Installation Methods”| Operating System | Automated Installer |
|---|---|
| Windows | `irm rq.raytolfas.cc |
| Linux | `curl -fsSL rq.raytolfas.cc/linux |
| macOS | `curl -fsSL rq.raytolfas.cc/mac |