Skip to content

Commit

Permalink
Move installation details around
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed May 11, 2023
1 parent 06cc720 commit 1d77614
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 41 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
v0.4.0 (in development)
-----------------------
- Added `asynchronous` category to crate metadata
- Remove installation instructions from README
- List all features in the library documentation

v0.3.0 (2023-04-22)
-------------------
Expand Down
38 changes: 5 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![CI Status](https://github.com/jwodder/patharg/actions/workflows/test.yml/badge.svg)](https://github.com/jwodder/patharg/actions/workflows/test.yml)
[![codecov.io](https://codecov.io/gh/jwodder/patharg/branch/master/graph/badge.svg)](https://codecov.io/gh/jwodder/patharg)
[![Minimum Supported Rust Version](https://img.shields.io/badge/MSRV-1.65-orange)](https://www.rust-lang.org)
[![MIT License](https://img.shields.io/github/license/jwodder/patharg.svg)](https://opensource.org/licenses/MIT)

[GitHub](https://github.com/jwodder/patharg) | [crates.io](https://crates.io/crates/patharg) | [Documentation](https://docs.rs/patharg) | [Issues](https://github.com/jwodder/patharg/issues) | [Changelog](https://github.com/jwodder/patharg/blob/master/CHANGELOG.md)
Expand Down Expand Up @@ -35,37 +36,6 @@ out there. The source repository contains examples of two of these:
[revchars]: https://github.com/jwodder/patharg/blob/master/examples/revchars.rs
[tokio-revchars]: https://github.com/jwodder/patharg/blob/master/examples/tokio-revchars.rs

Installation
============

`patharg` requires version 1.65 of Rust or higher. To use the `patharg`
library in your Cargo project, add the following to your `Cargo.toml`:

```toml
[dependencies]
patharg = "0.3.0"
```

`patharg` has an optional `tokio` feature for enabling async I/O support with
[`tokio`][]. To use this in your project, add the following instead:

```toml
[dependencies]
patharg = { version = "0.3.0", features = ["tokio"] }
```

`patharg` also has an optional `serde` feature for enabling serializing &
deserializing `InputArg` & `OutputArg` values with [`serde`]. To use this in
your project, add the following instead:

```toml
[dependencies]
patharg = { version = "0.3.0", features = ["serde"] }
```

[`tokio`]: https://crates.io/crates/tokio
[`serde`]: https://crates.io/crates/serde

Comparison with clio
====================

Expand All @@ -84,9 +54,11 @@ between the libraries include:
- `clio` supports reading from & writing to HTTP(S) URLs and has special
treatment for FIFOs. `patharg` sees no need for such excesses.

- `patharg` has a feature for allowing async I/O with `tokio`. `clio` does
- `patharg` has a feature for allowing async I/O with [`tokio`][]. `clio` does
not.

- `patharg` has optional support for `serde`. `clio` does not.
- `patharg` has optional support for [`serde`][]. `clio` does not.

[`clio`]: https://crates.io/crates/clio
[`tokio`]: https://crates.io/crates/tokio
[`serde`]: https://crates.io/crates/serde
14 changes: 6 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
//! Treat "-" (hyphen/dash) arguments as stdin/stdout
//!
//! Most CLI commands that take file paths as arguments follow the convention
//! of treating a path of `-` (a single hyphen/dash) as referring to either
//! standard input or standard output (depending on whether the path is read
Expand Down Expand Up @@ -36,14 +34,14 @@
//! The `patharg` crate has the following optional features. None of them are
//! enabled by default.
//!
//! - `serde` — enables serialization & deserialization of `InputArg` and
//! - `serde` — Enables serialization & deserialization of `InputArg` and
//! `OutputArg` values with [`serde`][]
//!
//! - `tokio` — enables using `InputArg` and `OutputArg` values for
//! - `tokio` — Enables using `InputArg` and `OutputArg` values for
//! asynchronous I/O with [`tokio`][]
//!
//! - `examples` — adds dependencies needed by the example programs in
//! `patharg`'s source repository; don't enable it yourself
//! - `examples` — Adds dependencies needed by the example programs in
//! `patharg`'s source repository. Do not enable when installing.
//!
//! Comparison with clio
//! ====================
Expand All @@ -63,10 +61,10 @@
//! - `clio` supports reading from & writing to HTTP(S) URLs and has special
//! treatment for FIFOs. `patharg` sees no need for such excesses.
//!
//! - `patharg` has a feature for allowing async I/O with [`tokio`]. `clio`
//! - `patharg` has a feature for allowing async I/O with [`tokio`][]. `clio`
//! does not.
//!
//! - `patharg` has optional support for [`serde`]. `clio` does not.
//! - `patharg` has optional support for [`serde`][]. `clio` does not.
//!
//! [`clio`]: https://crates.io/crates/clio
//! [`tokio`]: https://crates.io/crates/tokio
Expand Down

0 comments on commit 1d77614

Please sign in to comment.