Skip to content

Commit 9aeed3e

Browse files
authored
cnidarium: create proto module and refresh descriptor (#6)
This is toward release a `v0.81.0`.
1 parent 7fc3cbe commit 9aeed3e

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ documentation = "https://docs.rs/cnidarium"
1717
migration = []
1818
migration-proptests = ["migration"]
1919
default = ["metrics"]
20-
rpc = ["dep:tonic", "dep:prost", "dep:serde", "dep:pbjson", "dep:ibc-proto"]
20+
rpc = ["proto"]
21+
proto = ["dep:tonic", "dep:prost", "dep:serde", "dep:pbjson", "dep:ibc-proto"]
2122

2223
[dependencies]
2324
anyhow = "1.0.86"

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22

33
![Cnidarium](assets/cnidarium.jpg)
44

5+
Documentation at https://docs.rs/cnidarium/latest/cnidarium/
6+

src/gen/proto_descriptor.bin.no_lfs

-19.1 KB
Binary file not shown.

src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@ pub mod future;
8989

9090
#[cfg(feature = "rpc")]
9191
pub mod rpc;
92+
93+
#[cfg(feature = "proto")]
94+
pub mod proto;

src/rpc.rs

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
// Autogen code isn't clippy clean:
2-
#[allow(clippy::unwrap_used)]
3-
pub mod proto {
4-
pub mod v1 {
5-
include!("gen/penumbra.cnidarium.v1.rs");
6-
include!("gen/penumbra.cnidarium.v1.serde.rs");
7-
}
8-
9-
// https://github.com/penumbra-zone/penumbra/issues/3038#issuecomment-1722534133
10-
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("gen/proto_descriptor.bin.no_lfs");
11-
}
12-
131
pub struct Server {
142
storage: Storage,
153
}
@@ -21,13 +9,13 @@ impl Server {
219
}
2210
use std::pin::Pin;
2311

24-
use crate::read::StateRead;
25-
use crate::rpc::proto::v1::{
12+
use crate::proto::v1::{
2613
key_value_response::Value as JMTValue, non_verifiable_key_value_response::Value as NVValue,
2714
query_service_server::QueryService, watch_response as wr, KeyValueRequest, KeyValueResponse,
2815
NonVerifiableKeyValueRequest, NonVerifiableKeyValueResponse, PrefixValueRequest,
2916
PrefixValueResponse, WatchRequest, WatchResponse,
3017
};
18+
use crate::read::StateRead;
3119
use futures::{StreamExt, TryStreamExt};
3220
use regex::Regex;
3321
use tokio_stream::wrappers::ReceiverStream;

0 commit comments

Comments
 (0)