grpcurl-rs-0.2.1 is not a library.
grpcurl-rs
A Rust port of grpcurl -- a
command-line tool for interacting with gRPC servers. Like curl for gRPC.
grpcurl-rs supports all core grpcurl features: server reflection, proto/protoset file sources, all four RPC types (unary, server streaming, client streaming, bidi streaming), TLS/mTLS, verbose output, and descriptor export.
Installation
From source
Build from repository
# Binary at target/release/grpcurl
Usage
List services
# Via server reflection
# Via proto file (no server needed)
# Via protoset file (no server needed)
List methods of a service
Describe a symbol
# Describe a service
# Describe a message with a JSON template
Invoke an RPC
# Unary call with inline JSON
# Read request from stdin
|
# Server streaming
# Verbose output (headers, trailers, metadata)
TLS connections
# Standard TLS (system root CAs)
# Custom CA certificate
# Mutual TLS (client certificate)
# Skip certificate verification (insecure)
# Plaintext (no TLS)
Headers and metadata
# Add headers to all requests
# RPC-only headers (excluded from reflection)
# Reflection-only headers
# Expand environment variables in headers
Export descriptors
# Export as protoset (binary FileDescriptorSet)
# Export as .proto source files
Feature Parity with Go grpcurl
grpcurl-rs achieves 95.8% feature parity with the Go version (69/72 verification cases match byte-for-byte).
Supported
- All three modes:
list,describe,invoke - Server reflection (v1 and v1alpha with auto-negotiation)
- Proto source files (
--proto,--import-path) - Protoset files (
--protoset) - Composite source (reflection + file fallback)
- All four RPC types: unary, server streaming, client streaming, bidi streaming
- JSON and text format (
--format json|text) - Verbose output (
-v,--vv) - TLS, mTLS, insecure, plaintext connections
- Unix domain sockets (
--unix) - Custom headers (
-H,--rpc-header,--reflect-header,--expand-headers) --emit-defaults,--allow-unknown-fields,--msg-template--protoset-out,--proto-out-dirdescriptor export--max-msg-sz,--max-time,--connect-timeout,--keepalive-time--format-errorfor structured error outputSSLKEYLOGFILEsupport- Gzip compression (transparent decompression)
- gRPC status code to exit code mapping (+64 offset)
- Single-dash flag compatibility (
-plaintextworks like--plaintext)
Known Differences
| Area | Go grpcurl | grpcurl-rs | Impact |
|---|---|---|---|
| Help output | -plaintext |
--plaintext |
Both accepted at runtime |
| Text format | Legacy <> syntax |
Modern {} syntax |
Both valid protobuf text format |
--vv timing |
Timing data tree | Omitted | Stretch goal |
| ALTS | Supported | Not supported | No Rust equivalent exists |
| xDS | Supported | Not supported | No Rust equivalent exists |
Project Structure
grpcurl-rs/
grpcurl-core/ -- Library crate (descriptor sources, connection, formatting, invocation)
grpcurl-cli/ -- Binary crate (CLI parsing, validation, main entry point)
testing/
testserver/ -- Test gRPC server with reflection
bankdemo/ -- Bank demo gRPC server (auth, streaming, chat)
tls/ -- Test TLS certificates
Library Usage
The grpcurl-core crate can be used programmatically:
use ;
use ServerSource;
use DescriptorSource;
async
Documentation
- CLI Usage Guide -- comprehensive flag reference, examples, and patterns
- Architecture -- crate split, module map, data flow, design decisions
- Contributing -- build, test, add flags, release process
Testing
# Run offline tests (no server needed)
# Run all tests including server-dependent tests
See docs/CONTRIBUTING.md for details on the test infrastructure and categories.
License
MIT