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",
target_os = "android"
))]
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(any(target_os = "macos", target_os = "ios"))]
use std::mem::size_of_val;
#[cfg(unix)]
use std::mem::zeroed;
#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use std::process::{Command, Stdio};
#[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};
#[cfg(not(target_arch = "wasm32"))]
use std::{
any::Any,
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},
};
use std::{
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::{MaybeUninit, align_of, size_of, swap, take, transmute},
ops::{Add, Mul, Sub},
ptr::{drop_in_place, null_mut},
rc::Rc,
slice::from_raw_parts_mut,
str::{Chars, from_utf8},
sync::atomic::{AtomicBool, AtomicPtr, AtomicU64, AtomicUsize, Ordering},
thread::panicking,
};
#[cfg(all(test, not(target_arch = "wasm32")))]
use std::{net::TcpListener, thread::spawn};
use {
lombok_macros::{CustomDebug, Data, Getter, New},
serde::{
Deserialize, Serialize,
ser::{SerializeStruct, Serializer},
},
serde_json::{Value, from_str, to_string, to_string_pretty},
};
#[cfg(target_arch = "wasm32")]
use {
js_sys::{Array, Function, Object, Promise, Reflect, Uint8Array},
wasm_bindgen::{Clamped, JsCast, JsValue, closure::Closure},
web_sys::{
CanvasRenderingContext2d, Document, DomRect, Element, Event, HtmlCanvasElement,
HtmlElement, ImageData, MediaQueryList, Navigator, Performance, TextMetrics,
WebGl2RenderingContext, WebGlProgram, WebGlShader, WebGlUniformLocation, Window, window,
},
};