Compiling Binaries
Guardian Tcl supports building stand-alone executables containing both the Tcl
interpreter and a Tcl script. This functionality is exposed through the
guardian::compile Tcl command. It is intended to function somewhat like
Tclkits for OG Tcl, but is more limited and based on Jim Tcl with the Guardian
extensions.
- guardian::compile ?-usage? ?-out exe? script ?packages?
- Compile script (the path to a Tcl file, not a Tcl script string) into a standalone executable. If
-outis not specified, the output name is derived from the script name.-usageenables CLI parsing based on Usage specifications embedded in the script. Additional Tcl source files named as packages are included in the compiled executable and can be accessed withpackage require.