{"id":15419503,"url":"https://github.com/jonathanbeber/rust-grpc-example","last_synced_at":"2026-05-17T15:40:55.712Z","repository":{"id":101108521,"uuid":"261418118","full_name":"jonathanbeber/rust-grpc-example","owner":"jonathanbeber","description":"A rust gRPC server and CLI example","archived":false,"fork":false,"pushed_at":"2020-05-05T12:19:17.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T05:14:02.659Z","etag":null,"topics":["cli","example-project","grpc","rust","rust-lang"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanbeber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-05T09:52:20.000Z","updated_at":"2020-05-08T14:49:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"acb5797b-c438-42cb-9e83-297e2f3d8788","html_url":"https://github.com/jonathanbeber/rust-grpc-example","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"9928f4c042a96fa0614eed54b712b7e426a4c6bb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanbeber%2Frust-grpc-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanbeber%2Frust-grpc-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanbeber%2Frust-grpc-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanbeber%2Frust-grpc-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanbeber","download_url":"https://codeload.github.com/jonathanbeber/rust-grpc-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245966929,"owners_count":20701759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","example-project","grpc","rust","rust-lang"],"created_at":"2024-10-01T17:25:15.226Z","updated_at":"2025-10-04T16:56:39.653Z","avatar_url":"https://github.com/jonathanbeber.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust gRPC example\n\nThis repository contains a Rust [gRPC](https://grpc.io/) service and its CLI as a simple implementation example.\n\nIt uses the [tikv/grpc-rs](https://github.com/tikv/grpc-rs) crate combined with the [stepancheg/rust-protobuf](https://github.com/stepancheg/rust-protobuf/).\n\nThis code is based on an hiring coding challenge. I removed all the references to the company and its resources.\n\n# Docs\n\n* The [ADRs](https://labs.spotify.com/2020/04/14/when-should-i-write-an-architecture-decision-record/) used to define the system are in the `docs` path;\n* Run `cargo doc --open` for code documentation. For those using purely docker, unfortunately, this project does not export the docs from the docker image yet but the docker image has `lynx` installed. You can read the docs inside the container with `cargo doc \u0026\u0026 lynx /usr/src/stock/target/doc/stock/index.html`;\n\n# Run it!\n\nThe script `run.sh` will start the environment, returning the user a shell with the client configured. The docker image created here is only to be used as an easy way to test the application. This docker image should not be used in production environments.\n\n**Obs**: `run.sh` needs docker installed and running.\n\n```bash\n$ bash run.sh\n```\n\nIt'll generate an output similar to the following, resulting in a console into a client container:\n\n```bash\n...\nlong build output\n...\nSuccessfully built IMAGEID\nSuccessfully tagged jonathanbeber/stock:v0.1.0\n...\nroot@CONTAINERID:/usr/src/stock# client --help\nroot@CONTAINERID:/usr/src/stock# client --host server list --store VENEZA_IT\nroot@CONTAINERID:/usr/src/stock# client --host server list --show-unavailable\nroot@CONTAINERID:/usr/src/stock# client --host server list --show-unavailable --store BERLIN_DE\n```\n\nIn this container, the command `client` is the CLI application with access to the server.\n\nIt's also possible to run the tests inside this container.\n\n```\nroot@CONTAINERID:/usr/src/stock# cargo test\n```\n\n## Check the server logs\n\nOn `Cargo.toml` the external crate `slog` is defined with `TRACE` log level even for release. It's not recommended at all for production environments. It's configured this way to create better visibility for the challenge.\n\nTo check the server logs, run: `docker logs -f server`. This command must be run out of the client container on the Docker host machine.\n\n# Development\n\n## Requirements\n\nThis application is written in Rust. Check the [docs](https://www.rust-lang.org/tools/install) to install it.\n\n## Starting the server\n\n```bash\ncargo run --bin server\n\n```\nIt's possible to define the listener address with `cargo run --bin server -- --addr HOST:PORT`.\n\nE.g.:\n\n```\neg:  cargo run --bin server -- --addr 0.0.0.0:8080\n```\n\n## Running tests\n\n```\ncargo test\n```\n\n## Protos\n\nThe proto files are located on the `src/proto/stock.proto`. During the build, `stock.rs` and `stock_grpc.rs` will be generated. These files are not supposed to be committed and are already configured on `.gitignore`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanbeber%2Frust-grpc-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanbeber%2Frust-grpc-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanbeber%2Frust-grpc-example/lists"}