20 Compilation and Configuration

▼ |  | Guide: Racket

1 | Welcome to Racket
2 | Racket Essentials
3 | Built-In Datatypes
4 | Expressions and Definitions
5 | Programmer-Defined Datatypes
6 | Modules
7 | Contracts
8 | Input and Output
9 | Regular Expressions
10 | Exceptions and Control
11 | Iterations and Comprehensions
12 | Pattern Matching
13 | Classes and Objects
14 | Units (Components)
15 | Reflection and Dynamic Evaluation
16 | Macros
17 | Creating Languages
18 | Performance
19 | Running and Creating Executables
20 | Compilation and Configuration
21 | More Libraries
22 | Dialects of Racket and Scheme
| Bibliography
| Index

top← prev up next →

### 20`` Compilation and Configuration

So far in this guide, we have mainly discussed DrRacket and racket (and gracket). The main additional executable is raco, which is short for “Racket command.” The raco program provides a command-line interface to many additional tools for compiling Racket programs and maintaining a Racket installation.

- raco make compiles Racket source to bytecode.

  For example, if you have a program "take-over-world.rkt" and you’d like to compile it to bytecode, along with all of its dependencies, so that it loads more quickly, then run

  raco make take-over-the-world.rkt

  The bytecode file is written as "take-over-the-world_rkt.zo" in a "compiled" subdirectory; ".zo" is the file suffix for a bytecode file.

- raco setup manages a Racket installation, including manually installed packages.

  For example, if you create your own library collection called "take-over", and you’d like to build all bytecode and documentation for the collection, then run

  raco setup -l take-over

- raco planet manages packages that are normally downloaded automatically, on demand.

  For example, if you’d like to see a list of PLaneT packages that are currently installed, then run

  raco planet show

For more information on raco, see raco: Racket Command-Line Tools.

top← prev up next →