I can compile and run my Rust project without any problems using cargo run --release
. As a second step I simply want to create the binary using cargo build --release
and then executing it by running ./target/release/crate_name
(it is also explained here). Executing the binary results in the behaviour that some shared libraries are not found. This is my Cargo.toml
:
[package]
name = "onnx-test"
version = "0.1.0"
edition = "2023"
[dependencies]
actix-web = "4"
futures = "0.3.26"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
onnxruntime = "0.0.14"
image = "0.24.5"
imageproc = "0.23.0"
rusttype = "0.9.3"
lazy_static = "1.4.0"
base64 = "0.21.0"
actix-cors = "0.6.4"
derive_more = "0.99.17"
actix-web-validator = "5.0.1"
validator = { version = "0.16", features = ["derive"] }
regex = "1.5.6"
And this is the error message: error while loading shared libraries: libonnxruntime.so.1.8.1: cannot open shared object file: No such file or directory
.
So my question, is cargo run --release
linking some libraries implicitly? I mean the library exisits somewhere in the target/release/build/...
path. I did not found out anything by providing the --verbose
flag.
EDIT
ls target/release
:
build
deps
examples
incremental
onnx-test onnx-test.d