nexstar_rust
Rust helpers for the Celestron NexStar handset serial protocol: build command frames and parse #-terminated responses.
This crate is a Rust port of the Dart/Flutter NexStar protocol library spin7ion/nexstar_flutter (command builders and response parsing). Behavior follows that project, with a few protocol fixes noted in the source where the original had clear mistakes.
API reference (this crate on Docs.rs): nexstar_rust on docs.rs
Source: github.com/spin7ion/nexstar_rust
Contact: spin7ion@gmail.com · spin@7ion.ru
This crate handles encoding and decoding only. It does not open a serial port; wire those bytes up with your platform’s UART/USB stack (for example serialport on desktop).
Quick start
Add the crate to your project:
[]
= "0.1"
Build bytes and parse a reply:
use ;
let v = build_get_version_command;
let reply_from_mount = ;
match v.parse_response
Examples
| Example | What it shows |
|---|---|
build_commands |
Common command strings / byte vectors |
parse_responses |
Turning sample replies into structs |
API overview
factory—build_*functions for goto, sync, slew, GPS pass-through, etc.NexstarCommand::parse_response— dispatch toNexstarParsedResponse(position, version, void ack, …).utils— degree ↔ NexStar fraction, slew rate bytes, DMS helpers.
License
Licensed under either of Apache-2.0 or MIT at your option.
Publishing (maintainers)
See the Cargo Book: Publishing on crates.io. Run cargo publish --dry-run, then cargo login and cargo publish. Repository and homepage are set in Cargo.toml.