How to use the std I built for my tier 3 target in cross compile

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 for std
note: the armv7-unknown-linux-uclibceabihf target may not be installed
help: consider downloading the target with rustup target add armv7-unknown-linux-uclibceabihf
help: consider building the standard library from source with cargo 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"

You have to use -Zbuild-std when building your project. If you don't use -Zbuild-std when building your project a standard library built by -Zbuild-std is never used.

It works! Thank you

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.