Make Change. In Rust.
Quickly calculate monetary change for a desired amount, all while benefitting from Rust's speed and safety.
Change.rs provides an easy-to-use CLI (command line interface) to calculate
change directly from the command line. Supports ouputing to stdout
for
results and stderr
for possible errors.
These instructions will get you a copy of the project up and running on your local machine.
Before you get started, make sure you've got rust and cargo installed on your machine. If not, installation via rustup is quick and easy. See the rust website for installation instructions: https://www.rust-lang.org/tools/install
First, clone the repo with git:
git clone https://github.com/umcconnell/changers.git
cd changers
Then, you can run change.rs using cargo:
cargo run <my_amount> examples/coins.txt
... or build a binary:
cargo build --release
Check out the examples folder for some example coin files you can pass.
Happy coding!
changers [amount] [optional: coin_file]
The change.rs CLI accepts two arguments to calculate change:
amount
: The monetary amount to make change forcoin_file
, optional: An optional coin file (see examples folder) containing a list of coins seperated by a newline. If no file is passed, coins are read from stdin.
Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
Ulysse McConnell - umcconnell
See also the list of contributors who participated in this project.
Change.rs is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
A huge thanks goes to the open and welcoming rust community and their great documentation effort.