Build xtensa llvm from here https://esp32.com/viewtopic.php?t=9226&p=38466
But add the X86 target like so
cmake ../llvm-xtensa -DLLVM_TARGETS_TO_BUILD="Xtensa;X86" -DCMAKE_BUILD_TYPE=Release -G "Ninja"
X86 is required so that Rust can build itself, if your host machine is not x86 use your own host triple.
clone rust from https://github.com/MabezDev/rust
and checkout the xtensa-target
branch. Note: the minimum llvm version must be supported rustc, as of 1.33 its llvm 6.0
set llvm root to where you build llvm, e.g ./configure --llvm-root=$PATH_TO_BUILT_LLVM
then build rustc like normal
See the xtensa-rust-quickstart crate