Development mode

To compile a Red program to native code, we have to do the following:

  1. Open a Terminal window and go to the folder where your script lives.
  2. Give the command red -c hello-world.red.

Here is the output (on Windows in PowerShell):

When a –c compilation is done, Red looks in this folder for a shared library libRedRT (.dll in Windows or .so in Linux/macOS); if this doesn't exist, it is compiled. The libRedRT shared dynamic library contains the whole compiled standard library and RunTime in precompiled form, and its size is less than 1 MB. As you can see, this compilation takes about a minute. But this only occurs the first time ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.