8 raco demod: Demodularizing Programs

The raco demodularize command (usually used with the shorthand raco demod) takes a Racket module and flattens all of its dependencies into a single compiled module. A file "name.rkt" is demodularized into "name_rkt_merged.zo".

The demodularized ".zo" file can be run by passing it as an argument to the racket command-line program, or it can be turned into an executable with raco exe.

A large single module generated by the demodularizer may trigger size limits in the compiler that prevent whole-module optimizations. Set the PLT_CS_COMPILE_LIMIT environment variable to raise the limit, and check 'info logging at the 'linklet topic (e.g., set PLTSTDERR to info@linklet) for information about when compilation is restricted to smaller functions.

The raco demod command accepts these flags:

Changed in version 1.10 of package compiler-lib: Added -M/--compile-any, --work, and support for Racket CS.