Skip to content

Commit

Permalink
fix(proc-macros): make feature server-core compile (#1360)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 committed Apr 29, 2024
1 parent e52e82f commit 3a39ff9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jsonrpsee/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ cfg_client_transport! {

cfg_server! {
pub use jsonrpsee_server as server;
pub use jsonrpsee_core::server::*;
pub use tokio;
}

cfg_server_core! {
pub use jsonrpsee_core::server::*;
}

cfg_proc_macros! {
pub use jsonrpsee_proc_macros as proc_macros;
pub use tracing;
Expand Down
6 changes: 6 additions & 0 deletions jsonrpsee/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ macro_rules! cfg_server {
}
}

macro_rules! cfg_server_core {
($($item:item)*) => {
cfg_feature!("server-core", $($item)*);
}
}

macro_rules! cfg_proc_macros {
($($item:item)*) => {
cfg_feature!("jsonrpsee-proc-macros", $($item)*);
Expand Down

0 comments on commit 3a39ff9

Please sign in to comment.