From a70572383748c962ea006782d40c2267e8a5bed7 Mon Sep 17 00:00:00 2001 From: Avril Date: Tue, 5 Apr 2022 02:59:27 +0100 Subject: [PATCH] Added README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for reverse's current commit: Future blessing − 末吉 --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0177b5a --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# reverse +Collects input, reverses it, then outputs it. + +## Usage +From arguments: +```shell +$ reverse 1 2 3 4 +4 +3 +2 +1 +``` + +From standard input: +```shell +$ find . | reverse +``` +Standard input is read *line by line*, unlike arguments. The two cannot be combined. + +# Build +Requires `rust` and `cargo` installed: +```shell +$ cargo build --release +``` + +The outputted binary will be `./target/release/reverse`. + +## Customise behaviour +There are several compile-time flags. +See [./Cargo.toml](Cargo.toml) for the description of each one. + +To build with custom features: +```shell +$ cargo build --release --no-default-features --features ,... +``` + +# License +Public domain. + +This is a toy project I used to play around with what I could do with slice patterns in Rust.