5 unstable releases

new 0.3.1 Apr 12, 2024
0.3.0 Apr 11, 2024
0.2.1 Apr 23, 2019
0.2.0 Apr 23, 2019
0.1.0 Apr 18, 2019

#462 in Development tools

Download history 17/week @ 2024-02-24 1/week @ 2024-03-02 27/week @ 2024-03-30 95/week @ 2024-04-06

122 downloads per month

MIT/Apache

15KB
278 lines

RsEPL

RsEPL or RsPL is a cargo subcommand to run a Rust REPL inside your crate.

Example

$ cargo new --lib foo
$ cd foo
$ cargo rspl
foo> foo::add(1, 2)
3

Installation

Install with cargo:

cargo install rsepl

This adds the cargo-rspl binary to your ~/.cargo/bin directory.

Usage

$ cargo rspl

Runs either a regular REPL if not in a crate, or a REPL with the crate's dependencies if in a crate.

Features

Access your crate's methods in a REPL - great for quick testing of functions.

Plus, you get to use dependencies like rand or regex in the REPL.

Drawbacks

Recompiles all previously run lines on every new line, so it's not very fast.

Not as fleshed out as some other REPLs like evcxr.

License

All code in this repository is dual-licensed under either:

at your option. This means you can select the license you prefer.

Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~6–18MB
~234K SLoC