espressif/rust-esp32-example

Remove workaround dependency on nightly toolchain to fix "can't find crate for `std`"

Closed this issue · 2 comments

Dependency on rustup toolchain install nightly seems to be unnecessary. The workaround for stable toolchain can be solved by providing cargo with version of the toolchain and fix following error:

error[E0463]: can't find crate for `std`
  |
  = note: the `xtensa-esp32-none-elf` target may not be installed

Here is the reason why rustup toolchain install nightly fixes the problem with build, when user had installed only stable toolchain:

There is a ~/.rustup/fallback/cargo copy of a cargo. When user install stable there is just a version which does not support -z option. When user installs nightly, the fallback is updated with nightly cargo.

It has even unexpected side-effect: When user uninstalls toolchain nightly the cargo from nightly remains in fallback directory. Build of Xtensa seems to use this fallback and build is working.

The problem could be solved by bundling cargo with Xtensa Rust toolchain.

Shall we close this now, given that the Espressif-built esp Rust toolchain does build cargo as well (it does build it, right?).

@ivmarkov Thanks for pointing out deprecated issue. Closing