The process of developing and delivering a LispWorks application can typically be broken down as follows:
Develop your application using LispWorks. In addition to the code that you write, you can use third-party libraries and all the functionality of LispWorks apart from that listed in 1.2.2 Functionality removed by delivery.
Application development is covered in detail in 3 Writing Code Suitable for Delivery and you should also read 14 Efficiency considerations when coding for delivery.
Read 6 Delivery on macOS, 7 Delivery on Microsoft Windows, or 8 Delivery on Linux, FreeBSD and x86/x64 Solaris, as appropriate according to your target platform(s).
If you use CLOS, the FLI or the LispWorks editor in your application, you should also read 10 Delivery and Internal Systems.
You can use any defsystem facility to organize your sources. For example:
You can then use functions lw:load-system and lw:compile-system, or the ASDF equivalents, to work with your source files as a whole.
You may discover performance bottlenecks in your application, before or after delivery. LispWorks provides tools to help eliminate these sorts of problems. A profiler is available in LispWorks, in order to help you make critical code more efficient.
You can also tune the behavior of the garbage collector. See the LispWorks® User Guide and Reference Manual for details.
There is a TTY-based debugger available to help debug applications broken by severe delivery parameters. You can deliver this debugger in the application so that you can debug it on-line if something goes wrong.
See the LispWorks® User Guide and Reference Manual for more information about these facilities.
Once your application is ready, you can deliver it by loading it and then calling deliver. Note that this has to be done in a script, as described in 2.2 Delivering the program.
deliver takes many keyword arguments for fine-tuning, but it is intended to work well with a minimal number of keywords. You should start by delivering with no more than the following keywords if required: :interface :capi
, or :multiprocessing t
. Only add other keywords when you find that they are needed.
You can also make LispWorks discard unused code, in order to reduce the delivered image size and thereby improve performance. You should not do this until your delivered application is working, though, because discarding certain code impedes debugging.
If you deliver at level 0 the system does not try to get rid of any code and delivery should be straightforward. Delivery at higher levels tries to remove code, which may cause some problems, and in this case you will need to add the appropriate delivery keywords to fix these problems. However, you should not need to use many keywords. If you use 6 or more delivery keywords, please contact Lisp Support with the details to check that you are doing the right thing.
Delivery is covered in 4 Delivering your Application.
5 Keywords to the Delivery Function describes the keywords you can pass to the delivery function, deliver, that permit fine control over the delivery process.
Executables and dynamic libraries that are created using Delivery with LispWorks on most platforms do not require a run time license key.
You should load all the Lisp modules that your application needs into the LispWorks image before attempting to deliver your application. Do this by calling require with each module name in your delivery script.
Delivered applications can deal with errors using the Common Lisp and LispWorks-specific Condition System and error handling facilities if so desired. But if you cannot keep the full Common Lisp Condition System because it is too large, you can still use some basic facilities provided for handling errors.
See 10.5 The condition system in delivered applications for more details.
You should also consider adding a logging mechanism to your application, which logs any error (as well as other useful information). That is needed both because the delivered application does not have the LispWorks IDE debugging tools, and because end-users generally cannot be expected to debug Lisp code.
11 Troubleshooting the delivery process presents a number of explanations and workarounds for problems you might have when delivering your application.
Delivery User Guide - 01 Dec 2021 19:35:03