Yeah, those instructions should work.
Some modifications you could do:
- Instead of grabbing the whole git repository you could use the source that rustup provides.
Do rustup component add rust-src
and the source will be available at $(rustc --print sysroot)/lib/rustlib/src/rust
. This source is guaranteed to match your compiler.
- Instead of creating shims you could use rustbuild and point to the toolchain using env variables.
Additionally, pass the --enable-rustbuild
flag to configure
. Then set these env variables:
export AR_mips_unknown_linux_musl=/path/to/mips-openwrt-linux-ar
export CC_mips_unknown_linux_musl=/path/to/mips-openwrt-linux-gcc
export CXX_mips_unknown_linux_musl=/path/to/mips-openwrt-linux-g++