This is a bindgen wrapper of Loic Marechal's libOL.
If libOL.1.so
is not in the standard location you should define required environment variables in
.cargo/config.toml
(or define them in any other way):
[env]
LIBOL_INLCUDE_DIR="/path/to/libol-install/include"
# or
LIBOL_DIR="/path/to/libol-install"
# optionally
LIBOL_LIB_DIR="/path/to/lib"
Then
cargo add --git https://github.com/tucanos/marechal-libol-sys.git
To have rpath
propagated to your executables add the following code to you build.rs
(see this bug report for details).
if let Ok(rpath) = std::env::var("DEP_OL_1_RPATH") {
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,{rpath}");
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,{rpath}");
}