Comments (8)
Just as an info for anyone else encountering the issue, the following steps can be used as a workaround:
- Clone the embedded-io repo from https://github.com/embassy-rs/embedded-io
- In
embedded-io/src/lib.rs
add the following code at the top of the file:#![feature(generic_associated_types)]
- In the training project's Cargo.toml (e.g. in
intro/hardware-check/Cargo.toml
add the following lines at the end[patch.crates-io] embedded-io = { path = "/path/to/embedded-io"}
from std-training.
I am experiencing the same problem.
from std-training.
Ok, so I am still new to Rust and a hardly know what I am doing here, but it seems to work, so here it is:
After some searching I found this Reddit post, which says that the feature must be enabled using
#![feature(generic_associated_types)]
in order to work.
The error says the problem occurs in this file: ~/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs
, so I opened the src
directory containing the asynch.rs
and added the before-mentioned line
#![feature(generic_associated_types)]
to the top of the lib.rs
file.
Now it works for me. I don't really think that this is a solution, but I also don't think that it can break much either, as you can always just delete the ~/.cargo/registry/
directory to revert this change. Hope this might help!
from std-training.
Thanks for the hint! I was thinking about doing what the compiler suggests, as well. However, this can't be a permanent solution.
FYI you do not need to mess with the registry afaik, if you use this https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#testing-a-bugfix
So either embedded-io needs to fix this (which I doubt, because there v0.3.1 is very recent and fixes some issue with nightly), or this repo needs some change – but I have no clue which.
Moreover, it doesn't work on the docker container either. There is an issue with rustc being too old (1.61 and comfy-table needs 1.62 or newer) when installing cargo-espflash.
Some crate in the dependency tree apparently causes a lot of trouble.
from std-training.
Thanks for the explanation!
from std-training.
Easier temp solution than cloning repo. Just override to a prev package version.
[patch.crates-io]
embedded-io = { git = "https://github.com/embassy-rs/embedded-io.git", tag = "v0.3.0"}
and then cargo update
Thanks to @elotom
ivmarkov/rust-esp32-std-demo#123 (comment)
from std-training.
Thanks @fakeplant ! Works like a charm.
Embedded-io is now at release 0.4.0 but the issue seems to persist.
from std-training.
This should now be fixed with #125
from std-training.
Related Issues (20)
- Use mdBook anchors instead of duplicating code
- Common crates HOT 1
- Async material
- ESP32-C6 and ZigBee examples HOT 4
- The MQTT lesson is not for ESP32? HOT 3
- Running "hardware-check" reports "This script was called from a virtual environment, can not create a virtual environment again" error HOT 2
- Compilation error when building hardware-check example for ESP32 HOT 2
- Building `esp-idf-sys` failed because of uninitialized submodules in esp-idf HOT 3
- error: unrecognized command-line option '--target=riscv32imc_zicsr_zifencei-esp-espidf HOT 2
- How to modify the configuration of SDK,such as the port port port rate HOT 4
- esp32c2 uses 26M crystal oscillator, resulting in delay errors HOT 2
- How to save and pass 'PinDriver' objects HOT 3
- WIFI Example does not compile with the esp_idf_svc crate recommended in the `esp-rs` book HOT 6
- How create multiple asynchronous tasks,task have "loop{}" HOT 3
- 'None' cannot be used for the 'Option' type in 'SpiDeviceDriver::new_single()' HOT 1
- Button interrupt on edge fired repeatedly
- Guide on interoperability with C
- hardware-check: Segment 0 0x3c090020-0x3c09fff8 invalid: bad load address range HOT 5
- RGB LED is not flashing if esp-idf-svc is 0.48.* HOT 3
- Does esp-rs support speech recognition now, or can I use the existing esp-sr?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from std-training.