Add a license
Implement more of the game
Refactor server + client a bit and remove Test endpoint
This repo will eventually contain an implementation of the game Rummikub, but right now it just has a minimal test gRPC server in Rust, and client in Go.
Different components of the ecosystem require different tools to be installed.
The test client is written in Go, and uses auto-generated protobuf/gRPC that is checked in. To run the test client, first install Go, then run:
go run github.com/bcspragu/rummikub/cmd/testclient
If the test server isn't running, you'll get a message like:
error calling Test endpoint: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:50051: connect: connection refused" exit status 1
And if it is:
Response message: hello Testing
If you want to update the rummikub.proto gRPC spec
file, you'll want to be able to update the gRPC auto-generated code as well for
Go. This requires installing
protoc
, which is the 'compiler'
that translates .proto
files into auto-generated code for a language.
Once protoc
is installed, you'll need the Go Proto and Go gRPC extensions as
well, which can be installed with go install
, see the Go gRPC
Quickstart for more info.
After that, you can run ./scripts/gen_go.sh
to update the generated Go proto
and gRPC code.
The test server is written in Rust, and uses the standard Rust package manager, Cargo. To run the test server, first install Rust and Cargo, then run:
cargo run --bin server
You should see something like:
Server listening on [::1]:50051
The Rust proto/gRPC code is auto-generated during the build process and doesn't need to be done manually.
If you do want to look at the auto-generated code, you can run:
OUT_DIR=$PWD cargo run --bin force-build --features build_deps
This will put a rummikub.rs
in the root of the repo that contains the
auto-generated code. See this SO answer
for more info.