spitfire_glow/
lib.rs

1pub mod app;
2pub mod graphics;
3pub mod renderer;
4
5#[cfg(target_arch = "wasm32")]
6pub mod log {
7    pub mod __internal__ {
8        use wasm_bindgen::prelude::*;
9
10        #[wasm_bindgen]
11        extern "C" {
12            #[wasm_bindgen(js_namespace = console)]
13            pub fn log(s: &str);
14        }
15    }
16
17    #[macro_export]
18    macro_rules! console_log {
19        ($($t:tt)*) => ($crate::log::__internal__::log(&format_args!($($t)*).to_string()))
20    }
21}
22#[cfg(not(target_arch = "wasm32"))]
23pub mod log {
24    #[macro_export]
25    macro_rules! console_log {
26        ($($t:tt)*) => (println!("{}", &format_args!($($t)*).to_string()))
27    }
28}
29
30pub mod prelude {
31    #[allow(unused_imports)]
32    pub use crate::{app::*, graphics::*, log::*, renderer::*};
33}