From be52e6bfa87e1342dbfe45b5319f3f2bbbcbe101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Wed, 23 Feb 2022 21:05:31 +0100 Subject: [PATCH] fix(ffi): only build cdylib when the FFI cfg is active --- Cargo.toml | 3 --- src/lib.rs | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f2ee5efe3e..e87137f595 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,6 @@ include = [ #"build.rs", ] -[lib] -crate-type = ["lib", "staticlib", "cdylib"] - [dependencies] bytes = "1" futures-core = { version = "0.3", default-features = false } diff --git a/src/lib.rs b/src/lib.rs index f7a93a1959..9e30fab435 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,11 @@ #![cfg_attr(test, deny(warnings))] #![cfg_attr(all(test, feature = "nightly"), feature(test))] #![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(hyper_unstable_ffi, crate_type = "cdylib")] +#![cfg_attr( + hyper_unstable_ffi, + allow(unknown_lints, deprecated_cfg_attr_crate_type_name) +)] //! # hyper //!