A simple gRPC server and client implementation in Rust.
- Simple gRPC server implementation
- Matching gRPC client
- Asynchronous communication using Tokio
- Protocol Buffers for efficient data serialization
Before you begin, ensure you have met the following requirements:
- Rust (latest stable version)
- Cargo (comes with Rust)
- Protocol Buffers compiler (protoc)
To get this project up and running on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/DAGGE3R/rust-grpc.git cd rust-grpc-hello-world
-
Build the project:
cargo run
rust-grpc-hello-world/
│
├── src/
│ ├── server.rs # gRPC server implementation
│ └── client.rs # gRPC client implementation
│
├── proto/
│ └── helloworld.proto # Protocol Buffers definition
│
├── build.rs # Build script for compiling .proto files
└── Cargo.toml # Rust package manifest
-
Start the server:
cargo run --bin grpc-server
-
In a new terminal, run the client:
cargo run --bin grpc-client
The client will send a request to the server and print the response.
Made with ❤️ and Rust