refactor: separate core logic into a library crate granc-core
#16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant internal refactor of the
grancproject, decoupling core dynamic gRPC client logic into a new reusable library crate (granc-core). It also improves project organization, updates documentation, and enhances workspace configuration. The main CLI functionality is now built atop this new core, making future maintenance and extensibility easier.Project structure and workspace improvements:
granc-core, to encapsulate all core dynamic gRPC client logic, including schema resolution, dynamic request dispatch, and reflection support. This enables potential reuse outside the CLI and clarifies project boundaries. (granc-core/Cargo.toml,granc-core/src/client.rs, [1] [2] [3]Cargo.tomlto includegranc-core, centralize dependency versions, and set workspace-wide package metadata for consistency. (Cargo.toml, Cargo.tomlL2-R26)echo-serviceand other crates to use workspace-wide settings for edition and authors. (echo-service/Cargo.toml, echo-service/Cargo.tomlL3-R3)Documentation :
README.mdfor both the main project and the newgranc-corelibrary, providing clear installation, usage, and architecture guidance for users and contributors. (README.md,granc-core/README.md, [1] [2]Build and tooling updates:
Makefile.tomlto use workspace-wide test runs and renamed tasks/binaries for consistency with the new crate layout. (Makefile.toml, [1] [2]Key changes:
1. Core library extraction and refactor
GrancClient, request/response types, and reflection handling) into a newgranc-corecrate, decoupling it from the CLI and preparing for independent publishing. [1] [2]2. Workspace and dependency management
Cargo.tomlto addgranc-coreas a workspace member, centralize dependency versions, and set workspace-wide metadata fields (authors, edition, license, etc.).echo-serviceand new crates to inherit workspace settings for consistency.3. Documentation
README.mdfiles for both the main project and the new core library, with installation, usage, and architecture sections. [1] [2]CHANGELOG.mdto document project history and recent changes.4. Build and CI tooling
Makefile.tomlto reflect the new workspace structure and binary names. [1] [2]5. Housekeeping
This refactor lays the groundwork for improved maintainability, easier future development, and potential wider adoption of the dynamic gRPC client logic outside the CLI.