1#![allow(clippy::new_ret_no_self)]
27
28#[cfg(not(target_arch = "wasm32"))]
29extern crate gl;
30#[cfg(not(target_arch = "wasm32"))]
31extern crate glutin;
32
33#[cfg(target_arch = "wasm32")]
34extern crate console_error_panic_hook;
35#[cfg(target_arch = "wasm32")]
36extern crate js_sys;
37#[cfg(target_arch = "wasm32")]
38extern crate wasm_bindgen;
39#[cfg(target_arch = "wasm32")]
40extern crate web_sys;
41
42#[macro_use]
43extern crate failure;
44#[macro_use]
45extern crate log;
46
47#[macro_use]
48extern crate cgmath;
49#[macro_use]
50extern crate serde;
51extern crate byteorder;
52extern crate serde_json;
53
54extern crate crossbeam_deque;
55extern crate inlinable_string;
56extern crate smallvec;
57
58pub extern crate bincode;
59pub extern crate uuid;
60
61pub use cgmath::{assert_relative_eq, assert_relative_ne, assert_ulps_eq, assert_ulps_ne};
62pub use cgmath::{relative_eq, relative_ne, ulps_eq, ulps_ne};
63pub use log::{error, info, warn};
64
65pub mod errors;
66#[macro_use]
67pub mod utils;
68pub mod application;
69#[macro_use]
70pub mod video;
71pub mod input;
72pub mod math;
73pub mod prelude;
74pub mod res;
75pub mod sched;
76pub mod window;
77
78#[macro_export]
79macro_rules! main {
80 ($codes: block) => {
81 #[cfg(target_arch = "wasm32")]
82 extern crate wasm_bindgen;
83 #[cfg(target_arch = "wasm32")]
84 use wasm_bindgen::prelude::wasm_bindgen;
85
86 #[cfg(target_arch = "wasm32")]
87 #[wasm_bindgen(start)]
88 pub fn run() {
89 $codes
90 }
91
92 fn main() {
93 #[cfg(not(target_arch = "wasm32"))]
94 $codes
95 }
96 };
97}