nutmegc and nutmeg - Spicery/Nutmeg GitHub Wiki
After you have installed Nutmeg, two new commands are available to you: nutmegc and nutmeg. These are the compiler and runner respectively. The typical way of using these commands looks like this:
nutmegc myprog.bundle file1.nutmeg file2.nutmeg # run the compiler to create the bundle file
nutmeg myprog.bundle # run the bundle fileThe nutmeg command can optionally be followed by a subcommand-option which may be one of the following. Note that the nutmegc command is the same as nutmeg compile and that nutmeg run is the default.
-
nutmeg compile- Compiles nutmeg files to produce a bundle-file. -
nutmeg help <subcommand>- Prints out help for a subcommand or lists subcommands if none given. -
nutmeg run- Runs a named bundle-file, the default. (Default: use this if there is no command-option.) -
nutmeg script- Compiles nutmeg files into a temporary bundle-file and immediately runs it -
nutmeg unittest- Runs the unit-tests contained by a bundle-file.
Nutmeg developers will also be interested in being able to run individual compiler phases using these less common subcommands:
-
nutmeg parse- Parses nutmeg source code to generate a tree -
nutmeg resolve- Annotates a tree with scope information -
nutmeg optimize- Transforms a tree to improve performance -
nutmeg codegen- Transforms a tree into back-end code -
nutmeg bundle- Adds trees into the bundle file -
nutmeg trace- Infers dependencies for entry-points