This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,23 @@
toplevel
--------
The ``toplevel`` stanza allows one to define custom toplevels. Custom toplevels
automatically load a set of specified libraries and are runnable like normal
executables. Example:
.. code:: dune
(toplevel
(name tt)
(libraries str))
This will create a toplevel with the ``str`` library loaded. We may build and
run this toplevel with:
.. code:: console
$ dune exec ./tt.exe
``(preprocess (pps ...))`` is the same as the ``(preprocess (pps ...))`` field
of :doc:`library`. Currently, ``action`` and ``future_syntax`` are not
supported in the toplevel.