Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"std::io::Read not implemented for UartDriver" anymore? #498

Closed
gb6881 opened this issue Nov 23, 2024 · 3 comments
Closed

"std::io::Read not implemented for UartDriver" anymore? #498

gb6881 opened this issue Nov 23, 2024 · 3 comments

Comments

@gb6881
Copy link

gb6881 commented Nov 23, 2024

Hi,

unluckily i did an espup update (afaik) and now i'm getting a message i cannot compile my project anymore.
orignally i'm using them sml-rs package, but i've stripped it down:

❯ CRATE_CC_NO_DEFAULTS=1 cargo build Compiling bindgen v0.69.5 Compiling embuild v0.32.0 Compiling esp-idf-sys v0.35.0 Compiling esp-idf-hal v0.44.1 Compiling esp-idf-svc v0.49.1 Compiling test-esp-idf-sys v0.1.0 (/Users/gb/Documents/PRIVATE/esp/test) error[E0277]: the trait bound UartDriver<'>: std::io::Readis not satisfied --> src/main.rs:22:33 | 22 | Ok(r ) => { from_reader(r);} | ----------- ^ the traitstd::io::Readis not implemented forUartDriver<'>| | | required by a bound introduced by this call | note: required by a bound infrom_reader--> src/main.rs:26:23 | 26 | pub fn from_reader<R: std::io::Read>( _reader: R) { | ^^^^^^^^^^^^^ required by this bound infrom_reader`

For more information about this error, try rustc --explain E0277.
error: could not compile test-esp-idf-sys (bin "test-esp-idf-sys") due to 1 previous error`

test project sources:
test.zip

build target: xtensa-esp32s3-espidf

output espup update:
`
[info]: Updating the Espressif Rust ecosystem
[info]: Checking Rust installation
[info]: Installing RISC-V Rust targets ('riscv32imc-unknown-none-elf', 'riscv32imac-unknown-none-elf' and 'riscv32imafc-unknown-none-elf') for 'nightly' toolchain
[info]: Installing GCC (xtensa-esp-elf)
[warn]: Previous installation of GCC exists in: '/Users/gb/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906'. Reusing this installation
[warn]: Previous installation of LLVM exists in: '/Users/gb/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912'. Reusing this installation
[info]: Creating symlink between '/Users/gb/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-18.1.2_20240912/esp-clang/lib' and '/Users/gb/.espup/esp-clang'
[warn]: Previous installation of Xtensa Rust 1.82.0.3 exists in: '/Users/gb/.rustup/toolchains/esp'. Reusing this installation
[info]: Update successfully completed!

    To get started, you need to set up some environment variables by running: '. /Users/gb/export-esp.sh'
    This step must be done every time you open a new terminal.
        See other methods for setting the environment in https://esp-rs.github.io/book/installation/riscv-and-xtensa.html#3-set-up-the-environment-variables

`
i'm runing a arm mac (mac os 15.1.1), but had the same message also under linux.

any idea what changed, what i can do to fix this problem?

Thanks, Georg

@Vollbrecht
Copy link
Collaborator

Are you sure you are talking about std::io::Read and not some other Read trait? We never implemented a std::io::Read on UartDriver as far as i can see. We provide the embedded_io Read impls alongside with e-hal_nb and e-hal_0.2 impls, and if i check the history of uart.rs with `git log -p -- uart.rs | grep "::Read"`` i dont see where there was at any time such a implementation?

@ivmarkov
Copy link
Collaborator

I also think we have never implemented std::io::Read. There are adapters that adapt embedded_io::Read to std::io::Read and that's why I think we never implemented those.

@gb6881
Copy link
Author

gb6881 commented Nov 24, 2024

Thanks for you quick reply!

then i'll have to look, from which dependency this implementation vanished :)

@gb6881 gb6881 closed this as completed Nov 24, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants