1.2 Bytecode Files
A file "‹name›.‹ext›" is compiled to bytecode that is saved as "compiled/‹name›_‹ext›.zo" relative to the file. As a result, the bytecode file is normally used automatically when "‹name›.‹ext›" is required as a module, since the underlying load/use-compiled operation detects such a bytecode file.
For example, in a directory that contains the following files:
"a.rkt":
#lang racket (require "b.rkt" "c.rkt") (+ b c) "b.rkt":
#lang racket (provide b) (define b 1) "c.rkt":
#lang racket (provide c) (define c 1)
then
raco make a.rkt
triggers the creation of "compiled/a_rkt.zo", "compiled/b_rkt.zo", and "compiled/c_rkt.zo". A subsequent
racket a.rkt
loads bytecode from the generated ".zo" files, paying attention to the ".rkt" sources only to confirm that each ".zo" file has a later timestamp (unless the PLT_COMPILED_FILE_CHECK environment variable is set to exists, in which case the compiled file is used without a timestamp check).
In contrast,
raco make b.rkt c.rkt
would create only "compiled/b_rkt.zo" and "compiled/c_rkt.zo", since neither "b.rkt" nor "c.rkt" imports "a.rkt".