Skip to content

Conversation

@JasterV
Copy link
Owner

@JasterV JasterV commented Jan 20, 2026

This pull request introduces dynamic server reflection support to the granc CLI, allowing users to call gRPC services without needing a local descriptor file. The changes include new reflection client logic, CLI and core refactoring, an updated README, and build system improvements.

Server Reflection Support:

  • Added a copy of the official grpc.reflection.v1 proto file to granc/proto/reflection.proto to enable dynamic schema fetching from servers that support reflection.
  • Implemented logic in the core orchestration layer (granc/src/core.rs) to resolve service descriptors either from a local file or dynamically via server reflection. The CLI now works seamlessly whether or not a --proto-set is provided.

CLI and Core Refactoring:

  • Moved the CLI definition to granc/src/cli.rs, now supporting an optional --proto-set, improved endpoint parsing, and conversion to the new internal core Input type.
  • Refactored the core logic into granc/src/core.rs and implemented a more structured input, output and error handling, now making the core logic unit testable.

Documentation and Usability:

  • Updated granc/README.md to document the new server reflection feature, clarify usage with and without descriptor files, and revise CLI argument documentation and examples. [1] [2] [3] [4] [5]

Generating a reflection service:

  • Updated granc/Cargo.toml to add a gen-proto feature, declare both binaries (granc and generate_reflection_service), and manage dependencies for reflection and proto generation.
  • Improved Makefile.toml with new tasks for generating the reflection service client.

@JasterV JasterV marked this pull request as draft January 20, 2026 23:48
@JasterV JasterV force-pushed the feat/automatic-reflection branch 2 times, most recently from 13ce769 to 35d9c1e Compare January 21, 2026 00:48
@JasterV JasterV force-pushed the feat/automatic-reflection branch from 35d9c1e to 2288720 Compare January 21, 2026 00:52
@JasterV JasterV force-pushed the feat/automatic-reflection branch from 5df5410 to 945f816 Compare January 21, 2026 02:42
@JasterV JasterV force-pushed the feat/automatic-reflection branch from 8181c6d to 4a908ca Compare January 21, 2026 10:00
@JasterV JasterV force-pushed the feat/automatic-reflection branch from 2b48dce to 330d92b Compare January 21, 2026 11:49
@JasterV JasterV force-pushed the feat/automatic-reflection branch from 330d92b to 6042fca Compare January 21, 2026 11:54
@JasterV JasterV force-pushed the feat/automatic-reflection branch from f86df75 to fa2bf67 Compare January 21, 2026 11:56
@JasterV JasterV marked this pull request as ready for review January 21, 2026 12:02
@JasterV JasterV merged commit 8cc7003 into main Jan 21, 2026
4 checks passed
This was referenced Jan 21, 2026
@JasterV JasterV deleted the feat/automatic-reflection branch January 21, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants