Crates.io | cargo-example |
lib.rs | cargo-example |
version | 0.2.1 |
source | src |
created_at | 2019-07-19 03:03:55.1617 |
updated_at | 2019-07-27 08:52:55.796034 |
description | An easy-to-use example runner for rust crates |
homepage | |
repository | https://github.com/BrandtM/cargo-example |
max_upload_size | |
id | 149996 |
size | 522,434 |
cargo-example
is an easy-to-use example runner for rust crates.
cargo-example
aims to provide a simple interface to running examples
of any valid rust crate. Currently there is no short way to do this.
In order to run examples you'll always have to manually clone or download
the repository of the crate whose examples you wish to run.
For newcomers to the rust language the --example
feature of cargo run
might even remain completely unknown for quite some time.
This crate aims to simplify this process. All the messy cloning
is abstracted away from the end user.
cargo install cargo-example
cargo example <crate> ...args
<crate>
is the target crate whose examples you wish to runargs
is a list of arguments that will be forwarded to the exampleJust use cargo run example <crate> ...args
. It has to be done this way due
to the way that
I wouldn't have made this project if it wasn't for the excellent GitHub Project "request-for-implementation" by dtolnay. Specifically this issue.
This entire project is still in its infancy. It might not work for you. But you can help. Just open up a new GitHub issue if you find an error or would like to request a feature or a change.