8.16.0.4

10 Using Racket Tools and Libraries🔗ℹ

The DrRacket programming environment supports Rhombus, and (as noted in Building and Running Rhombus Programs) Racket tools more generally work on Rhombus programs. Racket tools work because Rhombus is built on Racket’s #lang mechanism.

The rhombus executable is a fairly thin wrapper around racket. The rhombus command-line accepts module paths using Rhombus syntax instead of Racket syntax, and it starts an interactive Rhombus session if no starting module is provided. Also, rhombus checks and caches compiled versions of modules by default, whereas racket checks and caches only when the -y flag is used.

Racket provides many libraries and packages that (at the time of writing) have not yet been ported or wrapped for convenient use in Rhombus. A Racket module can be imported into a Rhombus module, and because Racket and Rhombus share many of the same data representations—including functions—the boundary can be relatively seamless, in some cases.

Here are some key techniques for using Racket libraries in Rhombus:

Racket syntactic forms cannot be used from Rhombus, but a Rhombus macro can expand to a use of a Racket syntactic form via expr_meta.pack_s_exp and similar.

For more information, see the Rhombus and Racket Interoperability documentation.