Quick Start
Prerequisites
To get started with using shrs, you need a functioning Rust installation. To install Rust, you can use the rustup, the Rust toolchain installer. You will also need cargo, the Rust package manager.
Finally, you will need some basic knowledge on how Rust works, if you are still new to Rust, you can consult the rust book.
Create Cargo project
Create your own shell project using cargo:
cargo new <project-name>
cd <project-name>
Next, add shrs as a dependency in your Cargo.toml
. shrs is still currently in pre-release, so there will be frequent updates. You can use the most recently published version with:
shrs = { version = "0.0.5" }
Otherwise, if you wish to be on the bleeding edge, you can depend directly on the master branch (beware that there may be unexpected bugs and breaking API changes on master):
shrs = { git = "https://github.com/MrPicklePinosaur/shrs" }
Building the Shell
Next, you can create a basic shell using all of the shrs provided defaults with the following:
use shrs::prelude::*;
fn main() {
let myshell = ShellBuilder::default()
.build()
.unwrap();
myshell.run();
}
Now to run the shell
cargo run
From here we can start digging into all the potential configuration and extensions that can be applied to shrs. See the next section for details.