Giter VIP home page Giter VIP logo

cargo-rspl's Introduction

RsEPL

RsEPL or RsPL is a cargo subcommand to run a Rust REPL, with access to your crate.

Works as a regular rust REPL, but if run inside a crate, you can also access your crate's functions and dependencies.

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 and its dependencies available 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.

cargo-rspl's People

Contributors

vonforum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.