This is an old revision of the document!


Using the REPL

The Relision library provides a generic read, evaluate, print loop (a REPL) that is available through the `relision::repl::Repl` struct. This provides the following services.

  • Loading and saving of command history
  • Reading lines from the prompt with history
  • Detecting and executing commands, including providing help
  • Word wrapping of the output
  • Coloring of error and other message types.

Using Without Saved History

  1. use relision::repl;
  2. fn main() {
  3. let mut repl = repl::Repl::new();
  4. repl.run();
  5. }