sunset_async/lib.rs
1//! Async for [Sunset SSH](sunset)
2//!
3//! [`SSHClient`] and [`SSHServer`] provide async-executor agnostic SSH
4//! implementations. These can be used on full-sized async platforms
5//! (Tokio, smol, etc) as well as on `no_std` embedded platforms such as
6//! [`embassy-executor`](https://docs.rs/embassy-executor).
7//!
8//! On std platforms some higher level functionality is in
9//! `sunset-stdasync` crate.
10//! [`embedded-io-adapters`](https://docs.rs/embedded-io-adapters)
11//! can be used for `Read` or `Write` traits with different async runtimes.
12
13#![cfg_attr(not(any(feature = "std", test)), no_std)]
14#![forbid(unsafe_code)]
15// avoid mysterious missing awaits
16#![deny(unused_must_use)]
17// Nested if statements are often more logical,
18// or allow for future additions.
19#![allow(clippy::collapsible_if)]
20
21mod async_channel;
22mod async_sunset;
23mod client;
24mod server;
25
26pub use client::SSHClient;
27pub use server::SSHServer;
28
29pub use async_channel::{ChanIn, ChanInOut, ChanOut};
30
31pub use async_sunset::{ProgressHolder, SunsetMutex, SunsetRawMutex};
32
33// Re-exports
34pub use sunset;
35
36pub use embedded_io_async;