336 lines
No EOL
95 KiB
HTML
336 lines
No EOL
95 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=0.8"/><title>18.1 Running Racket or GRacket</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">The Racket Reference</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewselflink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1 </td><td><a href="running-sa.html" class="tocviewselflink" data-pltdoc="x">Running Racket or GRacket</a></td></tr><tr><td align="right">18.2 </td><td><a href="collects.html" class="tocviewlink" data-pltdoc="x">Libraries and Collections</a></td></tr><tr><td align="right">18.3 </td><td><a href="Interactive_Help.html" class="tocviewlink" data-pltdoc="x">Interactive Help</a></td></tr><tr><td align="right">18.4 </td><td><a href="interaction-info.html" class="tocviewlink" data-pltdoc="x">Interaction Configuration</a></td></tr><tr><td align="right">18.5 </td><td><a href="interactive.html" class="tocviewlink" data-pltdoc="x">Interactive Module Loading</a></td></tr><tr><td align="right">18.6 </td><td><a href="debugging.html" class="tocviewlink" data-pltdoc="x">Debugging</a></td></tr><tr><td align="right">18.7 </td><td><a href="compiler.html" class="tocviewlink" data-pltdoc="x">Controlling and Inspecting Compilation</a></td></tr><tr><td align="right">18.8 </td><td><a href="Kernel_Forms_and_Functions.html" class="tocviewlink" data-pltdoc="x">Kernel Forms and Functions</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>18.1 </td><td><a href="running-sa.html" class="tocviewselflink" data-pltdoc="x">Running Racket or GRacket</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1.1 </td><td><a href="running-sa.html#%28part._init-actions%29" class="tocviewlink" data-pltdoc="x">Initialization</a></td></tr><tr><td align="right">18.1.2 </td><td><a href="running-sa.html#%28part._exit-status%29" class="tocviewlink" data-pltdoc="x">Exit Status</a></td></tr><tr><td align="right">18.1.3 </td><td><a href="running-sa.html#%28part._.Init_.Libraries%29" class="tocviewlink" data-pltdoc="x">Init Libraries</a></td></tr><tr><td align="right">18.1.4 </td><td><a href="running-sa.html#%28part._mz-cmdline%29" class="tocviewlink" data-pltdoc="x">Command Line</a></td></tr><tr><td align="right">18.1.5 </td><td><a href="running-sa.html#%28part._configure-runtime%29" class="tocviewlink" data-pltdoc="x">Language Run-<wbr></wbr>Time Configuration</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">18.1.1<tt> </tt></span><a href="running-sa.html#%28part._init-actions%29" class="tocsubseclink" data-pltdoc="x">Initialization</a></td></tr><tr><td><span class="tocsublinknumber">18.1.2<tt> </tt></span><a href="running-sa.html#%28part._exit-status%29" class="tocsubseclink" data-pltdoc="x">Exit Status</a></td></tr><tr><td><span class="tocsublinknumber">18.1.3<tt> </tt></span><a href="running-sa.html#%28part._.Init_.Libraries%29" class="tocsubseclink" data-pltdoc="x">Init Libraries</a></td></tr><tr><td><span class="tocsublinknumber">18.1.4<tt> </tt></span><a href="running-sa.html#%28part._mz-cmdline%29" class="tocsubseclink" data-pltdoc="x">Command Line</a></td></tr><tr><td><span class="tocsublinknumber">18.1.5<tt> </tt></span><a href="running-sa.html#%28part._configure-runtime%29" class="tocsubseclink" data-pltdoc="x">Language Run-<wbr></wbr>Time Configuration</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" id="searchbox" type="text" tabindex="1" placeholder="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "8.6", "../");"/></form> <a href="https://docs.racket-lang.org/index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("8.6");">top</a><span class="tocsettoggle"> <a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright"> <a href="running.html" title="backward to "18 Running Racket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="collects.html" title="forward to "18.2 Libraries and Collections"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""running-sa"">18.1<tt> </tt><a name="(part._running-sa)"></a>Running Racket or GRacket</h4><p>The core Racket run-time system is available in two main variants:</p><ul><li><p>Racket, which provides the primitives libraries on which
|
|
<a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> is implemented. On Unix and Mac
|
|
OS, the executable is called
|
|
<a name="(idx._(gentag._452._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">racket</span>. On Windows, the executable is
|
|
called <a name="(idx._(gentag._453._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">Racket.exe</span>.</p></li><li><p>GRacket, which is a GUI variant of <span class="stt">racket</span> to the degree
|
|
that the system distinguishes them. On Unix, the executable
|
|
is called <a name="(idx._(gentag._454._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">gracket</span>, and single-instance flags
|
|
and X11-related flags are handled and communicated specially to
|
|
the <span class="RktSym">racket/gui/base</span> library. On Windows, the
|
|
executable is called <a name="(idx._(gentag._455._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">GRacket.exe</span>, and it is a
|
|
GUI application (as opposed to a console application) that
|
|
implements single-instance support. On Mac OS, the
|
|
<span class="stt">gracket</span> script launches <a name="(idx._(gentag._456._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">GRacket.app</span>.</p></li></ul><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""init-actions"">18.1.1<tt> </tt><a name="(part._init-actions)"></a>Initialization</h5><p>On start-up, the top-level environment contains no bindings—<wbr></wbr>not even
|
|
<span class="RktSym"><a href="application.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25app%29%29" class="RktStxLink" data-pltdoc="x">#%app</a></span> for function application. Primitive modules with names
|
|
that start with <span class="RktSym">#%</span> are defined, but they are not meant
|
|
for direct use, and the set of such modules can change. For example,
|
|
the <a name="(idx._(gentag._457._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">#%kernel</span> module is eventually used to bootstrap
|
|
the implementation of <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</p><p>The first action of Racket or GRacket is to initialize
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> to the result of
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-paths</a></span><span class="stt"> </span><span class="RktVar">pre-extras</span><span class="stt"> </span><span class="RktVar">extras</span><span class="RktPn">)</span>, where
|
|
<span class="RktVar">pre-extras</span> is normally <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span> and <span class="RktVar">extras</span>
|
|
are extra directory paths provided in order in the command line with
|
|
<span class="nobreak"><span class="stt">-S</span></span>/<span class="nobreak"><span class="stt">--search</span></span>. An executable created from the Racket or
|
|
GRacket executable can embed paths used as <span class="RktVar">pre-extras</span>.</p><p>Racket and GRacket next <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> <a href="running-sa.html#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a>
|
|
and <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Init_Libraries.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a>, respectively, but only if the
|
|
command line does not specify a <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> flag
|
|
(<span class="nobreak"><span class="stt">-t</span></span>/<span class="nobreak"><span class="stt">--require</span></span>, <span class="nobreak"><span class="stt">-l</span></span>/<span class="nobreak"><span class="stt">--lib</span></span>, or
|
|
<span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span>) before any <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>,
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>, or read-eval-print-loop flag (<span class="nobreak"><span class="stt">-e</span></span>/<span class="nobreak"><span class="stt">--eval</span></span>,
|
|
<span class="nobreak"><span class="stt">-f</span></span>/<span class="nobreak"><span class="stt">--load</span></span>, <span class="nobreak"><span class="stt">-r</span></span>/<span class="nobreak"><span class="stt">--script</span></span>, <span class="nobreak"><span class="stt">-m</span></span>/<span class="nobreak"><span class="stt">--main</span></span>,
|
|
or <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>). The initialization library can be changed
|
|
with the <span class="nobreak"><span class="stt">-I</span></span> <a href="running-sa.html#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a>. The
|
|
<span class="RktSym">configure-runtime</span> submodule of the initialization library or the
|
|
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span> property of the initialization library’s
|
|
language is used before the library is instantiated; see
|
|
<a href="running-sa.html#%28part._configure-runtime%29" data-pltdoc="x">Language Run-Time Configuration</a>.</p><p>After potentially loading the initialization module, expression
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s, files <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s, and module <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s are
|
|
executed in the order that they are provided on the command line. If
|
|
any raises an uncaught exception, then the remaining <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s,
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s, and <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s are skipped. If the first
|
|
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> precedes any <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span> or <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span> so that
|
|
the initialization library is skipped, then the <span class="RktSym">configure-runtime</span>
|
|
submodule of the required module or the
|
|
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span> property of the required module’s library
|
|
language is used before the module is instantiated; see
|
|
<a href="running-sa.html#%28part._configure-runtime%29" data-pltdoc="x">Language Run-Time Configuration</a>.</p><p>After running all command-line expressions, files, and modules, Racket
|
|
or GRacket then starts a read-eval-print loop for interactive
|
|
evaluation if no command line flags are provided other than
|
|
<a href="running-sa.html#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration options</span></a>. For Racket, the read-eval-print loop is
|
|
run by calling <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span> from
|
|
<a href="repl-module.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/repl</span></a>. For GRacket, the read-eval-print loop is
|
|
run by calling <span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span> from
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=index.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>. If any command-line argument is
|
|
provided that is not a <a href="running-sa.html#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a>, then the
|
|
read-eval-print-loop is not started, unless the <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>
|
|
flag is provided on the command line to
|
|
specifically re-enable it.</p><p>In addition, just before the read-eval-print loop
|
|
is started, Racket runs <a href="running-sa.html#%28mod-path._racket%2Finteractive%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/interactive</span></a>
|
|
and GRacket runs <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Init_Libraries.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/interactive</span></a>, unless a different
|
|
interactive file is specified in the the installation’s <span class="stt">"config.rktd"</span>
|
|
file found in <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-config-dir%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">find-config-dir</a></span><span class="RktPn">)</span>, or the file <span class="stt">"interactive.rkt"</span>
|
|
is found in <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span>. If the
|
|
<span class="nobreak"><span class="stt">-q</span></span>/<span class="nobreak"><span class="stt">--no-init-file</span></span> flag is specified on the command line,
|
|
then no interactive file is run.</p><p>Finally, before Racket or GRacket exits, it calls the procedure that
|
|
is the current value of <span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._executable-yield-handler%29%29" class="RktValLink" data-pltdoc="x">executable-yield-handler</a></span> in the main
|
|
thread, unless the <span class="nobreak"><span class="stt">-V</span></span>/<span class="nobreak"><span class="stt">--no-yield</span></span> command-line flag is
|
|
specified. Requiring <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=index.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a> sets this parameter call
|
|
<span class="RktPn">(</span><span class="RktSym">racket</span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">yield</span><span class="RktPn">)</span>.</p><p class="SHistory">Changed in version 6.7 of package <span class="stt">base</span>: Run <a href="running-sa.html#%28mod-path._racket%2Finteractive%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/interactive</span></a> file
|
|
rather than directly running <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span>.<br/>Changed in version 6.90.0.30: Run a read-eval-print loop by
|
|
using <a href="repl-module.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/repl</span></a> or <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=index.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>
|
|
instead of <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> or <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Init_Libraries.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""exit-status"">18.1.2<tt> </tt><a name="(part._exit-status)"></a>Exit Status</h5><p>The default exit status for a Racket or GRacket process is non-zero if
|
|
an error occurs during a command-line <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span> (via <span class="nobreak"><span class="stt">-e</span></span>,
|
|
etc.), <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span> (via <span class="nobreak"><span class="stt">-f</span></span>, <span class="nobreak"><span class="stt">-r</span></span>, etc.), or
|
|
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> (via <span class="nobreak"><span class="stt">-l</span></span>, <span class="nobreak"><span class="stt">-t</span></span>, etc.)—<wbr></wbr>or, more generally,
|
|
if the abort handler of the <a href="eval-model.html#%28tech._prompt%29" class="techoutside" data-pltdoc="x"><span class="techinside">prompt</span></a> surrounding those evalutions
|
|
is called—<wbr></wbr>but only when no
|
|
read-eval-print loop is started. Otherwise, the default exit status is
|
|
<span class="RktVal">0</span>.</p><p>In all cases, a call to <span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._exit%29%29" class="RktValLink" data-pltdoc="x">exit</a></span> (when the default <a href="Exiting.html#%28tech._exit._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exit
|
|
handler</span></a> is in place) can end the process with a specific status
|
|
value.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Init_Libraries"">18.1.3<tt> </tt><a name="(part._.Init_.Libraries)"></a><a name="(mod-path._racket/init)"></a><a name="(mod-path._racket/interactive)"></a><a name="(mod-path._racket/language-info)"></a><a name="(mod-path._racket/runtime-config)"></a>Init Libraries</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="running-sa.html#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <a href="https://pkgs.racket-lang.org/package/base" title="Install this package using `raco pkg install base`"><span class="stt">base</span></a></span></td></tr></table></div><div class="SIntrapara">The
|
|
<a href="running-sa.html#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a> library is the default start-up
|
|
library for Racket. It re-exports the
|
|
<a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>, <a href="interactive.html#%28mod-path._racket%2Fenter%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/enter</span></a> and
|
|
<a href="Interactive_Help.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/help</span></a> libraries, and it sets
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span> to use <span class="RktSym"><a href="pretty-print.html#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>.</div></p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="running-sa.html#%28mod-path._racket%2Finteractive%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/interactive</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <a href="https://pkgs.racket-lang.org/package/base" title="Install this package using `raco pkg install base`"><span class="stt">base</span></a></span></td></tr></table></div><div class="SIntrapara">The <a href="running-sa.html#%28mod-path._racket%2Finteractive%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/interactive</span></a> is the default start
|
|
up library when the REPL begins. It is not run if the
|
|
<span class="nobreak"><span class="stt">-q</span></span>/<span class="nobreak"><span class="stt">--no-init-file</span></span> is specified. The interactive
|
|
file can be changed by modifying <span class="RktVal">'</span><span class="RktVal">interactive-file</span> in the
|
|
<span class="stt">"config.rktd"</span> file found in
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-config-dir%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">find-config-dir</a></span><span class="RktPn">)</span>. Alternative, if the file
|
|
<span class="stt">"interactive.rkt"</span> exists in
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span> it is run rather
|
|
than the installation wide interactive module.</div><div class="SIntrapara">The default interactive module starts <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=xrepl&rel=index.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">xrepl</span></a> and
|
|
runs the <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span> file in the users home directory. A
|
|
different interactive file can keep this behavior by
|
|
requiring <a href="running-sa.html#%28mod-path._racket%2Finteractive%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/interactive</span></a>.</div><div class="SIntrapara"><p class="SHistory">Added in version 6.7 of package <span class="stt">base</span>.</p></div></p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="running-sa.html#%28mod-path._racket%2Flanguage-info%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/language-info</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <a href="https://pkgs.racket-lang.org/package/base" title="Install this package using `raco pkg install base`"><span class="stt">base</span></a></span></td></tr></table></div><div class="SIntrapara">The
|
|
<a href="running-sa.html#%28mod-path._racket%2Flanguage-info%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/language-info</span></a> library provides a
|
|
<span class="RktSym">get-info</span> function that takes any value and returns
|
|
another function; the returned function takes a key value and a
|
|
default value, and it returns <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/runtime-config</span><span class="stt"> </span><span class="RktVal">configure</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span><span class="RktVal">)</span> if the key is <span class="RktVal">'</span><span class="RktVal">configure-runtime</span> or the
|
|
default value otherwise.</div></p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span>See also <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=module-runtime-config.html&version=8.6" class="Sq" data-pltdoc="x">Module-Handling Configuration</a> in <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=index.html&version=8.6" class="Sq" data-pltdoc="x">The Racket Guide</a>.</p></blockquote></blockquote></blockquote><p>The vector <span class="RktVal">'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/language-info</span><span class="stt"> </span><span class="RktVal">get-info</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span> is suitable
|
|
for attaching to a module as its language info to get the same
|
|
language information as the <span class="RktSym">racket/base</span> language.</p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="running-sa.html#%28mod-path._racket%2Fruntime-config%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/runtime-config</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <a href="https://pkgs.racket-lang.org/package/base" title="Install this package using `raco pkg install base`"><span class="stt">base</span></a></span></td></tr></table></div><div class="SIntrapara">The
|
|
<a href="running-sa.html#%28mod-path._racket%2Fruntime-config%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/runtime-config</span></a> library provides a
|
|
<span class="RktSym">configure</span> function that takes any value
|
|
and sets <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-as-expression%29%29" class="RktValLink" data-pltdoc="x">print-as-expression</a></span>
|
|
to <span class="RktVal">#t</span>.</div></p><p>The vector <span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/runtime-config</span><span class="stt"> </span><span class="RktVal">configure</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span> is suitable
|
|
as a member of a list of runtime-configuration specification (as
|
|
returned by a module’s language-information function for the key
|
|
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span>) to obtain the same runtime configuration as
|
|
for the <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> language.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""mz-cmdline"">18.1.4<tt> </tt><a name="(part._mz-cmdline)"></a>Command Line</h5><p>The Racket and GRacket executables recognize the following command-line
|
|
flags:</p><ul><li><p>File and expression options:</p><ul><li><p><a name="(idx._(gentag._458._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-e</span></span> <span class="sroman">‹<span style="font-style: italic">expr</span>›</span> or <a name="(idx._(gentag._459._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--eval</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">expr</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s <span class="sroman">‹<span style="font-style: italic">expr</span>›</span>. The results of
|
|
the evaluation are printed via <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p></li><li><p><a name="(idx._(gentag._460._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-f</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._461._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--load</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>; if
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> is <span class="stt">"-"</span>, then expressions are read and
|
|
evaluated from standard input.</p></li><li><p><a name="(idx._(gentag._462._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._463._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--require</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>, and then
|
|
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._file%29%29" class="RktStxLink" data-pltdoc="x">file</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._464._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-l</span></span> <span class="sroman">‹<span style="font-style: italic">path</span>›</span> or <a name="(idx._(gentag._465._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--lib</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">path</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span>, and then <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._466._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-p</span></span> <span class="sroman">‹<span style="font-style: italic">package</span>›</span> :
|
|
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">package</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span>,
|
|
and then
|
|
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">package</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._467._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-r</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._468._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--script</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>
|
|
<span class="refelem"><span class="refcolumn"><span class="refcontent">Despite its name, <span class="nobreak"><span class="stt">--script</span></span> is not usually
|
|
used for Unix scripts. See <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=scripts.html&version=8.6" class="Sq" data-pltdoc="x">Scripts</a> for more
|
|
information on scripts.</span></span></span>
|
|
as a script. This flag is like <span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> plus
|
|
<span class="nobreak"><span class="stt">-N</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> to set the program name and <span class="nobreak"><span class="stt">--</span></span>
|
|
to cause all further command-line elements to be treated as
|
|
non-flag arguments.</p></li><li><p><a name="(idx._(gentag._469._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-u</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._470._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--require-script</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span> as a script;
|
|
This flag is like <span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> plus <span class="nobreak"><span class="stt">-N</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> to set the program name and <span class="nobreak"><span class="stt">--</span></span> to cause
|
|
all further command-line elements to be treated as non-flag
|
|
arguments.</p></li><li><p><a name="(idx._(gentag._471._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-k</span></span> <span class="sroman">‹<span style="font-style: italic">n</span>›</span> <span class="sroman">‹<span style="font-style: italic">m</span>›</span> <span class="sroman">‹<span style="font-style: italic">p</span>›</span> : Loads code
|
|
embedded in the executable from file position <span class="sroman">‹<span style="font-style: italic">n</span>›</span> to
|
|
<span class="sroman">‹<span style="font-style: italic">m</span>›</span> and from <span class="sroman">‹<span style="font-style: italic">m</span>›</span> to <span class="sroman">‹<span style="font-style: italic">p</span>›</span>. (On Mac OS,
|
|
<span class="sroman">‹<span style="font-style: italic">n</span>›</span>, <span class="sroman">‹<span style="font-style: italic">m</span>›</span>, and <span class="sroman">‹<span style="font-style: italic">p</span>›</span> are relative to a
|
|
<span class="stt">__PLTSCHEME</span> segment in the executable. On Windows,
|
|
they are relative to a resource of type 257 and ID 1. On Unix
|
|
using ELF, they are relative to the <span class="stt">.rackprog</span> segment
|
|
in the executable.) The first range
|
|
is loaded in every new <a href="places.html#%28tech._place%29" class="techoutside" data-pltdoc="x"><span class="techinside">place</span></a>, and any modules declared
|
|
in that range are considered predefined in the sense of
|
|
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-predefined~3f%29%29" class="RktValLink" data-pltdoc="x">module-predefined?</a></span>. This option is normally embedded
|
|
in a stand-alone binary that also embeds Racket code.</p></li><li><p><a name="(idx._(gentag._472._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-Y</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> <span class="sroman">‹<span style="font-style: italic">n</span>›</span> <span class="sroman">‹<span style="font-style: italic">m</span>›</span> <span class="sroman">‹<span style="font-style: italic">p</span>›</span> :
|
|
Like <span class="nobreak"><span class="stt">-k</span></span> <span class="sroman">‹<span style="font-style: italic">n</span>›</span> <span class="sroman">‹<span style="font-style: italic">m</span>›</span> <span class="sroman">‹<span style="font-style: italic">p</span>›</span>, but reading
|
|
from <span class="sroman">‹<span style="font-style: italic">file</span>›</span> (without any adjustment
|
|
for a segment or resource offset).</p></li><li><p><a name="(idx._(gentag._473._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-m</span></span> or <a name="(idx._(gentag._474._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--main</span></span> : Evaluates a call to
|
|
<span class="RktSym">main</span> as bound in the top-level environment. All
|
|
of the command-line arguments that are not processed as
|
|
options (i.e., the arguments put into
|
|
<span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._current-command-line-arguments%29%29" class="RktValLink" data-pltdoc="x">current-command-line-arguments</a></span>) are passed as
|
|
arguments to <span class="RktSym">main</span>. The results of the call are
|
|
printed via <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p><p>The call to <span class="RktSym">main</span> is constructed as an
|
|
expression <span class="RktPn">(</span><span class="RktSym">main</span><span class="stt"> </span><span class="RktVar">arg-str</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> where the lexical context of the expression gives
|
|
<span class="RktSym">#%app</span> and <span class="RktSym">#%datum</span> bindings as
|
|
<span class="RktSym"><a href="application.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-app%29%29" class="RktStxLink" data-pltdoc="x">#%plain-app</a></span> and <span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._~23~25datum%29%29" class="RktStxLink" data-pltdoc="x">#%datum</a></span>, but the lexical
|
|
context of <span class="RktSym">main</span> is the top-level environment.</p></li></ul></li><li><p>Interaction options:</p><ul><li><p><a name="(idx._(gentag._475._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-i</span></span> or <a name="(idx._(gentag._476._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--repl</span></span> : Runs an interactive read-eval-print
|
|
loop, using either <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span> (Racket) or
|
|
<span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span> (GRacket) after showing
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._banner%29%29" class="RktValLink" data-pltdoc="x">banner</a></span><span class="RktPn">)</span> and loading <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span>. In the case of Racket, <span class="RktPn">(</span><span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span><span class="RktPn">)</span>
|
|
is followed by <span class="RktPn">(</span><span class="RktSym"><a href="Byte_and_String_Output.html#%28def._%28%28quote._~23~25kernel%29._newline%29%29" class="RktValLink" data-pltdoc="x">newline</a></span><span class="RktPn">)</span>. For GRacket, supply the <span class="nobreak"><span class="stt">-z</span></span>/<span class="nobreak"><span class="stt">--text-repl</span></span>
|
|
configuration option to use <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span> (and <span class="RktSym"><a href="Byte_and_String_Output.html#%28def._%28%28quote._~23~25kernel%29._newline%29%29" class="RktValLink" data-pltdoc="x">newline</a></span>)
|
|
instead of <span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span>.</p></li><li><p><a name="(idx._(gentag._477._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-n</span></span> or <a name="(idx._(gentag._478._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-lib</span></span> : Skips requiring the
|
|
initialization library (i.e., <a href="running-sa.html#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a> or
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Init_Libraries.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a>, unless it is changed with the
|
|
<span class="nobreak"><span class="stt">-I</span></span> flag) when not otherwise disabled.</p></li><li><p><a name="(idx._(gentag._479._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-v</span></span> or <a name="(idx._(gentag._480._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--version</span></span> : Shows
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._banner%29%29" class="RktValLink" data-pltdoc="x">banner</a></span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._481._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-K</span></span> or <a name="(idx._(gentag._482._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--back</span></span> : GRacket, Mac OS only;
|
|
leave application in the background.</p></li><li><p><a name="(idx._(gentag._483._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-V</span></span> <a name="(idx._(gentag._484._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-yield</span></span> : Skips final
|
|
<span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._executable-yield-handler%29%29" class="RktValLink" data-pltdoc="x">executable-yield-handler</a></span> action, which normally waits until all
|
|
frames are closed, etc<span class="Sendabbrev">.</span> in the main <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=windowing-overview.html%23%2528tech._eventspace%2529&version=8.6" class="techoutside Sq" data-pltdoc="x"><span class="techinside">eventspace</span></a> before
|
|
exiting for programs that use <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=index.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>.</p></li></ul></li><li><p><a name="(tech._configuration._option)"></a><span style="font-style: italic">Configuration options</span>:</p><ul><li><p><a name="(idx._(gentag._485._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-y</span></span> or <a name="(idx._(gentag._486._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--make</span></span> : Enables automatic
|
|
generation and update of compiled <span class="stt">".zo"</span> files for
|
|
modules loaded in the initial namespace. Specifically, the
|
|
result of
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=API_for_Making_Bytecode.html%23%2528def._%2528%2528lib._compiler%252Fcm..rkt%2529._make-compilation-manager-load%252Fuse-compiled-handler%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">make-compilation-manager-load/use-compiled-handler</a></span><span class="RktPn">)</span>
|
|
is installed as the <a href="eval.html#%28tech._compiled._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">compiled-load handler</span></a> before other
|
|
module-loading actions. <span style="font-weight: bold">Caution:</span> This flag is intended
|
|
for use in interactive settings; using it in a script is
|
|
probably a bad idea, because concurrent invocations of the
|
|
script may collide attempting to update compiled files, or
|
|
there may be filesystem-permission issues. Using
|
|
<a name="(idx._(gentag._487._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-c</span></span>/<a name="(idx._(gentag._488._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-compiled</span></span> cancels the effect of
|
|
<a name="(idx._(gentag._489._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-y</span></span>/<a name="(idx._(gentag._490._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--make</span></span>.</p></li><li><p><a name="(idx._(gentag._491._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-c</span></span> or <a name="(idx._(gentag._492._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-compiled</span></span> : Disables loading
|
|
of compiled <span class="stt">".zo"</span> files, by initializing
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._use-compiled-file-paths%29%29" class="RktValLink" data-pltdoc="x">use-compiled-file-paths</a></span> to <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span>.
|
|
Use judiciously: this effectively ignores the content of all
|
|
<span class="stt">"compiled"</span> subdirectories, so that any used modules are
|
|
compiled on the fly—<wbr></wbr>even <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> and
|
|
its dependencies—<wbr></wbr>which leads to prohibitively expensive
|
|
run times.</p></li><li><p><a name="(idx._(gentag._493._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-q</span></span> or <a name="(idx._(gentag._494._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-init-file</span></span> : Skips loading
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span> for
|
|
<span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>.</p></li><li><p><a name="(idx._(gentag._495._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-z</span></span> or <a name="(idx._(gentag._496._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--text-repl</span></span> : GRacket only; changes
|
|
<span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span> to use
|
|
<span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._textual-read-eval-print-loop%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">textual-read-eval-print-loop</a></span> instead of
|
|
<span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span>.</p></li><li><p><a name="(idx._(gentag._497._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-I</span></span> <span class="sroman">‹<span style="font-style: italic">path</span>›</span> : Sets <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span> as the path to <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> to initialize
|
|
the namespace, unless namespace initialization is disabled. Using
|
|
this flag can effectively set the language for the read-eval-print
|
|
loop and other top-level evaluation.</p></li><li><p><a name="(idx._(gentag._498._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-X</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._499._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--collects</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> as the path to the main
|
|
collection of libraries by making <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span> produce <span class="sroman">‹<span style="font-style: italic">dir</span>›</span>. If <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> is an
|
|
empty string, then <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span>
|
|
returns <span class="stt">"."</span>, but
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> is initialized to
|
|
the empty list, and <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValLink" data-pltdoc="x">use-collection-link-paths</a></span> is
|
|
initialized to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._500._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-S</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._501._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--search</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Adds <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> to the default library
|
|
collection search path after the main collection directory. If
|
|
the <span class="nobreak"><span class="stt">-S</span></span>/<span class="nobreak"><span class="stt">--dir</span></span> flag is supplied multiple times, the
|
|
search order is as supplied.</p></li><li><p><a name="(idx._(gentag._502._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-G</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._503._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--config</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets the directory that is returned by
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">config-dir</span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._504._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-A</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._505._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--addon</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets the directory that is returned by
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._506._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-U</span></span> or <a name="(idx._(gentag._507._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-user-path</span></span> : Omits
|
|
user-specific paths in the search for collections, C
|
|
libraries, etc. by initializing the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> parameter to
|
|
<span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._508._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-A</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._509._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--addon</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets the directory that is returned by
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._510._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-R</span></span> <span class="sroman">‹<span style="font-style: italic">paths</span>›</span> or <a name="(idx._(gentag._511._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--compiled</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">paths</span>›</span> : Sets the initial value of the
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compiled-file-roots%29%29" class="RktValLink" data-pltdoc="x">current-compiled-file-roots</a></span> parameter, overriding
|
|
any <span class="stt">PLTCOMPILEDROOTS</span> setting. The <span class="sroman">‹<span style="font-style: italic">paths</span>›</span>
|
|
argument is parsed in the same way as <span class="stt">PLTCOMPILEDROOTS</span>
|
|
(see <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compiled-file-roots%29%29" class="RktValLink" data-pltdoc="x">current-compiled-file-roots</a></span>).</p></li><li><p><a name="(idx._(gentag._512._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-C</span></span> or <a name="(idx._(gentag._513._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--cross</span></span> : Select cross-platform
|
|
build mode, causing <span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._system-type%29%29" class="RktValLink" data-pltdoc="x">system-type</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">cross</span><span class="RktPn">)</span> to report
|
|
<span class="RktVal">'</span><span class="RktVal">force</span>, and sets the current configuration of
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">config-dir</span><span class="RktPn">)</span> and
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span> to be the results of
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">host-config-dir</span><span class="RktPn">)</span> and
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">host-collects-dir</span><span class="RktPn">)</span>, respectively.
|
|
If <a name="(idx._(gentag._514._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-C</span></span> or <a name="(idx._(gentag._515._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--cross</span></span> is provided multiple
|
|
times, only the first instance has an effect.</p></li><li><p><a name="(idx._(gentag._516._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-N</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._517._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--name</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : sets the name of the executable as reported
|
|
by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">run-file</span><span class="RktPn">)</span> to
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span>.</p></li><li><p><a name="(idx._(gentag._518._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-E</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._519._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--exe</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : sets the name of the executable as reported
|
|
by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">exec-file</span><span class="RktPn">)</span> to
|
|
<span class="sroman">‹<span style="font-style: italic">file</span>›</span>.</p></li><li><p><a name="(idx._(gentag._520._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-J</span></span> <span class="sroman">‹<span style="font-style: italic">name</span>›</span> or <a name="(idx._(gentag._521._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--wm-class</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">name</span>›</span> : GRacket, Unix only; sets the <span class="stt">WM_CLASS</span>
|
|
program class to <span class="sroman">‹<span style="font-style: italic">name</span>›</span> (while the <span class="stt">WM_CLASS</span>
|
|
program name is derived from the executable name or a
|
|
<span class="nobreak"><span class="stt">-N</span></span>/<span class="nobreak"><span class="stt">--name</span></span> argument).</p></li><li><p><a name="(idx._(gentag._522._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-j</span></span> or <a name="(idx._(gentag._523._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-jit</span></span> : Disables the
|
|
native-code just-in-time compiler by setting the
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval-jit-enabled%29%29" class="RktValLink" data-pltdoc="x">eval-jit-enabled</a></span> parameter to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._524._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-M</span></span> or <a name="(idx._(gentag._525._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--compile-any</span></span> : Enables
|
|
machine-independent bytecode by setting the
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compile-target-machine%29%29" class="RktValLink" data-pltdoc="x">current-compile-target-machine</a></span> parameter to
|
|
<span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._526._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-d</span></span> or <a name="(idx._(gentag._527._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-delay</span></span> : Disables on-demand
|
|
parsing of compiled code and syntax objects by setting the
|
|
<span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="RktValLink" data-pltdoc="x">read-on-demand-source</a></span> parameter to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._528._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-b</span></span> or <a name="(idx._(gentag._529._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--binary</span></span> : Requests binary mode,
|
|
instead of text mode, for the process’s input, out, and error
|
|
ports. This flag currently has no effect, because binary mode
|
|
is always used.</p></li><li><p><a name="(idx._(gentag._530._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-W</span></span> <span class="sroman">‹<span style="font-style: italic">levels</span>›</span> or <a name="(idx._(gentag._531._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--warn</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">levels</span>›</span> : Sets the logging level for writing events to
|
|
the original error port. The possible <span class="sroman">‹<span style="font-style: italic">level</span>›</span> values
|
|
are the same as for the <span class="stt">PLTSTDERR</span> environment
|
|
variable. See <a href="logging.html" data-pltdoc="x">Logging</a> for more information.</p></li><li><p><a name="(idx._(gentag._532._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-O</span></span> <span class="sroman">‹<span style="font-style: italic">levels</span>›</span> or <a name="(idx._(gentag._533._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--stdout</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">levels</span>›</span> : Sets the logging level for writing events to
|
|
the original output port. The possible <span class="sroman">‹<span style="font-style: italic">level</span>›</span> values
|
|
are the same as for the <span class="stt">PLTSTDOUT</span> environment
|
|
variable. See <a href="logging.html" data-pltdoc="x">Logging</a> for more information.</p></li><li><p><a name="(idx._(gentag._534._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-L</span></span> <span class="sroman">‹<span style="font-style: italic">levels</span>›</span> or <a name="(idx._(gentag._535._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--syslog</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">levels</span>›</span> : Sets the logging level for writing events to
|
|
the system log. The possible <span class="sroman">‹<span style="font-style: italic">level</span>›</span> values
|
|
are the same as for the <span class="stt">PLTSYSLOG</span> environment
|
|
variable. See <a href="logging.html" data-pltdoc="x">Logging</a> for more information.</p></li></ul></li><li><p>Meta options:</p><ul><li><p><a name="(idx._(gentag._536._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-Z</span></span> : The argument following this flag is ignored.
|
|
This flag can be handy in some impoverished scripting environments
|
|
to replace or cancel another command-line argument.</p></li><li><p><a name="(idx._(gentag._537._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--</span></span> : No argument following this flag is itself used
|
|
as a flag.</p></li><li><p><a name="(idx._(gentag._538._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-h</span></span> or <a name="(idx._(gentag._539._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--help</span></span> : Shows information about
|
|
the command-line flags and start-up process and exits,
|
|
ignoring all other flags.</p></li></ul></li></ul><p>If at least one command-line argument is provided, and if the first
|
|
one after any <a href="running-sa.html#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a> is not a flag, then a
|
|
<span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span> flag is implicitly added before the
|
|
first non-flag argument.</p><p>If no command-line arguments are supplied other than
|
|
<a href="running-sa.html#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration options</span></a>, then the <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span> flag is
|
|
effectively added.</p><p>For GRacket on Unix, the follow flags are recognized when they appear
|
|
at the beginning of the command line, and they count as configuration
|
|
options (i.e., they do not disable the read-eval-print loop or prevent
|
|
the insertion of <span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span>):</p><ul><li><p><a name="(idx._(gentag._540._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-display</span></span> <span class="sroman">‹<span style="font-style: italic">display</span>›</span> : Sets the X11 display
|
|
to use.</p></li><li><p><a name="(idx._(gentag._541._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-geometry</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._542._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-bg</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._543._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-background</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
|
|
<a name="(idx._(gentag._544._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-fg</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._545._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-foreground</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._546._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-fn</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._547._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-font</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._548._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-iconic</span></span>, <a name="(idx._(gentag._549._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-name</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._550._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-rv</span></span>, <a name="(idx._(gentag._551._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-reverse</span></span>,
|
|
<a name="(idx._(gentag._552._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">+rv</span></span>, <a name="(idx._(gentag._553._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-selectionTimeout</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
|
|
<a name="(idx._(gentag._554._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-synchronous</span></span>, <a name="(idx._(gentag._555._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-title</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
|
|
<a name="(idx._(gentag._556._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-xnllanguage</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, or <a name="(idx._(gentag._557._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-xrm</span></span>
|
|
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span> : Standard X11 arguments that are mostly ignored
|
|
but accepted for compatibility with other X11 programs. The
|
|
<span class="nobreak"><span class="stt">-synchronous</span></span> flag behaves in the usual
|
|
way.</p></li><li><p><a name="(idx._(gentag._558._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-singleInstance</span></span> : If an existing GRacket is already
|
|
running on the same X11 display, if it was started on a
|
|
machine with the same hostname, and if it was started with the
|
|
same name as reported by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">run-file</span><span class="RktPn">)</span>—<wbr></wbr>possibly set with the <span class="nobreak"><span class="stt">-N</span></span>/<span class="nobreak"><span class="stt">--name</span></span>
|
|
command-line argument—<wbr></wbr>then all non-option command-line
|
|
arguments are treated as filenames and sent to the existing
|
|
GRacket instance via the application file handler (see
|
|
<span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._application-file-handler%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">application-file-handler</a></span>).</p></li></ul><p>Similarly, on Mac OS, a leading switch starting with
|
|
<a name="(idx._(gentag._559._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-psn_</span></span> is treated as a special configuration option. It
|
|
indicates that Finder started the application, so the current input,
|
|
output, and error output are redirected to a GUI window.</p><p>Multiple single-letter switches (the ones preceded by a single
|
|
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">-</span><span class="hspace"></span></span>) can be collapsed into a single switch by concatenating
|
|
the letters, as long as the first switch is not <span class="nobreak"><span class="stt">--</span></span>. The
|
|
arguments for each switch are placed after the collapsed switches (in
|
|
the order of the switches). For example,</p><p><span class="hspace"> </span><span class="stt">-ifve </span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="stt"> </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span></p><p>and</p><p><span class="hspace"> </span><span class="stt">-i -f </span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="stt"> -v -e </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span></p><p>are equivalent. If a collapsed <span class="nobreak"><span class="stt">--</span></span> appears before other collapsed
|
|
switches in the same collapsed set, it is implicitly moved to the end
|
|
of the collapsed set.</p><p>Extra arguments following the last option are available from the
|
|
<a name="(idx._(gentag._560._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._current-command-line-arguments%29%29" class="RktValLink" data-pltdoc="x">current-command-line-arguments</a></span> parameter.</p><p class="SHistory">Changed in version 6.90.0.17 of package <span class="stt">base</span>: Added <span class="nobreak"><span class="stt">-O</span></span>/<span class="nobreak"><span class="stt">--stdout</span></span>.<br/>Changed in version 7.1.0.5: Added <span class="nobreak"><span class="stt">-M</span></span>/<span class="nobreak"><span class="stt">--compile-any</span></span>.<br/>Changed in version 7.8.0.6: Added <span class="nobreak"><span class="stt">-Z</span></span>.<br/>Changed in version 8.0.0.10: Added <span class="nobreak"><span class="stt">-E</span></span>.<br/>Changed in version 8.0.0.11: Added <span class="nobreak"><span class="stt">-Y</span></span>.<br/>Changed in version 8.4.0.1: Added <span class="nobreak"><span class="stt">-y</span></span>/<span class="nobreak"><span class="stt">--make</span></span>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""configure-runtime"">18.1.5<tt> </tt><a name="(part._configure-runtime)"></a>Language Run-Time Configuration</h5><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span>See also <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=module-runtime-config.html&version=8.6" class="Sq" data-pltdoc="x">Module-Handling Configuration</a> in <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=index.html&version=8.6" class="Sq" data-pltdoc="x">The Racket Guide</a>.</p></blockquote></blockquote></blockquote><p>A module can have a <span class="RktSym">configure-runtime</span> submodule that is
|
|
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>d before the module itself when a module is
|
|
the main module of a program. Normally, a <span class="RktSym">configure-runtime</span>
|
|
submodule is added to a module by the module’s language (i.e., by the
|
|
<span class="RktSym"><a href="module.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%module-begin</a></span> form among a <span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>’s initial
|
|
bindings). The body of a <span class="RktSym">configure-runtime</span> submodule
|
|
typically sets parameters, possibly including
|
|
<span class="RktSym"><a href="interaction-info.html#%28def._%28%28lib._racket%2Finteraction-info..rkt%29._current-interaction-info%29%29" class="RktValLink" data-pltdoc="x">current-interaction-info</a></span>.</p><p>Alternatively or in addition, an older protocol is in place.
|
|
When a module is implemented using <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a>, the language after
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> can specify configuration actions to perform when a
|
|
module using the language is the main module of a program. The
|
|
language specifies run-time configuration by</p><ul><li><p>attaching a <span class="RktVal">'</span><span class="RktVal">module-language</span> <a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> to
|
|
the module as read from its source (see <span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and
|
|
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-compiled-language-info%29%29" class="RktValLink" data-pltdoc="x">module-compiled-language-info</a></span>);</p></li><li><p>having the function indicated by the <span class="RktVal">'</span><span class="RktVal">module-language</span>
|
|
<a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> recognize the
|
|
<a name="(idx._(gentag._561._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">configure-runtime</span> key, for which it returns a list of
|
|
vectors; each vector must have the form <span class="RktPn">(</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector%29%29" class="RktValLink" data-pltdoc="x">vector</a></span><span class="stt"> </span><span class="RktVar">mp</span><span class="stt"> </span><span class="RktVar">name</span><span class="stt"> </span><span class="RktVar">val</span><span class="RktPn">)</span> where <span class="RktVar">mp</span> is a <a href="Module_Names_and_Loading.html#%28tech._module._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path</span></a>,
|
|
<span class="RktVar">name</span> is a symbol, and <span class="RktVar">val</span> is an arbitrary
|
|
value; and</p></li><li><p>having each function called as <span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span><span class="stt"> </span><span class="RktVar">mp</span><span class="stt"> </span><span class="RktVar">name</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">val</span><span class="RktPn">)</span> configure the run-time environment, typically by
|
|
setting parameters such as <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p></li></ul><p>A <span class="RktVal">'</span><span class="RktVal">configure-runtime</span> query returns a list of vectors, instead
|
|
of directly configuring the environment, so that the indicated modules
|
|
to be bundled with a program when creating a stand-alone executable;
|
|
see <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=exe.html&version=8.6" class="Sq" data-pltdoc="x"><span class="stt">raco exe</span>: Creating Stand-Alone Executables</a> in
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=index.html&version=8.6" class="Sq" data-pltdoc="x"><span class="stt">raco</span>: Racket Command-Line Tools</a>.</p><p>For information on defining a new <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> language, see
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=syntax&rel=reader-helpers.html%23%2528mod-path._syntax%252Fmodule-reader%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">syntax/module-reader</span></a>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" id="searchbox" type="text" tabindex="1" placeholder="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "8.6", "../");"/></form> <a href="https://docs.racket-lang.org/index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("8.6");">top</a><span class="tocsettoggle"> <a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright"> <a href="running.html" title="backward to "18 Running Racket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="collects.html" title="forward to "18.2 Libraries and Collections"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html> |