From d480adaf25f5e1a43a8c74ffebf6b9ee4c3672d4 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 6 Dec 2023 11:09:18 +1100 Subject: [PATCH] io: Simplify crate docs and add README Simplify the docs in `lib.rs` and copy them into a minimal README file. --- io/README.md | 10 ++++++++++ io/src/lib.rs | 15 +++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 io/README.md diff --git a/io/README.md b/io/README.md new file mode 100644 index 00000000..e38e2d06 --- /dev/null +++ b/io/README.md @@ -0,0 +1,10 @@ +Rust-Bitcoin IO Library +======================= + +The `std::io` module is not exposed in `no-std` Rust so building `no-std` applications which require +reading and writing objects via standard traits is not generally possible. Thus, this library exists +to export a minmal version of `std::io`'s traits which we use in `rust-bitcoin` so that we can +support `no-std` applications. + +These traits are not one-for-one drop-ins, but are as close as possible while still implementing +`std::io`'s traits without unnecessary complexity. diff --git a/io/src/lib.rs b/io/src/lib.rs index 8d234c19..f820140e 100644 --- a/io/src/lib.rs +++ b/io/src/lib.rs @@ -1,16 +1,11 @@ //! Rust-Bitcoin IO Library //! -//! Because the core `std::io` module is not yet exposed in `no-std` Rust, building `no-std` -//! applications which require reading and writing objects via standard traits is not generally -//! possible. While there is ongoing work to improve this situation, this module is not likely to -//! be available for applications with broad rustc version support for some time. +//! The `std::io` module is not exposed in `no-std` Rust so building `no-std` applications which +//! require reading and writing objects via standard traits is not generally possible. Thus, this +//! library exists to export a minmal version of `std::io`'s traits which we use in `rust-bitcoin` +//! so that we can support `no-std` applications. //! -//! Thus, this library exists to export a minmal version of `std::io`'s traits which `no-std` -//! applications may need. With the `std` feature, these traits are also implemented for the -//! `std::io` traits, allowing standard objects to be used wherever the traits from this crate are -//! required. -//! -//! This traits are not one-for-one drop-ins, but are as close as possible while still implementing +//! These traits are not one-for-one drop-ins, but are as close as possible while still implementing //! `std::io`'s traits without unnecessary complexity. #![cfg_attr(not(feature = "std"), no_std)]