-
Notifications
You must be signed in to change notification settings - Fork 48
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
Explicit selection of RPCs using cargo features #29
Conversation
Why is it behind feature gate and not unconditional? Does it significantly increase compile time? |
I haven't benchmarked compile times. I'm using the feature gates to allow very selective dependency on the RPCs. Specifically, I have a use case that needs LND |
Would be cool to benchmark it a bit. If it doesn't increase compile time by let's say more than 5 seconds on some reasonable machine I probably wouldn't bother much with gates. But I don't mind them too much either. |
Ack. Posting benchmarks below. I still would want gates so I I can pick this feature and shake out the rest of the features. If PS: We could pick what features to make unconditional by observing what features are depended on most often by other features in the feature table
I suspect |
@Kixunil , I collected the above benchmarks. |
Cool, thank! It's funny that it really is those 5 sec. But the relative factor is ~2 which is a lot. I agree with having the gates. |
@Kixunil, I aggregated a bunch of my long running contributions under this PR. Primarily, it adds feature gates and adds Router RPC. Figured I could make all features available by default to avoid a breaking change for existing dependents in the wild. Dependents can now opt-out of features by applying explicit selections of rpcs they need |
These changes are included in fedimint fork of this library. Closing PR as stale. |
Allow explicit selection of RPCs using caargo features, for slimmer dependency and faster compilation. If no feature is selected, all are included by default
lightningrpc
feature gate.walletrpc
feature gate.versionrpc
feature gate.signrpc
andpeersrpc
feature gates respectivelycloses #26