1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![cfg_attr(docsrs, feature(doc_cfg))]

macro_rules! cfg_flag {
    ($flag:tt; $($i:item)*) => {
        $(
            #[cfg(feature = $flag)]
            #[cfg_attr(docsrs, doc(cfg(feature = $flag)))]
            $i
        )*
    };
}

cfg_flag!(
    "EventLoop";
    pub mod event_loop;
    pub use event_loop::EventLoop;
);

cfg_flag!(
    "Window";
    pub mod window;
    pub use window::Window;
);