Libraries in OML

A Compose library is a self-contained set of files which provides additional functions to the Compose OML language.

From a file/delivery standpoint, a library is a folder, usually delivered as a ZIP archive. The library content is represented in the image below:



Figure 1.

The library structure expands into this:



Figure 2.
The content (folder names) is imposed. However, depending on the actual library content, some folders may be empty or even omitted. A functional library only requires the loader.oml (or .omc) script and one of the bin directories or the scripts/oml directory. The folders third_party/ and src/ are optional folders:
  • third_party/ is needed if the code used in a library depends on a third-party library.
  • src/ may be used by the library creator to include the source code of the OML libraries.

The folders examples/ and help/ are also optional, although strongly recommended.

Mandatory elements in a library include:
  • loader.oml (or loader.omc)
  • Either the scripts/ or bin/ folder (both are permitted).