diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-02-12 00:30:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-12 00:30:47 +0000 |
| commit | e728a32672d9cb108d73ba017a6a153dbc6c2d15 (patch) | |
| tree | 25cdf290d138929ebf0ff292fc6934e0a266400a /examples/std | |
| parent | d708be7fe5e8fec8f2feea269fcb6964b6c73dcb (diff) | |
| parent | 1904906b363d2bbe32e95546f53201a3179dcb60 (diff) | |
Merge #613
613: Rust stable support r=Dirbaio a=Dirbaio
This PR adds (limited) stable Rust support!
The drawbacks are:
- No `#[embassy::task]`, `#[embassy::main]`. (requires `type_alias_impl_trait`). You have to manually allocate the tasks somewhere they'll live forever. See [example](https://github.com/embassy-rs/embassy/blob/master/examples/nrf/src/bin/raw_spawn.rs)
- No async trait impls (requires GATs). Note that the full API surface of HALs is still available through inherent methods: #552 #581
- Some stuff is not constructible in const (requires `const_fn_trait_bound`), although there's an (ugly) workaround for the generic `Mutex`.
So it's not that bad in the end, it's fully usable for shipping production-ready firmwares. We'll still recommend nightly as the default, until GATs and `type_alias_impl_trait` are stable.
Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'examples/std')
| -rw-r--r-- | examples/std/Cargo.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 450911fa1..ef60fe992 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -5,7 +5,7 @@ name = "embassy-std-examples" | |||
| 5 | version = "0.1.0" | 5 | version = "0.1.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time"] } | 8 | embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time", "nightly"] } |
| 9 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } | 9 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } |
| 10 | 10 | ||
| 11 | async-io = "1.6.0" | 11 | async-io = "1.6.0" |
