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
//#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]
//! CrossBus is a platform-less runtime-less actor computing model
//!
//! - Runtime-less
//! - Platform-less
//! - Bare-Metal compatible
//! - Future-oriented routine and events
//! - Real-time Execution Control
//!
//!

#[macro_use]
extern crate alloc;

pub mod actor;
pub mod address;
pub mod blocker;
pub mod context;
pub mod delayer;
#[cfg(not(feature = "log"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "log"))))]
#[macro_use]
pub mod log;
pub mod message;
pub(crate) mod queue;
pub mod reactor;
pub mod register;
#[cfg(feature = "rt")]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
pub mod rt;
pub mod stream;
#[cfg(feature = "time")]
#[cfg_attr(docsrs, doc(cfg(feature = "time")))]
pub mod time;

#[cfg(feature = "derive")]
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
pub use crossbus_derive::{main, Message};

pub mod prelude {
    //! Some common traits and types

    pub use crate::actor::{ActingState, Actor, ActorId, ActorState, Future};
    pub use crate::address::{Addr, QueueError, Receiver, Sender};
    pub use crate::context::Context;
    pub use crate::reactor::{ReactingOrder, Reactor, ReactorPair};
    pub use crate::register::{ActorRegister, Register};
    #[cfg(feature = "rt")]
    pub use crate::rt::{self, SpawnJoinHandle, Spawning};
    pub use crate::{actor, address, context, message, reactor, register};
    #[cfg(feature = "derive")]
    #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
    pub use crossbus_derive::{main, Message};
    //pub use crate::blocker::{self, Blocker, BlockerState, Blocking, BlockingState};
    //pub use crate::delayer::{self, Delayer, DelayerState, Delaying, DelayingState};
    //pub use crate::message::{self, MStream, MStreamState, MStreaming, MStreamingState, Message};
    //pub use crate::stream::{self, Stream, StreamState, Streaming, StreamingState};
}