Commit graph

57 commits

Author SHA1 Message Date
github-actions[bot]
cd63af7436
chore: release v0.2.1 (#12)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-21 13:52:24 +01:00
JasterV
eaf99b1034 chore: update README 2026-01-21 13:50:59 +01:00
github-actions[bot]
e5b1296ab5
chore: release v0.2.0 (#10)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-21 13:33:23 +01:00
Víctor Martínez
8cc7003344
refactor: implement automatic reflection (#9)
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]](diffhunk://#diff-0648f0ef1e166ae07f3ab14aa268c3497c2e3a49ffa189f85f9dfb88493f2440R17-L19) [[2]](diffhunk://#diff-0648f0ef1e166ae07f3ab14aa268c3497c2e3a49ffa189f85f9dfb88493f2440L34-R44) [[3]](diffhunk://#diff-0648f0ef1e166ae07f3ab14aa268c3497c2e3a49ffa189f85f9dfb88493f2440L57-R101) [[4]](diffhunk://#diff-0648f0ef1e166ae07f3ab14aa268c3497c2e3a49ffa189f85f9dfb88493f2440L97) [[5]](diffhunk://#diff-0648f0ef1e166ae07f3ab14aa268c3497c2e3a49ffa189f85f9dfb88493f2440L106-R125)

**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.
2026-01-21 13:29:17 +01:00
JasterV
81b4d1ac1c chore: update README 2026-01-20 18:32:53 +01:00
JasterV
37f2d40b09 refactor: rename to granc, grab is taken 2026-01-20 18:26:16 +01:00
Víctor Martínez
a533c4aa83 feat: initial release 2026-01-20 18:10:23 +01:00