evcxr_repl 0.13.0

A REPL for Rust
Documentation

Evcxr Rust REPL

Latest Version Downloads License

A Rust REPL (Read-Eval-Print loop) built using the evcxr evaluation context.

Installation and Usage

Make sure you've got a recent version of rust installed. Evcxr's dependencies often make use of new Rust features shortly after they're stabilized, so it's not uncommon that the latest release of Evcxr will end up requiring the latest version of rustc.

Before you install the REPL, you must download a local copy of Rust's source code:

$ rustup component add rust-src

Now you can go ahead and install the binary:

$ cargo install evcxr_repl

And start the REPL:

$ evcxr  
Welcome to evcxr. For help, type :help
>> 

Completion Type

Evcxr supports two modes of tab completion:

  • List: When you press tab, it will complete any common prefix shared by all available completions. Pressing tab twice will then list all available completions. This mode is the default.
  • Circular: When you press tab, it will show the first completion. Pressing tab again will cycle through all the available completions, then return to the start. To select this mode, set the environment variable EVCXR_COMPLETION_TYPE=circular.

Usage information

Evcxr is both a REPL and a Jupyter kernel. See Evcxr common usage for usage information that is common to both.

Manual Installation

You can install the REPL manually with git:

$ cargo install --force --git https://github.com/google/evcxr.git evcxr_repl

Similar projects

  • irust. Looks to have quite a sophisticated command line interface. If you don't need variable preservation, this is probably worth checking out.
  • cargo-eval Not interactive, but it gives you a quick way to evaluate Rust code from the command line and/or scripts.
  • rusti. Deprecated since 2019. Also, rusti requires a nightly compiler from 2016 and doesn't appear to persist variable values.
  • Papyrus. Looks like it's no longer maintained.