- LateralGM's plugin interface supports resource, functionality, and UI extensions.
- ENIGMA supports various extensions akin to plugins.
- ENIGMA itself is a plugin in LateralGM. The rest of this article will explain this connection.
To keep the LateralGM and ENIGMA projects modular and separate (not to mention, the fact that they are written in completely different languages), ENIGMA acts as a kind of plugin to LateralGM, in library form (so/dll/dylib). LGM doesn't naturally search for and call dlls, so to facilitate this transaction, a third program, the LGM ENIGMA Plugin, often just shortened to The Plugin, was created to provide a java hook for LGM and to execute routines in ENIGMA where desirable. The Plugin usually resides on GitHub in it's own repository.
The first and foremost function of The Plugin is, of course, to call the ENIGMA Compiler when the user wishes to compile. However, compiler is a foreign concept to LateralGM, so The Plugin provides a hook into LGM which causes a new menu to appear, called ENIGMA, which would otherwise not be there. This provides a number of menu options for interacting with the ENIGMA library, such as Run and Compile.
An additional function of the Plugin is to handle building ENIGMA's binaries for the current platform. In order to do this, it must first locate and call the toolchain executables primarily accessed through a call to make.
Some less visible functions including providing a JNI-compatible backend for ENIGMA, which it populates from the LGM backend, as well as updating the set of available keywords that LGM syntax-highlights and content-assists.
As the functionality or aspects behind the functionality changes, The Plugin often needs to change, and then will require rebuilding. Usually different versions of The Plugin are interchangeable, so oftentimes you may continue using an older build, or you may update with a newer build while keeping an older version of LGM/ENIGMA. This is not highly recommended, as incompatibilities tend to arise, especially between The Plugin and ENIGMA, so usually it is best to keep the versions of ENIGMA and The Plugin in sync. Since building is usually done by a developer, and such a person usually has an arsenal of developer tools at their disposal, the task hasn't been extended into easier venues, such as make. As such, instructions are available for the purpose.