Skip to content

huunguyencs/rust-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust gRPC using tonic

1. Get started:

Install protobuf-compiler and libprotobuf-dev

sudo apt install protobuf-compiler
sudo apt install libprotobuf-dev

2. Run manually:

cargo run --bin calculate-server

3. Build and run with docker

docker build -t calculate-server .
docker run -dp 0.0.0.0:50051:50051 calculate-server

4. Test

grpcurl -plaintext -import-path ./proto -proto calculate.proto -d '{"operand_first": 1, "operand_second": 2}' '127.0.0.1:50051' calculate.Calculate/Add

Response: { "result": 3 }

About

gRPC project in Rust lang using tonic

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published