mirror of
https://codeberg.org/JasterV/granc.git
synced 2026-04-26 18:40:05 +00:00
This pull request removes the custom-generated gRPC reflection protocol code from the repository and switches to using the `tonic-reflection` crate’s built-in protocol definitions. It also cleans up related tooling and dependencies that are no longer needed. ### Migration to `tonic-reflection` for gRPC reflection * Replaced internal generated protocol types in `granc-core/src/reflection/client.rs` with imports from `tonic_reflection::pb::v1`, removing the need for the local `generated` module. [[1]](diffhunk://#diff-13deee04dd97de938cc46f0ef4faca083f3b471800e94cf45937122b83f01d57L19-L23) [[2]](diffhunk://#diff-13deee04dd97de938cc46f0ef4faca083f3b471800e94cf45937122b83f01d57R29-R33) * Deleted the `granc-core/src/reflection/generated.rs` module, which previously contained the generated Rust code for the reflection protocol. * Removed the reflection proto file (`granc-tools/proto/reflection.proto`) and the `granc-tools` crate, including its build tooling and dependencies, as they are no longer needed. [[1]](diffhunk://#diff-152ff715d002656dc972a294d86490c4857848392f54c73ac7e8818191ca617dL1-L149) [[2]](diffhunk://#diff-8a8fd674fd23e14d5c7a1ab242678a860560b0eee27cd248254510a3d585cbb4L1-L15) [[3]](diffhunk://#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L2-R2) [[4]](diffhunk://#diff-9375fd04332c86472d7be397ef09428cb86babd8826880a5835bd1d1c1bdbc08L43-L53) ### Dependency and configuration cleanup * Updated `granc-core/Cargo.toml` to add `tonic-reflection` as a regular dependency (not just a dev-dependency) and removed the now-unnecessary dev-dependency. ### Codebase simplification * Removed the now-unused `mod generated;` declaration from `granc-core/src/reflection.rs`.
37 lines
1 KiB
TOML
37 lines
1 KiB
TOML
[package]
|
|
authors = { workspace = true }
|
|
categories = ["network-programming"]
|
|
description = "Cranc gRPC CLI core library"
|
|
edition = { workspace = true }
|
|
homepage = { workspace = true }
|
|
keywords = ["grpc", "network-programming", "grpc-reflection"]
|
|
license = { workspace = true }
|
|
name = "granc_core"
|
|
publish = true
|
|
readme = "README.md"
|
|
repository = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
version = "0.4.0"
|
|
|
|
[lib]
|
|
name = "granc_core"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
futures-util = "0.3.31"
|
|
http = "1.4.0"
|
|
http-body = "1.0.1"
|
|
prost = { workspace = true }
|
|
prost-reflect = { workspace = true, features = ["serde"] }
|
|
prost-types = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = "2.0.18"
|
|
tokio = { workspace = true, features = ["sync"] }
|
|
tokio-stream = "0.1.18"
|
|
tonic = { workspace = true }
|
|
tonic-prost = { workspace = true }
|
|
tonic-reflection = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
echo-service = { path = "../echo-service" }
|
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|