I'm trying to cross compile for my board which is in tier 3 target list, using command cargo +nightly build -Z build-std --target armv7-unknown-linux-uclibceabihf
, I successfully built a standard library.
I don't quite understand the process of cross compile in rust, so my question is how can I use this newly built library for my build process? cargo build --target armv7-unknown-linux-uclibceabihf
command still return error now.
Compiling rustify v0.1.0 (/root/Code/linux-port/app/rustify)
error[E0463]: can't find crate forstd
note: thearmv7-unknown-linux-uclibceabihf
target may not be installed
help: consider downloading the target withrustup target add armv7-unknown-linux-uclibceabihf
help: consider building the standard library from source withcargo build -Zbuild-std
So what I'm supposed to do next in order to build a bin file which uses some functions in std, thanks !
My current config.toml :
[build]
target = "armv7-unknown-linux-uclibceabihf"[target.armv7-unknown-linux-uclibceabihf]
linker = "arm-buildroot-linux-uclibcgnueabihf-gcc"