Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release embedded-io{,-async,-adapters} v0.6.0 #511

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions embedded-hal-async/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
#![no_std]
// disable warning for already-stabilized features.
// Needed to pass CI, because we deny warnings.
// We don't immediately remove them to not immediately break older nightlies.
// When all features are stable, we'll remove them.
#![allow(stable_features)]
#![feature(async_fn_in_trait, impl_trait_projections)]

pub mod delay;
Expand Down
5 changes: 5 additions & 0 deletions embedded-hal-bus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
// disable warning for already-stabilized features.
// Needed to pass CI, because we deny warnings.
// We don't immediately remove them to not immediately break older nightlies.
// When all features are stable, we'll remove them.
#![cfg_attr(feature = "async", allow(stable_features))]
#![cfg_attr(feature = "async", feature(async_fn_in_trait, impl_trait_projections))]

// needed to prevent defmt macros from breaking, since they emit code that does `defmt::blahblah`.
Expand Down
4 changes: 4 additions & 0 deletions embedded-io-adapters/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

Add unreleased changes here

## 0.6.0 - 2023-10-02

- Add support for adapting `BufRead` from `futures` and `tokio`.
- Return an error when a wrapped `std`/`futures`/`tokio` `write()` call returns
`Ok(0)` to comply with `embedded_io::Write` requirements.
Expand Down
6 changes: 3 additions & 3 deletions embedded-io-adapters/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-io-adapters"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
description = "Adapters between the `embedded-io` traits and other I/O traits"
repository = "https://github.com/rust-embedded/embedded-hal"
Expand All @@ -17,8 +17,8 @@ tokio-1 = ["std", "dep:tokio", "dep:embedded-io-async", "embedded-io-async?/std"
futures-03 = ["std", "dep:futures", "dep:embedded-io-async", "embedded-io-async?/std"]

[dependencies]
embedded-io = { version = "0.5", path = "../embedded-io" }
embedded-io-async = { version = "0.5", path = "../embedded-io-async", optional = true }
embedded-io = { version = "0.6", path = "../embedded-io" }
embedded-io-async = { version = "0.6", path = "../embedded-io-async", optional = true }

futures = { version = "0.3.21", features = ["std"], default-features = false, optional = true }
tokio = { version = "1", features = ["io-util"], default-features = false, optional = true }
Expand Down
12 changes: 10 additions & 2 deletions embedded-io-adapters/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
// disable warning for already-stabilized features.
// Needed to pass CI, because we deny warnings.
// We don't immediately remove them to not immediately break older nightlies.
// When all features are stable, we'll remove them.
#![cfg_attr(
any(feature = "tokio-1", feature = "futures-03"),
allow(stable_features)
)]
#![cfg_attr(
any(feature = "tokio-1", feature = "futures-03"),
feature(async_fn_in_trait, impl_trait_projections)
)]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
Expand Down
16 changes: 15 additions & 1 deletion embedded-io-async/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

Add unreleased changes here

## 0.6.0 - 2023-10-02

- Prohibit `Write::write` implementations returning `Ok(0)` unless there is no
data to write; consequently remove `WriteAllError`.
Update the `&mut [u8]` impl to possibly return
a new `SliceWriteError` if the slice is full instead of `Ok(0)`.
- Add `WriteZero` variant to `ErrorKind` for implementations that previously
may have returned `Ok(0)` to indicate no further data could be written.
- `Write::write_all` now panics if the `write()` implementation returns `Ok(0)`.

## 0.5.0 - 2023-08-06

- First release
- First release
4 changes: 2 additions & 2 deletions embedded-io-async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-io-async"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
description = "Async embedded IO traits"
repository = "https://github.com/rust-embedded/embedded-hal"
Expand All @@ -17,7 +17,7 @@ alloc = ["embedded-io/alloc"]
defmt-03 = ["dep:defmt-03", "embedded-io/defmt-03"]

[dependencies]
embedded-io = { version = "0.5", path = "../embedded-io" }
embedded-io = { version = "0.6", path = "../embedded-io" }
defmt-03 = { package = "defmt", version = "0.3", optional = true }

[package.metadata.docs.rs]
Expand Down
7 changes: 6 additions & 1 deletion embedded-io-async/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#![feature(async_fn_in_trait, impl_trait_projections)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs)]
#![doc = include_str!("../README.md")]
// disable warning for already-stabilized features.
// Needed to pass CI, because we deny warnings.
// We don't immediately remove them to not immediately break older nightlies.
// When all features are stable, we'll remove them.
#![allow(stable_features)]
#![feature(async_fn_in_trait, impl_trait_projections)]

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down
2 changes: 1 addition & 1 deletion embedded-io/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 0.6.0 - 2023-10-02

- Prohibit `Write::write` implementations returning `Ok(0)` unless there is no
data to write; consequently remove `WriteAllError` and the `WriteAllError`
Expand Down
2 changes: 1 addition & 1 deletion embedded-io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-io"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
description = "Embedded IO traits"
repository = "https://github.com/rust-embedded/embedded-hal"
Expand Down