Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proc macros]: can't define trait without client feature which brings lots of unecessary deps. #649

Closed
Tracked by #573
niklasad1 opened this issue Jan 13, 2022 · 2 comments

Comments

@niklasad1
Copy link
Member

niklasad1 commented Jan 13, 2022

I noticed after the refactoring of the core crate and if I want to do:

use jsonrpsee::{core::RpcResult, proc_macros::rpc};

#[rpc(client, server, namespace = "myapi")]
pub trait MyApi {
	#[method(name = "submitBytes")]
	async fn submit_bytes(&self,  bytes: Vec<u8>) -> RpcResult<()>;
}

To get the client traits required then one must enable the client feature which brings in a bunch of dependencies from http-client and ws-client.

Maybe we could enable "jsonrpsee-core/client" in the macros feature it's really light weight just a few of our own types.

@niklasad1 niklasad1 mentioned this issue Jan 13, 2022
7 tasks
@dvdplm
Copy link
Contributor

dvdplm commented Jan 13, 2022

Makes sense to me.

@niklasad1
Copy link
Member Author

Closed by #656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants