Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/einride/protocrate-rs
Generate Rust crate for protobuf schemas and gRPC APIs.
https://github.com/einride/protocrate-rs
grpc protobuf rust
Last synced: 3 months ago
JSON representation
Generate Rust crate for protobuf schemas and gRPC APIs.
- Host: GitHub
- URL: https://github.com/einride/protocrate-rs
- Owner: einride
- License: mit
- Created: 2020-02-18T07:15:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T12:46:34.000Z (5 months ago)
- Last Synced: 2024-09-17T15:55:34.918Z (5 months ago)
- Topics: grpc, protobuf, rust
- Language: Rust
- Homepage: https://crates.io/crates/protocrate
- Size: 93.8 KB
- Stars: 5
- Watchers: 17
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Protobuf Rust Crate Generator
Tool for generating a Rust crate from one or multiple trees of protobuf files.
Protobuf code is generated using [PROST!](https://github.com/tokio-rs/prost) and gRCP using [Tonic](https://github.com/hyperium/tonic).Generated code is structured in modules according to the protobuf package name.
## Build
```console
dev@work:~$ cargo build
```## Example Usage
Generate a crate named `my-pb-crate` in direcotry `gen` using protobuf files from the directories `proto/common`, `proto/internal` and `proto/external`:
```console
dev@work:~$ protocrate --output-dir gen --pkg-name my-pb-crate --pkg-version 0.2.1 proto/common proto/internal proto/external
```