rackup

A toolchain manager for Racket. Install and switch between stable releases, pre-releases, snapshots, old PLT Scheme builds, and local source trees.

curl -fsSL https://samth.github.io/rackup/install.sh | sh

This installs rackup itself. Then run rackup install stable to install Racket. Pass -y for non-interactive mode:

curl -fsSL https://samth.github.io/rackup/install.sh | sh -s -- -y

Or, to verify the install script's checksum before running it:

curl -fsSL -o install.sh https://samth.github.io/rackup/install.sh
echo "2182704d18df578f492a41caaec6cdeaa02b9a104c2243bebaaaa43e02ad1bcb  install.sh" | sha256sum -c -
sh install.sh && rm install.sh

What it manages

Racket has stable releases, historical releases going back to PLT Scheme, pre-release builds, snapshot builds, and local source trees. rackup handles all of them with the same interface.

Stable releases

Current or specific versions.

  • rackup install stable
  • rackup install 8.18
  • rackup install 5.2

Historical

PLT Scheme-era installers.

  • rackup install 4.2.5
  • rackup install 372
  • rackup available 4.

Pre-release and snapshots

From pre-release and snapshot builds.

  • rackup install pre-release
  • rackup install snapshot
  • rackup install snapshot:utah

Local source trees

Link a built-from-source tree.

  • rackup link dev ~/racket
  • Exports scheme and petite too

Switching and shims

When you install a toolchain, rackup creates shims for all of its executables: racket, raco, scribble, slideshow, drracket, and others. The shims go on your PATH, so your shell, editor, and scripts use racket directly.

Switch the active toolchain with rackup default. The first toolchain you install becomes the default automatically.

$ rackup install stable
$ rackup install pre-release
$ rackup default stable
$ racket -e '(displayln (version))'
$ raco pkg install gregor

Quick start by use case

Pick the guide that matches your situation.

New to Racket

Get up and running from scratch.

curl -fsSL https://samth.github.io/rackup/install.sh | sh
rackup install stable
rackup init --shell bash   # or zsh
racket

Existing Racket user

Manage multiple Racket versions side by side.

curl -fsSL https://samth.github.io/rackup/install.sh | sh
rackup install 8.18
rackup install stable
rackup default stable
rackup switch 8.18          # switch in current shell

Racket developer (source builds)

Link your local source tree alongside release builds.

curl -fsSL https://samth.github.io/rackup/install.sh | sh
rackup link dev ~/src/racket
rackup install stable
rackup default dev
rackup switch stable         # try a release build
rackup switch dev            # back to your source tree

Package developer

Test your package across multiple Racket versions.

rackup install stable
rackup install pre-release
rackup install 8.15
rackup run stable -- raco test .
rackup run pre-release -- raco test .
rackup run 8.15 -- raco test .

CI / Docker / automation

Non-interactive setup for scripts and containers.

curl -fsSL https://samth.github.io/rackup/install.sh | sh -s -- -y
rackup install stable --quiet
rackup run stable -- raco test .

Commands

rackup install name Install a toolchain
rackup list List installed toolchains
rackup available List installable toolchains
rackup default name Set the global default toolchain
rackup current Show the active toolchain and its source
rackup switch name Switch the active toolchain in this shell
rackup run name -- cmd Run a command using a specific toolchain
rackup which cmd Show path for a shimmed command
rackup link name path Link a local source tree
rackup upgrade Upgrade channel-based toolchains to latest version
rackup remove name Remove an installed toolchain
rackup prompt Print toolchain info for shell prompt
rackup reshim Rebuild shims from installed toolchains
rackup doctor Print diagnostics
rackup init --shell sh Set up shell integration
rackup self-upgrade Upgrade rackup itself
rackup uninstall Remove rackup and all managed state
rackup version Print version info