Generate clients with buf:
Ensure buf and protoc are installed on your system.
buf dep update ./proto
Install "protoc-gen-*" with cargo.
cargo install protoc-gen-prost
cargo install protoc-gen-prost-crate
cargo install protoc-gen-tonic
buf generate proto --template proto/buf.gen.rust.yaml
Outputs will be in out/ directory.
Install "protoc-gen-*" with npm.
npm install -g ts-proto
buf generate proto --template proto/buf.gen.ts.yaml
Outputs will be in services/ directory.
Install protolint with npx.
npx protolint
protolint lint proto
When using "vscode-proto3" extention in VS Code, add the following to the '.vscode/settings.json' file in order to make the import paths work.
{
"protoc": {
"options": ["--proto_path=proto"]
}
}
how to select only specific proto, use --path
args
buf generate proto --template service-apis/proto/buf.gen.py.yaml -o gen --path service-apis/proto/digitalkin/kin --path service-apis/proto/google