Skip to content

Commit 2c71ed6

Browse files
authored
Merge pull request #472 from rust-embedded/io-adapter
io: add separate embedded-io-adapters crate, add futures/tokio support.
2 parents 6e8bd14 + 332d0ce commit 2c71ed6

File tree

22 files changed

+768
-231
lines changed

22 files changed

+768
-231
lines changed

.github/workflows/clippy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
# Use a pinned version to avoid spontaneous breakages (new clippy lints are added often)
1818
toolchain: nightly-2023-07-03
1919
components: clippy
20-
- run: cargo clippy --features=std -- --deny=warnings
20+
- run: cargo clippy --all-features -- --deny=warnings

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
rust:
1919
- stable
20-
- 1.59.0 # MSRV
20+
- 1.60.0 # MSRV
2121
- nightly
2222
target:
2323
- x86_64-unknown-linux-gnu
@@ -28,15 +28,17 @@ jobs:
2828
features: std
2929
- target: x86_64-unknown-linux-gnu
3030
features: alloc
31-
31+
- target: x86_64-unknown-linux-gnu
32+
features: std,tokio-1,futures-03
33+
rust: nightly
3234
steps:
3335
- uses: actions/checkout@v3
3436
- uses: dtolnay/rust-toolchain@master
3537
with:
3638
toolchain: ${{ matrix.rust }}
3739
target: ${{ matrix.target }}
3840

39-
- run: sed -i '/nightly-only/d' Cargo.toml
41+
- run: mv Cargo.stable.toml Cargo.toml
4042
if: matrix.rust != 'nightly'
4143

4244
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}

Cargo.stable.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# CI moves this file to `Cargo.toml` when building for stable.
2+
3+
[workspace]
4+
resolver = "2"
5+
6+
members = [
7+
"embedded-hal",
8+
"embedded-hal-nb",
9+
"embedded-hal-bus",
10+
"embedded-can",
11+
"embedded-io",
12+
"embedded-io-adapters",
13+
]
14+
15+
# Cargo implicitly adds path dependencies to the workspace.
16+
# Even if they're optional and not enabled. This prevents that.
17+
exclude = [
18+
"embedded-hal-async",
19+
"embedded-io-async",
20+
]

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[workspace]
22
resolver = "2"
33

4-
# CI removes lines containing 'nightly-only' when not building with nightly.
54
members = [
65
"embedded-hal",
7-
"embedded-hal-async", # nightly-only
6+
"embedded-hal-async",
87
"embedded-hal-nb",
98
"embedded-hal-bus",
109
"embedded-can",
1110
"embedded-io",
12-
"embedded-io-async", # nightly-only
11+
"embedded-io-async",
12+
"embedded-io-adapters",
1313
]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ on crates.io.
7272

7373
## Minimum Supported Rust Version (MSRV)
7474

75-
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
75+
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*
7676
compile with older versions but that may change in any new patch release.
7777

7878
See [here](docs/msrv.md) for details on how the MSRV may be upgraded.

embedded-can/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![crates.io](https://img.shields.io/crates/d/embedded-can.svg)](https://crates.io/crates/embedded-can)
22
[![crates.io](https://img.shields.io/crates/v/embedded-can.svg)](https://crates.io/crates/embedded-can)
33
[![Documentation](https://docs.rs/embedded-can/badge.svg)](https://docs.rs/embedded-can)
4-
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.59+-blue.svg)
4+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)
55

66
# `embedded-can`
77

@@ -15,7 +15,7 @@ This project is developed and maintained by the [HAL team](https://github.com/ru
1515

1616
## Minimum Supported Rust Version (MSRV)
1717

18-
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
18+
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*
1919
compile with older versions but that may change in any new patch release.
2020

2121
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.

embedded-hal-bus/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![crates.io](https://img.shields.io/crates/d/embedded-hal-bus.svg)](https://crates.io/crates/embedded-hal-bus)
22
[![crates.io](https://img.shields.io/crates/v/embedded-hal-bus.svg)](https://crates.io/crates/embedded-hal-bus)
33
[![Documentation](https://docs.rs/embedded-hal-bus/badge.svg)](https://docs.rs/embedded-hal-bus)
4-
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.59+-blue.svg)
4+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)
55

66
# `embedded-hal-bus`
77

@@ -34,7 +34,7 @@ provides mechanisms to obtain multiple `I2c` instances out of a single `I2c` ins
3434

3535
## Minimum Supported Rust Version (MSRV)
3636

37-
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
37+
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*
3838
compile with older versions but that may change in any new patch release.
3939

4040
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.

embedded-hal-nb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![crates.io](https://img.shields.io/crates/d/embedded-hal-nb.svg)](https://crates.io/crates/embedded-hal-nb)
22
[![crates.io](https://img.shields.io/crates/v/embedded-hal-nb.svg)](https://crates.io/crates/embedded-hal-nb)
33
[![Documentation](https://docs.rs/embedded-hal-nb/badge.svg)](https://docs.rs/embedded-hal-nb)
4-
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.59+-blue.svg)
4+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)
55

66
# `embedded-hal-nb`
77

@@ -17,7 +17,7 @@ This project is developed and maintained by the [HAL team](https://github.com/ru
1717

1818
## Minimum Supported Rust Version (MSRV)
1919

20-
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
20+
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*
2121
compile with older versions but that may change in any new patch release.
2222

2323
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.

embedded-hal/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6565
*** This is (also) an alpha release with breaking changes (sorry) ***
6666

6767
### Changed
68-
- The Minimum Supported Rust Version (MSRV) is now 1.59.0
68+
- The Minimum Supported Rust Version (MSRV) is now 1.60.0
6969
- `spi`: unify all traits into `SpiReadBus`, `SpiWriteBus` and `SpiBus` (read-write).
7070
- `spi`: Add `SpiDevice` trait to represent a single device in a (possibly shared) bus, with managed chip-select (CS) pin.
7171
- `spi`: Clarify that implementations are allowed to return before operations are finished, add `flush` to wait until finished.

embedded-hal/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![crates.io](https://img.shields.io/crates/d/embedded-hal.svg)](https://crates.io/crates/embedded-hal)
22
[![crates.io](https://img.shields.io/crates/v/embedded-hal.svg)](https://crates.io/crates/embedded-hal)
33
[![Documentation](https://docs.rs/embedded-hal/badge.svg)](https://docs.rs/embedded-hal)
4-
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.59+-blue.svg)
4+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.60+-blue.svg)
55

66
# `embedded-hal`
77

@@ -15,7 +15,7 @@ This project is developed and maintained by the [HAL team](https://github.com/ru
1515

1616
## Minimum Supported Rust Version (MSRV)
1717

18-
This crate is guaranteed to compile on stable Rust 1.59 and up. It *might*
18+
This crate is guaranteed to compile on stable Rust 1.60 and up. It *might*
1919
compile with older versions but that may change in any new patch release.
2020

2121
See [here](../docs/msrv.md) for details on how the MSRV may be upgraded.

0 commit comments

Comments
 (0)