1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! # Example
//!
//! Make sure to run the following before:
//! ```text
//! arduino-cli daemon
//! ```
//!
//! ## Code
//!
//! ```rust
//! use arduino_cli_client::commands::arduino_core_client::ArduinoCoreClient;
//! use arduino_cli_client::commands::{BoardListReq, InitReq};
//! use tonic::Request;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let mut client = ArduinoCoreClient::connect("http://localhost:50051").await?;
//!
//! // Start a new instance of the Arduino Core Service
//! let resp_instance = client
//! .init(Request::new(InitReq {
//! library_manager_only: false,
//! }))
//! .await?
//! .into_inner()
//! .message()
//! .await?
//! .expect("Failed to init");
//!
//! // List the boards currently connected to the computer.
//! let resp_boards = client
//! .board_list(Request::new(BoardListReq {
//! instance: resp_instance.instance,
//! }))
//! .await?
//! .into_inner();
//!
//! print!("Boards: {:?}", resp_boards.ports);
//! Ok(())
//! }
//! ```
//!
/// Main Arduino Platform service
/// Service that abstract a debug Session usage
/// Service that abstracts a Monitor usage
/// The Settings service provides an interface to Arduino CLI's configuration options
pub use crateArduinoCoreClient;
pub use crateDebugClient;
pub use crateMonitorClient;
pub use crateSettingsClient;