cln-grpc: Generate grpc bindings from proto

This is the easy way, since there's already tooling for this.
This commit is contained in:
Christian Decker 2022-01-14 20:01:34 +01:00
parent d01b2c21a7
commit 4c105d2424
2 changed files with 18 additions and 0 deletions

15
cln-grpc/Cargo.toml Normal file
View File

@ -0,0 +1,15 @@
[package]
name = "cln-grpc"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0"
log = "0.4"
cln-rpc = { path="../cln-rpc" }
tonic = { version = "^0.5", features = ["tls", "transport"] }
prost = "0.8"
hex = "0.4.3"
[build-dependencies]
tonic-build = "^0.5"

3
cln-grpc/build.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
tonic_build::compile_protos("proto/node.proto").unwrap();
}