cln-grpc: Derive serde Serialize/Deserialize for types

This commit is contained in:
ok300 2024-01-25 18:47:35 +01:00 committed by Christian Decker
parent 33c838212e
commit a38d81dee0
3 changed files with 3 additions and 0 deletions

1
Cargo.lock generated
View File

@ -267,6 +267,7 @@ dependencies = [
"hex",
"log",
"prost",
"serde",
"serde_json",
"tonic",
"tonic-build",

View File

@ -18,6 +18,7 @@ log = "0.4"
cln-rpc = { path="../cln-rpc/", version = "^0.1", optional = true }
tonic = { version = "0.8", features = ["tls", "transport"] }
prost = "0.11"
serde = { version = "1.0", features = ["derive"] }
hex = "0.4.3"
bitcoin = { version = "0.30", features = [ "serde" ] }

View File

@ -1,6 +1,7 @@
fn main() {
let builder = tonic_build::configure();
builder
.type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]")
.protoc_arg("--experimental_allow_proto3_optional")
.compile(&["proto/node.proto"], &["proto"])
.unwrap();