open_coroutine_core/
lib.rs

1#![deny(
2    // The following are allowed by default lints according to
3    // https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
4    absolute_paths_not_starting_with_crate,
5    explicit_outlives_requirements,
6    macro_use_extern_crate,
7    redundant_lifetimes,
8    anonymous_parameters,
9    bare_trait_objects,
10    // elided_lifetimes_in_paths, // allow anonymous lifetime
11    missing_copy_implementations,
12    missing_debug_implementations,
13    missing_docs,
14    // single_use_lifetimes, // TODO: fix lifetime names only used once
15    // trivial_casts,
16    trivial_numeric_casts,
17    unreachable_pub,
18    // unsafe_code,
19    unstable_features,
20    // unused_crate_dependencies,
21    unused_lifetimes,
22    unused_macro_rules,
23    unused_extern_crates,
24    unused_import_braces,
25    unused_qualifications,
26    unused_results,
27    variant_size_differences,
28
29    warnings, // treat all wanings as errors
30
31    clippy::all,
32    // clippy::restriction,
33    clippy::pedantic,
34    // clippy::nursery, // It's still under development
35    clippy::cargo,
36)]
37#![allow(
38    // Some explicitly allowed Clippy lints, must have clear reason to allow
39    clippy::blanket_clippy_restriction_lints, // allow clippy::restriction
40    clippy::implicit_return, // actually omitting the return keyword is idiomatic Rust code
41    clippy::module_name_repetitions, // repeation of module name in a struct name is not big deal
42    clippy::multiple_crate_versions, // multi-version dependency crates is not able to fix
43    clippy::missing_errors_doc, // TODO: add error docs
44    clippy::missing_panics_doc, // TODO: add panic docs
45    clippy::panic_in_result_fn,
46    clippy::shadow_same, // Not too much bad
47    clippy::shadow_reuse, // Not too much bad
48    clippy::exhaustive_enums,
49    clippy::exhaustive_structs,
50    clippy::indexing_slicing,
51    clippy::separated_literal_suffix, // conflicts with clippy::unseparated_literal_suffix
52    clippy::single_char_lifetime_names, // TODO: change lifetime names
53    unknown_lints, // for windows nightly
54    linker_messages, // for windows nightly
55    unused_attributes, // for windows nightly
56)]
57#![doc = include_str!("../docs/en/overview.md")]
58
59/// Common traits and impl.
60pub mod common;
61
62/// Configuration for `EventLoops`.
63#[allow(missing_docs)]
64pub mod config;
65
66#[doc = include_str!("../docs/en/coroutine.md")]
67pub mod coroutine;
68
69#[cfg(all(unix, feature = "preemptive"))]
70#[doc = include_str!("../docs/en/monitor.md")]
71mod monitor;
72
73/// Schedule many coroutines.
74pub mod scheduler;
75
76/// Coroutine pool abstraction and impl.
77#[doc = include_str!("../docs/en/coroutine-pool.md")]
78pub mod co_pool;
79
80/// net abstraction and impl.
81#[allow(dead_code)]
82#[cfg(feature = "net")]
83pub mod net;
84
85/// Syscall impl.
86#[allow(
87    missing_docs,
88    clippy::similar_names,
89    clippy::not_unsafe_ptr_arg_deref,
90    clippy::many_single_char_names,
91    clippy::useless_conversion,
92    clippy::unnecessary_cast,
93    trivial_numeric_casts
94)]
95#[cfg(feature = "syscall")]
96pub mod syscall;