diff --git a/Cargo.toml b/Cargo.toml index 28c942b32..3e66112be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,8 +42,9 @@ exclude = [ bench = false [features] -default = ["prost-derive", "std"] -prost-derive = ["dep:prost-derive"] +default = ["derive", "std"] +derive = ["dep:prost-derive"] +prost-derive = ["derive"] # deprecated, please use derive feature instead no-recursion-limit = [] std = [] diff --git a/src/lib.rs b/src/lib.rs index 9c0d79cc2..756e5afbc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,10 +86,10 @@ where // Based on serde's equivalent re-export [1], but enabled by default. // // [1]: https://github.com/serde-rs/serde/blob/v1.0.89/serde/src/lib.rs#L245-L256 -#[cfg(feature = "prost-derive")] +#[cfg(feature = "derive")] #[allow(unused_imports)] #[macro_use] extern crate prost_derive; -#[cfg(feature = "prost-derive")] +#[cfg(feature = "derive")] #[doc(hidden)] pub use prost_derive::*; diff --git a/tests-no-std/Cargo.toml b/tests-no-std/Cargo.toml index fac52bed2..d8fc10d64 100644 --- a/tests-no-std/Cargo.toml +++ b/tests-no-std/Cargo.toml @@ -24,7 +24,7 @@ path = "../tests/src/lib.rs" anyhow = { version = "1.0.45", default-features = false } bytes = { version = "1", default-features = false } cfg-if = "1" -prost = { path = "..", default-features = false, features = ["prost-derive"] } +prost = { path = "..", default-features = false, features = ["derive"] } prost-types = { path = "../prost-types", default-features = false } protobuf = { path = "../protobuf" }