#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::must_use_candidate)]
#![allow(clippy::wildcard_imports)]
#![allow(clippy::ptr_as_ptr)]
#![allow(clippy::used_underscore_binding)]
#![allow(clippy::unused_async)]
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::missing_panics_doc)]
#![allow(clippy::similar_names)]
#![allow(clippy::too_many_lines)]
#![allow(clippy::new_without_default)]
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::borrowed_box)]
#![allow(clippy::return_self_not_must_use)]
#![allow(clippy::needless_pass_by_value)]
#![allow(clippy::new_ret_no_self)]
#![allow(clippy::single_match_else)]
#[cfg(not(feature = "std"))]
extern crate alloc;
pub mod platform;
pub mod error;
pub mod executor;
pub mod memory;
pub mod pool;
pub mod scheduler;
pub mod task;
#[cfg(feature = "std")]
pub mod channel;
#[cfg(feature = "coroutine")]
pub mod coroutine;
#[cfg(feature = "std")]
pub mod communication;
#[cfg(all(any(unix, windows), feature = "std"))]
pub mod ipc;
pub use error::{ExecutorError, SchedulerError, TaskError};
pub use executor::{ExecutorConfig, TaskManager, TaskSpawner, TaskStatus};
pub use scheduler::SchedulerId;
pub use task::{Priority, Task, TaskBuilder, TaskContext, TaskExt, TaskFuture, TaskHandle, TaskId};
#[cfg(feature = "std")]
pub use channel::{
mpmc, spsc, unbounded, unified_channel, unified_channel_with_config, Channel, ChannelConfig,
ChannelError, ChannelStatistics, Consumer, MpmcChannel, MpmcReceiver, MpmcSender, Producer,
Select, SpscConsumer, SpscProducer, SpscReceiver, SpscRing, SpscSender, UnifiedReceiver,
UnifiedSender,
};
pub use moirai_utils::CacheAligned;
#[cfg(feature = "coroutine")]
pub use coroutine::{
Coroutine, CoroutineExt, CoroutineFuture, CoroutineIterator, CoroutineResult, CoroutineState,
FunctionCoroutine,
};
pub use platform::{Arc, Box, String, Vec};
pub type BoxError = Box<dyn core::error::Error + Send + Sync>;
pub type Result<T> = core::result::Result<T, BoxError>;
pub mod prelude {
pub use crate::{
ExecutorError, Priority, SchedulerError, SchedulerId, Task, TaskContext, TaskError,
TaskExt, TaskFuture, TaskId, TaskManager, TaskSpawner, TaskStatus,
};
#[cfg(feature = "std")]
pub use crate::{
mpmc, spsc, unbounded, Channel, ChannelError, Consumer, MpmcReceiver, MpmcSender, Producer,
SpscConsumer, SpscProducer, SpscReceiver, SpscRing, SpscSender,
};
}