Skip to content

Commit

Permalink
feat: add derive feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Mar 1, 2024
1 parent 3961682 commit f68d101
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

0 comments on commit f68d101

Please sign in to comment.