Kixunil / tonic_lnd

Rust implementation of LND RPC client using async GRPC library `tonic`
31 stars 46 forks source link

Questions about auto generated structs #2

Closed RCasatta closed 3 years ago

RCasatta commented 3 years ago

I absolutely love the fact that all the structs are generated from the proto file at build time avoiding the maintainability issues we have in https://github.com/rust-bitcoin/rust-bitcoincore-rpc.

I was wondering if it makes sense at some point to explicitly write those to src/ so that they get also documented and referenced in code?

Kixunil commented 3 years ago

TBH I both love it and hate it - love because it was easy to get something working soon, hate because the interface is clunky somewhere (getinfo takes an empty struct as parameter) and doesn't use types from bitcoin crate.

explicitly write those to src/

You mean commit the output of the code generator?

Because that's not something I would like. LND does this and I get ridiculous merge conflicts that can be only fixed by running sudo make rpc there - yes, sudo, I'm not kidding, at least I have Qubes... Thankfully tonic doesn't have this problem. Besides merge conflicts, I specifically wanted to support forked LND versions to make development of new stuff easier - what I did in loptos.

they get also documented and referenced

They already are - AFAIK whatever is missing is a bug of original proto file. :)

RCasatta commented 3 years ago

They already are - AFAIK whatever is missing is a bug of original proto file. :)

Where did I look to miss that !