Commit Graph

21 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
4857fefc90 ci: simplify, test MSRV.
- Use separate jobs instead of `matrix`. The Github Actions matrix is very cursed, especially if you use `include`. We don't have that many combinations, IMO doing separate jobs is way more straightforward and only slightly more verbose.
- `embedded-hal` needs `rust-version = 1.60` because it uses `dep:`.

Fixes #538
2023-12-13 01:30:40 +01:00
Dario Nieuwenhuis
2767cbdce1 release embedded-hal-* v1.0.0-rc.2, embedded-io-{async,adapters} v0.6.1 2023-11-29 14:48:23 +01:00
Dario Nieuwenhuis
c9fbac0d80 Use feature() on nightly toolchains only.
`feature()` is only allowed on Nightly, it's completely disallowed on stable and beta
even for already-stabilized features. So, we autodetect whether the user is using nightly
and conditionally use `feature()`. This allows the crates to Just Work on current 1.75 beta
and will also Just Work when 1.75 stable is out.

Keeping `feature()` is desirable to keep support for:

- Espressif's xtensa rustc fork. (they build from the stable branch but enable use of `feature()`, so latest xtensa rustc still requires `feature()`)
- Users of older nightlies

Once xtensa rust 1.75 is out, we can remove this (upstream nightlies that require `feature()` will be quite old by then, so dropping support for them should be OK).

I decided to not use already-made crates like `rustversion` to do this because they're quite big and do way more than what we need, so I felt badd adding another dep. The code is inspired from `rustversion`'s build.rs.
2023-11-28 19:59:32 +01:00
Yuri Astrakhan
a7eb603bc4 A few minor clippy nits
* semicolons
* doc links
* unused Error namespace
2023-11-25 00:03:26 -05:00
Dario Nieuwenhuis
ff1eb9cb75 io-async: make slice write impl consistent with blocking impl. 2023-10-22 21:47:48 +02:00
rmsyn
739fa02ebe async: disable Send lint in async traits
Adds `#[allow(async_fn_in_trait)]` to disable the lint in `async` trait
functions recommending `Send` in the return type.

Adding the type annotation is currently unstable, has little-to-no
utility in current crates using `embedded-hal`, and will break those users.

See
<https://github.com/rust-embedded/embedded-hal/pull/515#issuecomment-1763525962>
for details and discussion.
2023-10-15 23:40:15 +00:00
Dario Nieuwenhuis
a4dcba4cde Add allow(stable_features).
Needed to pass deny-warnings on CI without breaking older nightlies.
2023-10-03 20:32:56 +02:00
Dario Nieuwenhuis
e632f16169 Release embedded-io{,-async,-adapters} v0.6.0 2023-10-02 15:29:20 +02:00
Adam Greig
90e2c5e877 Clarify write() may only return Ok(0) if data is empty.
In other situations an error should be returned instead;
update ErrorKind to add this and update out slice_mut implementation
to use it.
2023-09-14 00:40:25 +01:00
Dario Nieuwenhuis
8480a33ee5 Merge pull request #495 from nyurik/clippy
A few clippy lint fixes
2023-09-01 11:32:56 +00:00
Yuri Astrakhan
6e461a0c43 Add missing LICENSE-* files to embedded-io-async 2023-09-01 01:33:45 -04:00
Yuri Astrakhan
3005247c9b A few clippy lint fixes
* added `[must_use]`
* added a few semicolons
2023-09-01 00:03:36 -04:00
Dario Nieuwenhuis
575cee3343 Release embedded-hal{,-async,-nb} v1.0.0-rc.1, embedded-hal-bus v0.1.0-rc.1 2023-08-15 21:11:14 +02:00
Dario Nieuwenhuis
6ea5659bab io: Release embedded-io 0.5 2023-08-06 15:41:18 +02:00
Dario Nieuwenhuis
35b0dc3398 io: add defmt support. 2023-08-06 15:41:18 +02:00
Dario Nieuwenhuis
b55faf9906 io: expand docs. 2023-07-12 17:42:41 +02:00
Dario Nieuwenhuis
7aaa585c63 Rename trait Io to ErrorType. 2023-07-12 13:26:23 +02:00
Dario Nieuwenhuis
31b62d3a07 io: add ReadReady, WriteReady. 2023-07-05 00:19:25 +02:00
Dario Nieuwenhuis
2c818b8b09 io-async: add std/alloc features, add Box/Vec impls. 2023-07-05 00:16:32 +02:00
Dario Nieuwenhuis
a105876f16 io-async: add impls for slices. 2023-07-05 00:16:32 +02:00
Dario Nieuwenhuis
d6f641995f Add embedded-io-async. 2023-07-05 00:16:32 +02:00