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.
- Install the Rust development environment
- 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 theprotobuf
plugins forGolang
:
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
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.
- 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