#grpc-client #client #gen #querying #type-safe #api-version #client-for-querying #hardware #status #starlink

starlink-grpc-client

A safe, async, type-safe client for querying Starlink Gen 3 Dishy via gRPC

3 unstable releases

0.4.1 May 17, 2025
0.4.0 May 16, 2025
0.3.2 May 15, 2025

#1013 in Network programming

Download history 146/week @ 2025-05-10 220/week @ 2025-05-17 4/week @ 2025-05-24

85 downloads per month

MIT license

325KB
7.5K SLoC

Starlink gRPC Client

A safe, async, and type-safe Rust client for querying status information from a Starlink Gen 3 Dishy via gRPC

  • API version: 33
  • Fully tested on hardware version: rev4_panda_prod1

✨ Features

  • ✅ Simple API to query dish status
  • ✅ Fully async with Tokio
  • Type-safe models wrapping raw gRPC responses
  • ✅ Clean error handling with thiserror
  • ✅ Ready for polling integrations or CLI tools

🚀 Getting Started

Add to Your Cargo.toml

[dependencies]
starlink-grpc-client = "0.4.1"
tokio = "1.45.0"

(or whatever the last version is)


Example Usage

use starlink_grpc_client::client::DishClient;

#[tokio::main]
async fn main() {
    let mut client = DishClient::connect("http://dishy.starlink.com:9200")
        .await
        .expect("Failed to connect to Dish");

    let status = client.get_status()
        .await
        .expect("Failed to fetch dish status");

    println!("{:#?}", status);
}

✅ See working examples in usage.rs, stream.rs and with simple charts


📑 Public API Summary

Method Signature Description
connect pub async fn connect(endpoint: &str) -> Result<Self, DishError> Create a new client by dialing the given URL.
get_status pub async fn get_status(&mut self) -> Result<DishStatus, DishError> Perform a single, unary status RPC.
stream_status pub async fn stream_status(&mut self) -> Result<impl Stream<Item = Result<DishStatus, DishError>>, DishError> Poll getStatus once per second, silently.
stream_status_logged pub async fn stream_status_logged(&mut self) -> Result<impl Stream<Item = Result<(DishStatus, Duration), DishError>>, DishError> Poll with outbound logs and true RTT measurement.

🛠️ Features Roadmap

  • Push-based streaming support (server-driven updates)
  • Configurable polling API
  • Prometheus / Grafana integration
  • CLI binary interface
  • JSON serialization helpers

📦 Building From Source

Clone the repository and build:

git clone https://github.com/andywwright/starlink-grpc-client.git
cd starlink-grpc-client
cargo build

🧱 Regenerating gRPC Bindings (Protobuf)

If you change the .proto files and need to regenerate the Rust bindings, use the build-protos feature:

cargo build --features build-protos
  • This will regenerate files into proto_bindings.
  • You must commit these regenerated files if you want the default build to work for consumers.

When to use this:

  • When updating .proto definitions.
  • When preparing a new crate release with updated API.

When not needed:

  • Regular consumers or users do not need to run this.
  • Default builds use the already checked-in generated code without protoc.

✅ Semantic Versioning

This project follows Semantic Versioning 2.0.0:

  • MAJOR: Breaking changes
  • MINOR: Backward-compatible features
  • PATCH: Bug fixes

Current Version: 0.1.0 (Developer Preview)


📝 License

MIT License. See LICENSE for details.


💬 Feedback and Contributions

Dependencies

~5–18MB
~186K SLoC