Lib Runner
Rust package to assist runners in planning workouts, completing races, and improving health.
Usage
Let's go through these quick steps to get started with LibRunner:
-
visit https://rustup.rs and install rustup, an installer for the programming language Rust. Once installed, update and check the toolchain:
$ rustup update $ rustc --version $ cargo --version
-
create your new running application:
$ cargo new runningapp
-
a folder called
runningapp
is created. Go into it and run the project:$ cd runningapp $ cargo run
-
it prints "Hello World", meaning you have a working code to start from. Open the project in your favourite code editor and make two changes:
4.1. add LibRunner to the project's dependencies:
$ cargo add librunner
It adds a new dependency to your
Cargo.toml
file:[] = "0.6.0"
4.2. replace the content of the file
src/main.rs
with the code below:use Duration; use ; use converter; use formatter;
-
then run the project again:
$ cargo run
which generates the following output:
The pace to run 42.195km in 04:00:00h is approximately 05.41/km at 10.55km/h The pace to run 26.2 miles in 04:00:00h is approximately 09.09/mile at 11.53mph