I just have a simple rust ffi demo, I want to get a dynamic lib.
dev_value/
├── Cargo.toml
├── src
└── lib.rs
Cargo.toml:
[package]
name = "dev_value"
version = "0.1.0"
authors = ["laurencechan]
edition = "2019"[lib]
crate-type = ["cdylib"][dependencies]
src/lib.rs:
#[no_mangle]
pub extern "C" fn dec_value() {
println!("execute the rust lib by laurence!!!!!!!!!!!!!!!!!!!!!!!!!!!")
}
when i execute the command "cargo build --release --target=arm-unknown-linux-gnueabihf" in the project root path, I got this error message:
Compiling dev_value v0.1.0 (/home/dev_value)
error[E0463]: can't find crate forstd
error: aborting due to previous error
For more information about this error, try
rustc --explain E0463
.
error: Could not compiledev_value
.To learn more, run the command again with --verbose.