Syllable Runs First REBOL 3 Extension

The new version 3 of the REBOL programming language supports extensions written in other languages. Extensions are implemented on top of the modules framework, which is also new. Extensions can be separate dynamically loaded libraries, or they can be embedded in the REBOL executable. In fact, REBOL 3 is now highly modularised: a number of its subsystems are embedded modules, and subsystems written in C and C++ are embedded extensions. Those modules and extensions are part of the open host kit, so that custom collections can be compiled into REBOL executables.

Syllable is now running its first REBOL extension (screenshot on Syllable Desktop). It’s an example extension in the style of the traditional Hello World that shows the ease of interfacing. It works without changes on both Syllable Desktop and Syllable Server. The source code is in Syllable’s build system. It should work on all Linux systems and the makefile also has hints for Windows (using the MinGW GNU environment). It should be easy to adapt to the other platforms that the REBOL host kit supports. To compile and load the extension on Syllable Desktop, do the following. See the previous article for the requirements.

build update<br />
build log<br />
build get HelloREBOL-Extension--current<br />
build patch HelloREBOL-Extension--current<br />
build HelloREBOL-Extension--current<br />
cd HelloREBOL-Extension--current<br />
r3<br />
import %./hello-extension.so<br />
hello-once<br />
hello-twice

To compile on Syllable Server:

s build update<br />
build log<br />
build HelloREBOL-Extension--current<br />
cd HelloREBOL-Extension--current<br />
r3<br />
import %./hello-extension.so<br />
hello-once<br />
hello-twice

9 Comments

  1. 2010-11-26 5:30 pm
  2. 2010-11-26 7:03 pm
    • 2010-11-26 8:18 pm
    • 2010-11-26 9:01 pm
    • 2010-11-27 8:10 am
    • 2010-11-27 9:47 am
  3. 2010-11-29 5:28 pm
    • 2010-11-29 7:59 pm
    • 2010-12-01 9:23 am