RUSTI(1)

NAME
rusti - Rust interactive shell

SYNOPSIS
rusti

DESCRIPTION
This program is a REPL (Read-Eval-Print Loop) for the Rust language, available at <https://www.rust-lang.org>. It provides an interactive shell to evaluate Rust expressions, functions and code snippets, and to experiment with Rust code. WARNING: The Rust REPL is experimental and may be unstable. If you encounter problems, please use the compiler instead.

OPTIONS
Currently none.

SPECIAL COMMANDS
The interactive shell evaluates all input as a sequence of Rust expressions, except for a set of special commands prefixed by a colon ':'. These special commands are described below:

:help
    Display a summary of available commands.

:{\n ..lines.. \n:}\n
    execute multiline command

:load <crate> ...
    loads given crates as dynamic libraries

:clear
    clear the bindings

:exit
    exit from the repl

EXAMPLES
A simple example session, declaring a variable, defining a function, evaluating an expression and printing the result:

	rusti> let x = 42;
	rusti> fn square(n: int) -> int { n*n }
	rusti> println(fmt!("%d squared is %d", x, square(x)));
	42 squared is 1764

SEE ALSO
rust, rustc, rustdoc, rustpkg

BUGS
See <https://github.com/mozilla/rust/issues> for issues.

AUTHOR
See AUTHORS.txt in the rust source distribution. Graydon Hoare <graydon@mozilla.com> is the project leader.

COPYRIGHT
This work is dual-licensed under Apache 2.0 and MIT terms. See COPYRIGHT file in the rust source distribution.