-
Notifications
You must be signed in to change notification settings - Fork 345
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
Use ln-types crate? #1167
Comments
We already have a number of those types internally (and where we don't we probably eventually should). Without some downstream user need to use types from such a crate I dunno what value it brings us integrating them (aside from it being harder to to update them), and presumably if a user needed better types support they could just depend on |
Some things I'm working on don't require a full lightning crate - e.g. when they use RPC, so avoiding long compile times is preferred. Having a shared crate can improve quality of that part of the code - more reviewers and contributors. Being small and simple should hopefully mitigate the possible update slowness. |
Right, so there's no requirement for them to have the same type :)
True, but for newtypes there's only so much code.
Maybe, but you can't just make a change in a single PR, you still have to go through making a change, getting a release cut, and then making the downstream change. It ends up being a lot of work for even simple things. |
Was thinking about this too and I'm not convinced it has zero value. Take for example loptos. It currently communicates with LND using GRPC but I could imagine adding support for custom backends and eventually someone implementing it for rust-lightning. In that case the types would have to be same or converted. To be clear I'm not claiming it's a huge improvement, just non-zero. Anyway, thanks for your response! If you believe it's not valuable enough feel free to close, no hard feelings, was worth asking anyway, I think. :) |
Yea, I'd say for now lets not bother - there are cases where users may want it, and if that becomes common we can reconsider, but there's an immediate maintenance burden that we'd have to pay even if no users ever care, which seems like a pain not worth taking on IMO. |
Yeah, good point. Not now, maybe later. |
I created an
ln-types
crate for my WIP and upcoming projects and was thinking it should be useful here as well. Is it something you'd like to use? I'm willing to move the crate torust-bitcoin
org and lower MSRV to 1.36 (didn't want to do extra work until confirmed) if yes. I only want it to keep the main goal of being Rust-idiomatic and allow relevant integrations.In particular,
NodeId
could be replaced but perhaps other things as well. TBH I'm not familiar withrust-lightning
codebase that much.If you have other suggestions or want to do a code review, I'd be happy to re receive those!
The text was updated successfully, but these errors were encountered: