You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
394: Split nb and can traits to separate crates. r=eldruin a=Dirbaio
Following up from #177 (comment), this PR splits `nb` and `can` traits to separate crates.
I propose keeping these crates (and `embedded-hal-async`) separate forever. (instead of merging EHA into EH when stable as we originally planned when we created EHA).
Reasons for splitting `nb`:
- its future is unclear. Some people who would like to see `nb` deprecated. By splitting, if we do deprecate it, we won't get stuck with it in the main `embedded-hal` crate forever.
- It makes the module paths in the main crate cleaner.
- Traits tied to a particular "execution model" in their own crates, which make the overall structure easier to understand IMO.
Reasons for splitting `can`:
- It has some open concerns: #381#387
- Even if we do solve these, it's nice to have separate crates for the "more specialized" traits so that they can be major-bumped in the future if more concerns arise, without having to major-bump the main `embedded-hal` crate.
TODO:
- [x] Name it `embedded-can`, not `embedded-hal-can`.
- [x] Move/remove docs/examples from the main crate that mention `nb`.
- [x] Mention the subcrates from the main crate's docs.
- [x] Add CI
- [x] move `embedded-hal` to a subdir as well
- [x] What should the nb, can crate versions be? 1.0? (no opinion on this from me).
- [x] can: 0.4
- [x] nb: 1.0
Co-authored-by: Dario Nieuwenhuis <[email protected]>
The advantage for application developers is that by adopting `embedded-hal` they can unlock all
27
18
these drivers for their platform.
28
19
29
-
`embedded-hal` is not tied to a specific execution model like blocking or non-blocking.
30
-
31
20
For functionality that goes beyond what is provided by `embedded-hal`, users are encouraged
32
21
to use the target platform directly. Abstractions of common functionality can be proposed to be
33
22
included into `embedded-hal` as described [in this guide](docs/how-to-add-a-new-trait.md), though.
34
23
35
24
See more about the design goals in [this documentation section](https://docs.rs/embedded-hal/latest/embedded_hal/#design-goals).
36
25
26
+
## Crates
27
+
28
+
The main `embedded-hal` project is not tied to a specific execution model like blocking or non-blocking.
29
+
30
+
| Crate | crates.io | Docs ||
31
+
|-|-|-|-|
32
+
|[embedded-hal](./embedded-hal)|[](https://crates.io/crates/embedded-hal)|[](https://docs.rs/embedded-hal)| Core traits, blocking version |
33
+
|[embedded-hal-async](./embedded-hal-async)|[](https://crates.io/crates/embedded-hal-async)|[](https://docs.rs/embedded-hal-async)| Core traits, async version |
34
+
|[embedded-hal-nb](./embedded-hal-nb)|[](https://crates.io/crates/embedded-hal-nb)|[](https://docs.rs/embedded-hal-nb)| Core traits, polling version using the `nb` crate |
35
+
|[embedded-hal-bus](./embedded-hal-bus)|[](https://crates.io/crates/embedded-hal-bus)|[](https://docs.rs/embedded-hal-bus)| Utilities for sharing SPI and I2C buses |
36
+
|[embedded-can](./embedded-can)|[](https://crates.io/crates/embedded-can)|[](https://docs.rs/embedded-can)| Controller Area Network (CAN) traits |
37
+
37
38
## Releases
38
39
39
40
At the moment we are working towards a `1.0.0` release (see [#177]). During this process we will
@@ -94,9 +95,6 @@ dual licensed as above, without any additional terms or conditions.
94
95
95
96
## Code of Conduct
96
97
97
-
Contribution to this crate is organized under the terms of the [Rust Code of
98
-
Conduct][CoC], the maintainer of this crate, the [HAL team][team], promises
98
+
Contribution to this repository is organized under the terms of the [Rust Code of
99
+
Conduct](CODE_OF_CONDUCT.md), the maintainers of this repository, the [HAL team](https://github.com/rust-embedded/wg#the-hal-team), promise
0 commit comments