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. 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 Desktop and Server. The source code is in Builder. To compile and load the extension on Syllable Desktop, do the following. See the previous article for the requirements.
build update
build log
build get HelloREBOL-Extension--current
build patch HelloREBOL-Extension--current
build HelloREBOL-Extension--current
cd HelloREBOL-Extension--current
r3
import %./hello-extension.so
hello
goodbye
|