af_core/
lib.rs

1// Copyright © 2020 Alexandra Frydl
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7//! A core library and async runtime for Rust applications.
8//!
9//! # Quick start
10//!
11//! In `Cargo.toml`:
12//! ```toml
13//! [dependencies]
14//! af-core = "0.1"
15//! ```
16//!
17//! In `src/main.rs`:
18//! ```ignore
19//! use af_core::prelude::*;
20//!
21//! #[af_core::main]
22//! async fn main() {
23//!   info!("Hello world!");
24//! }
25//! ```
26
27pub mod channel;
28pub mod derive;
29pub mod env;
30pub mod error;
31pub mod fail;
32pub mod fmt;
33pub mod future;
34pub mod iter;
35pub mod lazy;
36pub mod log;
37pub mod math;
38pub mod path;
39pub mod prelude;
40pub mod random;
41mod run;
42pub mod stream;
43pub mod string;
44pub mod task;
45pub mod test;
46pub mod thread;
47pub mod time;
48pub mod util;
49
50pub use self::fail::fail;
51pub use self::random::random;
52pub use self::run::{run, run_with};
53pub use af_core_macros::main;
54pub use serde_json as json;