Skip to content

Commit

Permalink
Added patch note to README
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-meissner committed Jan 31, 2023
1 parent 5c2e7c3 commit 05de2cd
Showing 1 changed file with 10 additions and 53 deletions.
63 changes: 10 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,13 @@
# Bytes
# Patch

A utility library for working with bytes.
> **_NOTE:_** This patch adds atomic-cas polyfill to bytes for targets like thumbv6m-none-eabi until the following PR/issue is resolved:
>
> * https://github.com/tokio-rs/bytes/pull/467
> * https://github.com/tokio-rs/bytes/issues/461
[![Crates.io][crates-badge]][crates-url]
[![Build Status][ci-badge]][ci-url]
The patch can be applied by adding the following segment to root Cargo.toml:

[crates-badge]: https://img.shields.io/crates/v/bytes.svg
[crates-url]: https://crates.io/crates/bytes
[ci-badge]: https://github.com/tokio-rs/bytes/workflows/CI/badge.svg
[ci-url]: https://github.com/tokio-rs/bytes/actions

[Documentation](https://docs.rs/bytes)

## Usage

To use `bytes`, first add this to your `Cargo.toml`:

```toml
[dependencies]
bytes = "1"
```

Next, add this to your crate:

```rust
use bytes::{Bytes, BytesMut, Buf, BufMut};
```

## Serde support

Serde support is optional and disabled by default. To enable use the feature `serde`.

```toml
[dependencies]
bytes = { version = "1", features = ["serde"] }
```

## Building documentation

When building the `bytes` documentation the `docsrs` option should be used, otherwise
feature gates will not be shown. This requires a nightly toolchain:

```
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc
```

## License

This project is licensed under the [MIT license](LICENSE).

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in `bytes` by you, shall be licensed as MIT, without any additional
terms or conditions.
````TOML
[patch.crates-io]
bytes = { git = "ssh://[email protected]/pegasus-aero/rt-bytes.git", branch = "cfg_target_has_atomic" }
````

0 comments on commit 05de2cd

Please sign in to comment.