Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.99 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.99 KB

EGUI gRPC

Ubuntu Client Ubuntu Server

A minimal example project that contains a client-server gRPC application made with EGUI (Rust) and Go.

NOTE: Works on Ubuntu22.04, not sure about other OSs.

Setup

Client

Server

  • Install the latest Go version
  • Add protoc 21.6 in order to compile the protobuf files (copy the bin file into /usr/bin for proper usage)
  • Navigate to server in your terminal and install the protobuf plugins for Golang:
go install google.golang.org/protobuf/cmd/protoc-gen-go
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

Generate protobuf files

To do this successfully, the protobuf dependencies should be installed as previously described. For the server, position the terminal into proto_messages and execute the following:

protoc --go_out=../backend --go-grpc_out=../backend *.proto

The client should be generated with the build.rs during the application build so no additional steps required.

For more information, you can have a look this blog post.

Run

  • Make sure the protobuf files are previously generated
  • Navigate to server and execute:
go run .
  • To run the EGUI application, navigate to the client folder and type the following:
cargo run --release