From daebc821d763e61b9dc106749c1aee83b9611a8c Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Thu, 1 Jun 2023 15:52:13 +0300 Subject: [PATCH] Document CLI in readme. --- README.md | 10 ++++++++++ src/lib.rs | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 9dc5326..5d8884e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,16 @@ Evalexpr is [available on crates.io](https://crates.io/crates/evalexpr), and its +## CLI + +While primarily meant to be used as a library, `evalexpr` is also available as a command line tool. +It can be installed and used as follows: + +```bash +cargo install evalexpr +evalexpr 2 + 3 # outputs `5` to stdout. +``` + ## Quickstart Add `evalexpr` as dependency to your `Cargo.toml`: diff --git a/src/lib.rs b/src/lib.rs index cd28209..5d27d9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,14 @@ //! +//! ## CLI +//! +//! While primarily meant to be used as a library, `evalexpr` is also available as a command line tool. +//! It can be installed and used as follows: +//! +//! ```bash +//! cargo install evalexpr +//! evalexpr 2 + 3 # outputs `5` to stdout. +//! ``` +//! //! ## Quickstart //! //! Add `evalexpr` as dependency to your `Cargo.toml`: