From ff20d8d18df560f0f6eb0db08e5e0fc5928e7648 Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Tue, 23 Jan 2024 23:03:12 -0500 Subject: [PATCH] Add conditional external crate dependencies --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3217cbc..91dde65 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,13 @@ +// Needed for building in Docker container +// See https://github.com/clux/muslrust?tab=readme-ov-file#diesel-and-pq-builds +// See https://github.com/sgrif/pq-sys/issues/25 +#[cfg(target = "x86_64-unknown-linux-musl")] +extern crate openssl; + +#[cfg(target = "x86_64-unknown-linux-musl")] +#[macro_use] +extern crate diesel; + #[cfg(feature = "ssr")] #[actix_web::main] async fn main() -> std::io::Result<()> {