ytitov / grpc-rust-dart-demo

routeguide tutorial base to start a rust and dart server/client project
0 stars 0 forks source link

This project contatins a rust and dart grpc servers and clients. Emphasis on rust server, and dart client. This was adapted from https://github.com/hyperium/tonic/blob/master/examples/routeguide-tutorial.md as a self contained project. Note the appendix for customizing proto building, only necessary if .proto files will be kept outside of this repo.

Requirements

proto files

The proto files are found inside the base proto folder. Anytime there is a change to any .proto files these commands must be executed to update the generated code

Generating code

Client - dart

Execute the gen_protos.sh script

Server - rust

Execute cargo run in the protobuild directory.

Server

database

Server needs a database, and assumes that there is one by default see -h if you try running the server. For local development simply enter the docker folder and use the script dc-dev.sh up which runs the development version of the setup. Add -d to it in order to run it in the background.

Starting

Enter the directory sy-server when running these commands:

Client

This is a dart client. Enter the directory sy-client

TODO: