mod app;
mod dynamic;
mod font;
mod game;
mod layout;
mod media;
mod platform;
mod reactive;
mod render;
mod scene;
mod style;
mod system;
mod window;
#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;
pub use {
app::*, dynamic::*, font::*, game::*, layout::*, media::*, platform::*, reactive::*, render::*,
scene::*, style::*, system::*, window::*,
};
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux"))]
use std::ffi::CStr;
#[cfg(unix)]
use std::ffi::CString;
#[cfg(unix)]
use std::ffi::c_char;
#[cfg(any(unix, windows))]
use std::ffi::c_void;
#[cfg(target_os = "windows")]
use std::mem::size_of;
#[cfg(any(target_os = "macos", target_os = "ios"))]
use std::mem::size_of_val;
#[cfg(unix)]
use std::mem::zeroed;
#[cfg(any(target_os = "linux", target_os = "android"))]
use std::path::Path;
#[cfg(target_os = "android")]
use std::ptr::copy_nonoverlapping;
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", windows))]
use std::ptr::null;
#[cfg(target_arch = "wasm32")]
use std::sync::{Arc, Mutex, MutexGuard};
use std::{
any::{Any, TypeId},
borrow::Cow,
cell::{Cell, Ref, RefCell, RefMut},
collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
error::Error,
f32::consts::{FRAC_PI_2, PI, SQRT_2, TAU},
fmt::{self, Formatter},
hash::{Hash, Hasher},
marker::PhantomData,
mem::{swap, take, transmute},
ops::{Add, Mul, Sub},
ptr::null_mut,
rc::Rc,
slice::from_raw_parts_mut,
str::{Chars, from_utf8},
sync::atomic::{AtomicBool, AtomicPtr, AtomicU64, AtomicUsize, Ordering},
};
#[cfg(not(target_arch = "wasm32"))]
use std::{
env, fs,
hint::spin_loop,
io::{self, BufRead, BufReader, ErrorKind, IsTerminal, Read, Write, stderr, stdout},
net::{SocketAddr, TcpStream, ToSocketAddrs},
slice::from_raw_parts,
str::Lines,
sync::{Arc, Condvar, Mutex, MutexGuard, OnceLock, PoisonError},
thread::{Builder, JoinHandle, available_parallelism, current, sleep},
time::{Duration, Instant},
};
#[cfg(all(test, not(target_arch = "wasm32")))]
use std::{net::TcpListener, thread::spawn};
use {
lombok_macros::{CustomDebug, Data, Getter, New},
serde::{Deserialize, Serialize},
serde_json::{Value, from_str, to_string, to_string_pretty},
};
#[cfg(target_arch = "wasm32")]
use {
js_sys::{Function, Object, Promise, Reflect},
wasm_bindgen::{Clamped, JsCast, JsValue, closure::Closure},
web_sys::{
CanvasRenderingContext2d, Clipboard, Document, DomRect, Element, HtmlCanvasElement,
ImageData, MediaQueryList, Navigator, TextMetrics, WebGl2RenderingContext, WebGlProgram,
WebGlShader, Window, window,
},
};