Skip to main content

linuxcnc_grpc/
lib.rs

1//! # LinuxCNC gRPC Client
2//!
3//! This crate provides Rust types and gRPC client stubs for communicating
4//! with a LinuxCNC gRPC server.
5//!
6//! ## Example
7//!
8//! ```rust,no_run
9//! use linuxcnc_grpc::linuxcnc::linux_cnc_service_client::LinuxCncServiceClient;
10//! use linuxcnc_grpc::linuxcnc::GetStatusRequest;
11//!
12//! #[tokio::main]
13//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
14//!     let mut client = LinuxCncServiceClient::connect("http://localhost:50051").await?;
15//!
16//!     let request = tonic::Request::new(GetStatusRequest {});
17//!     let response = client.get_status(request).await?;
18//!
19//!     println!("Status: {:?}", response);
20//!     Ok(())
21//! }
22//! ```
23
24/// LinuxCNC machine control types and service definitions
25pub mod linuxcnc {
26    tonic::include_proto!("linuxcnc");
27}
28
29/// HAL (Hardware Abstraction Layer) types and service definitions
30pub mod hal {
31    tonic::include_proto!("hal");
32}
33
34// Re-export commonly used types at crate root
35pub use linuxcnc::*;