REBOL 3 Concepts: Extensions

Definition

Extensions let you extend REBOL by packaging a mix of REBOL code and data along with native code and data.

Extensions are built on top of modules and can export an API, including high-performance native functions, as well as package together images, sounds, and other data into a single loadable file.

An important goal of the extensions design was to keep it simple and smart. We wanted programmers to be productive with their time, efficiently adding useful features, not wasting effort dealing with complex APIs, includes, classes, models, or other interface issues.

This section of the manual covers:

Special notes

Compatibility

By their very nature, extensions that make use of native code are OS and machine dependent. In order to run across a wide variety of systems, they must be compiled for each of those systems.

If you need to build machine-independent programs, it is best to avoid using extensions. If there are specific low-level needs for your program, please do not hesitate to suggest them to REBOL Technologies or to the REBOL development community. If it makes sense to add your suggestion as a general feature to REBOL, it can be done quickly in many cases, depending on the availability of the code and its licensing.

Security

It should also be noted here that the extension modules described here are, by definition, not secure.

That's because they can run any type of low level code. Like any external code, do not run extension modules unless you trust their source. (In a later release we will add a signing mechanism, so at least you can be sure that the code of a extension has not been tampered with since it was published by its author.)

When you run R3 with its default secure options, it will not allow you to import a extension. You must first lower the security level for a extension to be loaded and imported.