rustup add component rust-src
cargo install xargo~/.bashrc下编辑指定toolchain的bin目录,供xargo工程使用。use std::env;
fn main() {
let staging_dir = env::var("STAGING_DIR").unwrap();
println!(
r"cargo:rustc-link-search={}/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib",
staging_dir
);
}[build]
target = "mipsel-unknown-linux-gnu"
[target.mipsel-unknown-linux-gnu]
linker = "mipsel-openwrt-linux-uclibc-gcc"
rustflags = ["-C", "embed-bitcode"]
#rustflags = ["-C", "embed-bitcode", "-C", "prefer-dynamic"]https://github.com/likon/hello-rust然后make menuconfig应该会出现hello-rust了。