Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
CARGO_HOME: ${{ github.workspace }}/.cargo
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu
OPENSSL_INCLUDE_DIR: /usr/include
steps:
- uses: actions/checkout@v4
with:
Expand Down
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ uuid = "1.6"
[build-dependencies]
cmake = "0.1"
cxx-build = "=1.0.138" # should match the `cxx` version
openssl-sys = "0.9"
rustversion = "1"

[dev-dependencies]
Expand Down
17 changes: 3 additions & 14 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,9 @@ fn link_libraries(link_bundled_deps: bool) {
println!("cargo:rustc-link-lib=dylib=stdc++");
}

// liblbug.a requires OpenSSL — try pkg-config for the lib path, then emit link directives
if let Ok(output) = std::process::Command::new("pkg-config")
.args(["--variable=libdir", "openssl"])
.output()
{
if output.status.success() {
let lib_dir = String::from_utf8_lossy(&output.stdout).trim().to_string();
if !lib_dir.is_empty() {
println!("cargo:rustc-link-search=native={lib_dir}");
}
}
}
println!("cargo:rustc-link-lib=dylib=ssl");
println!("cargo:rustc-link-lib=dylib=crypto");
// liblbug.a requires OpenSSL — the openssl-sys build-dependency handles
// discovery via pkg-config, OPENSSL_* env vars, or vendored source.
// Its build.rs emits the necessary cargo:rustc-link-lib directives.

if !link_bundled_deps {
return;
Expand Down
Loading