1mod app;
9mod dynamic;
10mod font;
11mod game;
12mod layout;
13mod media;
14mod platform;
15mod reactive;
16mod render;
17mod scene;
18mod style;
19mod system;
20mod window;
21
22#[cfg(test)]
23#[path = "../tests/mod.rs"]
24mod tests;
25
26pub use {
27 app::*, dynamic::*, font::*, game::*, layout::*, media::*, platform::*, reactive::*, render::*,
28 scene::*, style::*, system::*, window::*,
29};
30
31#[cfg(all(unix, not(target_os = "watchos")))]
32use std::ffi::CStr;
33#[cfg(all(unix, not(target_os = "watchos")))]
34use std::ffi::CString;
35#[cfg(all(unix, not(target_os = "watchos")))]
36use std::ffi::c_char;
37#[cfg(any(unix, windows))]
38use std::ffi::c_void;
39#[cfg(any(target_os = "macos", target_os = "ios"))]
40use std::mem::size_of_val;
41#[cfg(unix)]
42use std::mem::zeroed;
43#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
44use std::process::{Command, Stdio};
45#[cfg(target_os = "android")]
46use std::ptr::copy_nonoverlapping;
47#[cfg(any(all(unix, not(target_os = "android")), windows))]
48use std::ptr::null;
49#[cfg(target_arch = "wasm32")]
50use std::sync::{Arc, Mutex, MutexGuard};
51#[cfg(not(target_arch = "wasm32"))]
52use std::{
53 any::Any,
54 env, fs,
55 hint::spin_loop,
56 io::{self, BufRead, BufReader, ErrorKind, IsTerminal, Read, Write, stderr, stdout},
57 net::{SocketAddr, TcpStream, ToSocketAddrs},
58 slice::from_raw_parts,
59 str::Lines,
60 sync::{Arc, Condvar, Mutex, MutexGuard, OnceLock, PoisonError},
61 thread::{Builder, JoinHandle, available_parallelism, current, sleep},
62 time::{Duration, Instant},
63};
64use std::{
65 any::TypeId,
66 borrow::Cow,
67 cell::{Cell, Ref, RefCell, RefMut},
68 collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
69 error::Error,
70 f32::consts::{FRAC_PI_2, FRAC_PI_3, PI, SQRT_2, TAU},
71 fmt::{self, Formatter},
72 hash::{Hash, Hasher},
73 marker::PhantomData,
74 mem::{MaybeUninit, align_of, size_of, swap, take, transmute},
75 ops::{Add, Mul, Sub},
76 path::{Path, PathBuf},
77 ptr::{drop_in_place, null_mut},
78 rc::Rc,
79 slice::from_raw_parts_mut,
80 str::{Chars, from_utf8},
81 sync::atomic::{AtomicBool, AtomicPtr, AtomicU64, AtomicUsize, Ordering},
82 thread::panicking,
83};
84#[cfg(all(test, not(target_arch = "wasm32")))]
85use std::{net::TcpListener, thread::spawn};
86
87use {
88 lombok_macros::{CustomDebug, Data, Getter, New},
89 serde::{
90 Deserialize, Serialize,
91 ser::{SerializeStruct, Serializer},
92 },
93 serde_json::{Value, from_str, to_string, to_string_pretty},
94};
95
96#[cfg(target_arch = "wasm32")]
97use {
98 js_sys::{Array, Function, Object, Promise, Reflect, Uint8Array, global},
99 wasm_bindgen::{Clamped, JsCast, JsValue, closure::Closure},
100 web_sys::{
101 CanvasRenderingContext2d, Document, DomRect, Element, Event, HtmlCanvasElement,
102 HtmlElement, ImageData, MediaQueryList, Navigator, Performance, TextMetrics,
103 WebGl2RenderingContext, WebGlProgram, WebGlShader, WebGlUniformLocation, Window, window,
104 },
105};