Skip to content

Instantly share code, notes, and snippets.

@MabezDev MabezDev/rust-xtensa.md
Last active Jan 12, 2020

Embed
What would you like to do?

Bootstrapping Rust with xtensa support

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

Build an application

See the xtensa-rust-quickstart crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.