Skip to main content

compio_runtime/
lib.rs

1//! The compio runtime.
2//!
3//! ```
4//! let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
5//!     println!("Hello world!");
6//!     42
7//! });
8//! assert_eq!(ans, 42);
9//! ```
10
11#![cfg_attr(docsrs, feature(doc_cfg))]
12#![cfg_attr(feature = "current_thread_id", feature(current_thread_id))]
13#![cfg_attr(feature = "future-combinator", feature(context_ext, local_waker))]
14#![allow(unused_features)]
15#![warn(missing_docs)]
16#![deny(rustdoc::broken_intra_doc_links)]
17#![doc(
18    html_logo_url = "https://github.com/compio-rs/compio-logo/raw/refs/heads/master/generated/colored-bold.svg"
19)]
20#![doc(
21    html_favicon_url = "https://github.com/compio-rs/compio-logo/raw/refs/heads/master/generated/colored-bold.svg"
22)]
23
24mod affinity;
25mod attacher;
26mod cancel;
27pub mod fd;
28mod runtime;
29
30#[cfg(feature = "future-combinator")]
31pub mod future;
32#[cfg(feature = "time")]
33pub mod time;
34
35pub use async_task::Task;
36pub use attacher::*;
37pub use cancel::CancelToken;
38use compio_buf::BufResult;
39#[allow(hidden_glob_reexports, unused)]
40use runtime::RuntimeInner; // used to shadow glob export so that RuntimeInner is not exported
41pub use runtime::*;