Red Programming Language
Pull request Compare This branch is 8021 commits behind red:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Red Programming Language

Red is a new programming language strongly inspired by REBOL, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting, while providing a modern support for concurrency and multi-core CPU.

The language is in its early bootstrapping phase. The Red/System low-level DSL is the first focus. It is a limited C-level language with a REBOL look'n feel, required to build Red's runtime library. More information on

Running the Red/System hello script

The compiler and linker are currently written in REBOL and can produce Windows, Linux, Syllable, Android and Mac OS X executables. So, for now, a REBOL/Core binary is required to compile Red/System programs. Please follow the instructions for installing the compiler tool-chain:

  1. Clone this git repository or download an archive (Downloads menu).

  2. Download a REBOL interpreter suitable for your OS: Windows, Linux, Mac OS X, FreeBSD, OpenBSD, Solaris

  3. Extract the rebol binary, put it in red-system/ folder, that's all!

  4. Let's test it: run ./rebol, you'll see a >> prompt appear. Windows users need to click on the rebol.exe file to run it.

  5. Type: do/args %rsc.r "%tests/hello.reds", the compilation process should finish with a ...output file size message.

  6. The resulting binary is in red-system/builds/, go try it! Windows users need to open a DOS console and run hello.exe from there.

The %rsc.r script is only a wrapper script around the compiler, for testing purpose. It accepts a -v <integer!> option for verbose logs. Try it with:

>> do/args %rsc.r "-v 5 %tests/hello.reds"

Cross-compilation support

Cross-compilation is easily achieved by using a -t command line option followed by a target ID.

Currently supported targets are:

Target IDDescription
Windows, x86, console-only applications
Windows, x86, native applications
GNU/Linux, x86
GNU/Linux, ARMv5
Mac OS X Intel, console-only applications
Syllable OS, x86
Android, ARMv5

For example, from Windows, to emit Linux executables:

>> do/args %rsc.r "-t Linux %tests/hello.reds"

From Linux, to emit Windows console executables:

>> do/args %rsc.r "-t MSDOS %tests/hello.reds"