9.0.0.5

10.2 Running Rhombus Programs🔗ℹ

A programming environment such as DrRacket (see Editing Rhombus Programs) can run Rhombus programs. To run a module "prog.rhm" at the command line, you can use

rhombus prog.rhm

or

racket prog.rhm

You can get a REPL (read-eval-print loop) with just

rhombus

or

racket -I rhombus

If you installed the Rhombus package after installing Racket, then the rhombus executable may be in a user-specific place, instead of the same place as the racket executable. In case that place is not clear, DrRacket has a Configure Command Line for Racket... item in the Help menu, which may help you set up your path configuration. Alternatively, start racket and evaluate (require setup/dirs) followed by (find-user-console-bin-dir) to see the user-specific path for executables that are installed by packages.

Using the rhombus executable is like using the racket executable with -y, which caches compilation of a module to a "compiled" a subdirectory (and the same for any dependency of the module to run).

Using racket or using rhombus with the -u flag skip a compilation check, but it still uses a cached compilation if available. Skipping the compilation check for a module and its dependencies may significantly reduce start-up time, especially all modules are already compiled. Meanwhile, a module’s compilation does not have to be cached, so always using just racket or always using -u is allowed. Beware, however, of using a cached compilation when a dependency has changed, because the cached compilation may not be compatible with the changed module, and compatibility checks are limited at that level.