Skip to main content

RGC is the native compiled language for Python developers.

Fast. Safe. Familiar.

For Linux, macOS, and Windows

Fast

Compiles to native machine code.

The LLVM backend compiles RGC to local code — no interpreter, no GC, performance on par with C / Rust.

terminal
$ rgc hello.rg -o hello
$ ./hello
» Hello, RGC!

Safe

Memory safety without GC.

Ownership and borrow checking rule out dangling references and data races at compile time — safety holds before your program ever runs.

borrow.rg
def length(s: @str) -> int {
    return s.len()
}

def main() {
    text = "RGC"
    print(length(@text))
    print(text)
}

Familiar

The syntax Python developers know.

def, if, for, and # comments — Python developers write RGC on day one.

examples/fib.rg
def fib(n: int) -> int {
    if n <= 1 {
        return n
    }
    return fib(n - 1) + fib(n - 2)
}

def main() {
    print("fib(10) =", fib(10))
}

Up and running in minutes

One command to install.

terminal
$ curl -fsSL https://rgc-dev.tensorplay.cn/install.sh | sh
$ rgc --version
RGC 0.1.0
$ rgc hello.rg -o hello && ./hello
» Hello, RGC!

PowerShell and cmd commands are on the install page →