esp-idf-sys icon indicating copy to clipboard operation
esp-idf-sys copied to clipboard

error: Toolchain esp in XXX\esp_32_webserver\rust-toolchain.toml is custom and not installed

Open pCoder3000 opened this issue 1 year ago • 2 comments
trafficstars

Hello Firends,

Im new to rust and esp32 i tried to follow a beginner tutorial: https://youtu.be/o8yNNVFzNnM?list=PL0U7YUX2VnBFbwTi96wUB1nZzPVN3HzgS

I know there an already many open issues and maybe this is a duplicate, but can someone explain to me in simple terms why the rust analyzer is broken after I install the template?

I get this error when I clone the project and try to build it with cargo build. I attempt to compile it under Windows 11

2024-07-13T22:39:01.467639Z ERROR rust_analyzer::main_loop: FetchWorkspaceError: rust-analyzer failed to load workspace: Failed to load the project at XXX\esp_32_webserver\Cargo.toml: Failed to query rust toolchain version at XXX\getting started\esp_32_webserver, is your toolchain setup correctly?: "XXX\\.cargo\\bin\\cargo.exe" "--version" failed, exit code: 1 stderr: error: Toolchain esp in XXX\esp_32_webserver\rust-toolchain.toml is custom and not installed

pCoder3000 avatar Jul 13 '24 22:07 pCoder3000

Is there any news about this topic? I'm having the same issue

raulqtech avatar Sep 27 '24 17:09 raulqtech

https://github.com/esp-rs/esp-idf-template?tab=readme-ov-file#install-rust--clang-toolchains-for-espressif-socs-with-espup

ivmarkov avatar Sep 27 '24 17:09 ivmarkov

You will need to install the esp support before you bring any rust-toolchain.toml files into scope. In my case,

mkdir ~/tmp && cd ~/tmp
cargo install espup
espup install

did the trick (cd to any empty directory, then install the esp toolchain).

driehuis avatar Nov 29 '24 08:11 driehuis

^^^ Addresses the problem very well, closing.

ivmarkov avatar Nov 29 '24 08:11 ivmarkov