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 red-lang.org.
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:
-
Clone this git repository or download an archive (
Downloads
menu). -
Download a REBOL interpreter suitable for your OS: Windows, Linux, Mac OS X, FreeBSD, OpenBSD, Solaris
-
Extract the
rebol
binary, put it inred-system/
folder, that's all! -
Let's test it: run
./rebol
, you'll see a>>
prompt appear. Windows users need to click on therebol.exe
file to run it. -
Type:
do/args %rsc.r "%tests/hello.reds"
, the compilation process should finish with a...output file size
message. -
The resulting binary is in
red-system/builds/
, go try it! Windows users need to open a DOS console and runhello.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 is easily achieved by using a -t
command line option followed by a target ID.
Currently supported targets are:
Target ID | Description |
---|---|
MSDOS | Windows, x86, console-only applications |
Windows | Windows, x86, native applications |
Linux | GNU/Linux, x86 |
Linux-ARM | GNU/Linux, ARMv5 |
Darwin | Mac OS X Intel, console-only applications |
Syllable | Syllable OS, x86 |
Android | 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"