This project is a Rust-based server that handles gRPC requests. It uses Tokio, Tonic, and Prost for asynchronous operations and gRPC communication. The server is designed to demonstrate how to integrate and work with Git submodules in a Rust project, with a focus on using gRPC protocols.
This repository employs a submodule, submodule-provider-example
, which contains the necessary gRPC definition files. These files are essential for the server to interact with other services using gRPC.
- Submodule: submodule-provider-example
The submodule is already added in this repository, and all you need to do is initialize it locally.
To work with Git submodules, follow these steps:
-
Cloning the Repository with Submodules:
If you clone the repository and want to include the submodule, use:
git clone --recurse-submodules https://github.com/eyyyyyyy3/submodule-user-example-server.git
If you have already cloned the repository without the
--recurse-submodules
flag, you can initialize the submodule with the following commands:git submodule init git submodule update
-
Updating Submodules:
To update the submodule to the latest commit from the upstream repository, use:
git submodule update --remote
This will fetch the latest changes from the submodule's repository.
To start the server, follow these steps:
-
Navigate to the project directory:
cd submodule-user-example-server
-
Run the server:
cargo run
This will start the server, and it will begin handling incoming gRPC requests.