https://crates.io/crates/avalanche-proto
avalanche-proto
Protobuf generated client and server resources for Avalanche gRPC in rust. The generated stubs use the upstream avalanchego/proto definitions as the source of truth and versioning will align with avalanchego releases.
Support for avalanchego protocol version 15+.
The release version will align with the protocol version for avalanchego. In our example linked above avalanchego is currently on protocol version 18. This aligns with the minor version of the avalanche-proto release. Patches to minor releases could include improvements or bug fixes.
bash
avalanche-proto = { version = "0.18", features = [] } // supports avalanchego protocol version 18
rust
use avalanche_proto::{
http::{
http_server::Http,
HttpRequest, HandleSimpleHttpResponse, HandleSimpleHttpRequest
},
google::protobuf::Empty,
};
```rust use avalanche_proto::grpcutil;
grpcutil::defaultserver() .addservice(VmServer::new(vm)) .servewithincoming(TcpListenerStream::new(listener)) .await .map_err(|e| { Error::new( ErrorKind::Other, format!("failed to serve vm service: {}", e), ) }) ```