ros-dump(1)
๐ ros-dump โ make a dumped image of a roswell script ๐
okay so welcome to the ros-dump(1) manual, bestie. This is the whole vibe: making a dumped image of a roswell script, with all the flags and caveats intact. Letโs go ๐
โจ SYNOPSIS โจ
ros [OPTIONS1...] dump [OPTIONS2...] MODE args...
OPTIONS1 specify the standard roswell options such as -L or -m LISP. OPTIONS2 specify the image reduction options we describe later. MODE is either output or executable. Slay, thatโs the shape of it ๐
๐ฆ DESCRIPTION ๐ฆ
ros-dump creates a dumped lisp image of the state after processing all options OPTIONS1.
It has two modes: output and executable. In both modes, the global environment (e.g. global binding to special variables such as *package*) of the state just after the restart is the environment which was effective when the script was dumped.
bestie, important compatibility tea โ: the dumped image is generally not compatible between the different implementations, and also between the versions.
๐ DUMP MODES ๐
๐ output [-f] [-o OUTPUT] NAME ๐
It loads the roswell script NAME and saves the current lisp state to an image.
The image file is by default written to an internal directory of roswell in an organized manner, i.e., somewhere under $ROSWELL_INSTALL_DIR deduced by the current implementation, its version and the given NAME.
When the output file already exists, the command fails with an error code.
The image can be loaded by ros -m IMAGE. When restarting from the image, standard roswell subcommands and additional arguments to the script are also available, for example ros run to resume with a repl, or --restart FUNC to call a specific function, leaving some flexibility. iconic behavior tbh ๐
-o OUTPUTโ the image is written toOUTPUTinstead of the default location. cute and custom โจ-fโ force output when the output already exists. no โoops already thereโ energy ๐
๐ executable NAME [-o OUTPUT] ๐
When a script is dumped with executable, the dumped image becomes a self-contained executable binary which implies --restart main.
If OUTPUT is given, the resulting binary is written to this file. Otherwise, the output filename is deduced from NAME and is written in the same directory. On Windows and if SCRIPT has .ros extension, the filename will be SCRIPT.exe. On the other systems, the result will be SCRIPT (without extension).
This feature is supported on SBCL, CCL, CMUCL, CLISP, ECL. periodt ๐ซถ
๐ธ IMAGE REDUCTION OPTIONS ๐ธ
These options unlink some references to the runtime objects and allow gcs to reclaim some memory, which eventually reduces the size of the dumped image.
โ ๏ธ careful, bestie: take care to ensure the resulting program works as expected, as some of these operation may destroy the common assumptions of the conforming programs. For example, package-related reduction options may inhibit the runtime calls to READ after the restart. This is not a drill ๐
Reduction options are processed in the left-to-right manner.
โdisable-compression,โenable-compression,-cโ these options disable/enable/enable the core compression feature in SBCL. Thus this option is meaningful only on SBCL. Compression is enabled by default.โremove-docstringsโ this option removes all docstrings from all symbols in the entire lisp image. bye-bye helpful little strings ๐ญโdelete-package PKGโ this option can be specified multiple times. It uninterns the symbols inPACKAGE, callsmakeunboundandfmakeunboundon each symbol and deletes the package. Package names are automaticallystring-upcaseโd.โdelete-all-packagesโ this option appliesโdelete-package PKGon all packages, except some blacklisted packages (keyword,roswell,ROS.SCRIPT.DUMP, and the package of the main function symbol). protected besties only ๐โdelete-packages-except PACKAGEโ this option can be specified multiple times. It is identical toโdelete-all-packagesexcept that it addsPACKAGEto the blacklist. Package names are automaticallystring-upcaseโd.โdestroy-packages-sbclโ this is an sbcl-specific option which is even more aggressive than the above methods (>10MBreduction). It destroys the package system by modifying the internal tables for packages, cleaning up the caches for package-use-list etc. The blacklist is shared amongโdelete-all-packagesandโdestroy-packages-sbcl. However, this method does not callfmakunbound/makunbound, so combining the two methods can result in a more aggressive image size reduction. Due to the nature of this option, it is desirable to specify it as the last method (i.e. rightmost). main character destruction energy ๐ฅโpurify,โno-purifyโ this is common to CCL, SBCL, CMUCL. Moves all objects to the static space where GC does not scan, for the later performance of GC. Purification is enabled by default.โimpurify,โno-impurifyโ this is a CCL-specific option (enabled by default). It moves all objects to the dynamic space before saving the image. This allows the static-space objects to be GCโed. When purification is enabled, it impurifies all objects before running the purifying GC.โdelete-debug-infoโ this removes the debug infomation of functions (used to show the stack frame etc), as well as the source locations and the deprecation information of various symbols. SBCL only. This option has a large effect (+10MBreduction). big yasss size drop ๐โdelete-macro-definitions,โdelete-compiler-macro-definitionsโ this removes all definitions of macros and compiler-macros, assuming that no runtime compilation/interpretation of code will be performed. This option should be portable across implementations. It has~2MBreduction on SBCL.โdelete-compiler-information-sbclโ this is an SBCL-specific option which is more aggressive than the above methods (~4MBreduction). In addition to the macro and the compiler-macro definitions, it destroys the internal compiler systems of SBCL by also removing the inlining information, IR1 transformer and IR2 (VOP). compiler internals? gone. not me ๐
๐ SEE ALSO ๐
go read these too, bestie: sbcl(1) ros(1) ros-init(1) ๐
๐ AUTHORS ๐
Roswell Project Team.
okay thatโs the whole ros-dump(1) manual, bestie โ the footer was just the manual name and there was no source/version/date line to report, so this is your cute sign-off: ros-dump(1) ๐โจ
๐ฆ where this page comes from
- alpine 3.24: roswell-doc 24.10.115-r1 ยท MIT
- arch rolling: roswell 26.10.119-1 ยท MIT
- nixos 26.05: roswell 26.02.116
- nixpkgs unstable: roswell 26.10.117
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms