Add conditional external crate dependencies

This commit is contained in:
Ethan Girouard 2024-01-23 23:03:12 -05:00
parent 1d7f27a491
commit ff20d8d18d
Signed by: eta357
GPG Key ID: 7BCDC36DFD11C146

View File

@ -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<()> {