cln-grpc: Derive serde Serialize/Deserialize for types
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -267,6 +267,7 @@ dependencies = [
|
|||||||
"hex",
|
"hex",
|
||||||
"log",
|
"log",
|
||||||
"prost",
|
"prost",
|
||||||
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tonic",
|
"tonic",
|
||||||
"tonic-build",
|
"tonic-build",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ log = "0.4"
|
|||||||
cln-rpc = { path="../cln-rpc/", version = "^0.1", optional = true }
|
cln-rpc = { path="../cln-rpc/", version = "^0.1", optional = true }
|
||||||
tonic = { version = "0.8", features = ["tls", "transport"] }
|
tonic = { version = "0.8", features = ["tls", "transport"] }
|
||||||
prost = "0.11"
|
prost = "0.11"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
bitcoin = { version = "0.30", features = [ "serde" ] }
|
bitcoin = { version = "0.30", features = [ "serde" ] }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
let builder = tonic_build::configure();
|
let builder = tonic_build::configure();
|
||||||
builder
|
builder
|
||||||
|
.type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]")
|
||||||
.protoc_arg("--experimental_allow_proto3_optional")
|
.protoc_arg("--experimental_allow_proto3_optional")
|
||||||
.compile(&["proto/node.proto"], &["proto"])
|
.compile(&["proto/node.proto"], &["proto"])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user