apis/
lib.rs

1//! # Apis <IMG STYLE="vertical-align: middle" SRC="https://raw.githubusercontent.com/spearman/apis/master/doc/apis.png">
2//!
3//! *Reactive, session-oriented, asynchronous process-calculus framework.*
4//!
5//! [Repository](https://github.com/spearman/apis)
6//!
7//! Processes are "reactive" threads with specified message handling and update
8//! behavior.
9//!
10//! Sessions are collections of Processes and Channels in a fixed communication
11//! topology. The `def_session!` macro is used to define a Session together with its
12//! Channels and Processes.
13//!
14//! A 'Program' defines a transition system with Sessions as nodes. The `def_program!`
15//! macro is used to define modes (Sessions) and transitions between them.
16
17#![feature(associated_type_defaults)]
18
19// NOTE: many of these public re-exports are required for use in macros
20pub use either;
21pub use log;
22pub use macro_machines;
23pub use strum;
24pub use vec_map;
25
26pub mod channel;
27pub mod message;
28pub mod process;
29pub mod program;
30pub mod session;
31#[cfg(doc)]
32pub mod example;
33
34pub use channel::Channel;
35pub use message::Message;
36pub use process::Process;
37pub use program::Program;
38pub use session::Session;
39
40pub fn report_sizes <CTX : session::Context + 'static> () {
41  println!("apis report sizes...");
42  session::report_sizes::<CTX>();
43  process::report_sizes::<CTX>();
44  channel::report_sizes::<CTX>();
45  message::report_sizes::<CTX>();
46  println!("...apis report sizes");
47}