Returns a foreign module as a Lisp object suitable for use at run time, possibly via a fasl file.
get-embedded-module-data filename => data
A pathname specifier for a file containing a dynamic foreign module.
A Lisp object containing the data of the foreign module.
get-embedded-module-data returns the foreign module in filename as a Lisp object suitable as argument to setup-embedded-module, but also externalizable, that is the compiler can put it in a fasl file.
get-embedded-module-data is useful when you need to incorporate a foreign dynamic module in a fasl file, which is itself useful when the fasl is loaded on the run time computer. In the usual situation when the fasl is loaded on the same computer where it is compiled, get-embedded-module is more convenient, and replaces both
get-embedded-module-data and setup-embedded-module.
To incorporate the module in a fasl file,
get-embedded-module-data must be called at compile time, which is typically done either by doing it at read time with
#. or using a macro. The result is then used as argument to setup-embedded-module at load time. Examples of both approaches are shown below.
To actually use the code in the module, install-embedded-module must be called at run time with the name of the module (
my-embedded-module-name in the examples below).
The module should not have dependencies on other non-standard modules, otherwise install-embedded-module may fail to install it.
get-embedded-module-data at read time with
get-embedded-module-data via a macro. Note that there is no backquote or quote, so the code is executed by by the compiler:
(defmacro my-get-embedded-module-data ()
(let ((pathname (my-locate-the-foreign-module)))
LispWorks Foreign Language Interface User Guide and Reference Manual - 29 Sep 2017