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(any(
32 target_os = "macos",
33 target_os = "ios",
34 target_os = "linux",
35 target_os = "android"
36))]
37use std::ffi::CStr;
38#[cfg(unix)]
39use std::ffi::CString;
40#[cfg(unix)]
41use std::ffi::c_char;
42#[cfg(any(unix, windows))]
43use std::ffi::c_void;
44#[cfg(any(target_os = "macos", target_os = "ios"))]
45use std::mem::size_of_val;
46#[cfg(unix)]
47use std::mem::zeroed;
48#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
49use std::process::{Command, Stdio};
50#[cfg(target_os = "android")]
51use std::ptr::copy_nonoverlapping;
52#[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", windows))]
53use std::ptr::null;
54#[cfg(target_arch = "wasm32")]
55use std::sync::{Arc, Mutex, MutexGuard};
56#[cfg(not(target_arch = "wasm32"))]
57use std::{
58 any::Any,
59 env, fs,
60 hint::spin_loop,
61 io::{self, BufRead, BufReader, ErrorKind, IsTerminal, Read, Write, stderr, stdout},
62 net::{SocketAddr, TcpStream, ToSocketAddrs},
63 slice::from_raw_parts,
64 str::Lines,
65 sync::{Arc, Condvar, Mutex, MutexGuard, OnceLock, PoisonError},
66 thread::{Builder, JoinHandle, available_parallelism, current, sleep},
67 time::{Duration, Instant},
68};
69use std::{
70 any::TypeId,
71 borrow::Cow,
72 cell::{Cell, Ref, RefCell, RefMut},
73 collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
74 error::Error,
75 f32::consts::{FRAC_PI_2, PI, SQRT_2, TAU},
76 fmt::{self, Formatter},
77 hash::{Hash, Hasher},
78 marker::PhantomData,
79 mem::{MaybeUninit, align_of, size_of, swap, take, transmute},
80 ops::{Add, Mul, Sub},
81 ptr::{drop_in_place, null_mut},
82 rc::Rc,
83 slice::from_raw_parts_mut,
84 str::{Chars, from_utf8},
85 sync::atomic::{AtomicBool, AtomicPtr, AtomicU64, AtomicUsize, Ordering},
86 thread::panicking,
87};
88#[cfg(all(test, not(target_arch = "wasm32")))]
89use std::{net::TcpListener, thread::spawn};
90
91use {
92 lombok_macros::{CustomDebug, Data, Getter, New},
93 serde::{Deserialize, Serialize},
94 serde_json::{Value, from_str, to_string, to_string_pretty},
95};
96
97#[cfg(target_arch = "wasm32")]
98use {
99 js_sys::{Function, Object, Promise, Reflect, Uint8Array},
100 wasm_bindgen::{Clamped, JsCast, JsValue, closure::Closure},
101 web_sys::{
102 CanvasRenderingContext2d, Clipboard, Document, DomRect, Element, Event, HtmlCanvasElement,
103 ImageData, MediaQueryList, Navigator, Performance, TextMetrics, WebGl2RenderingContext,
104 WebGlProgram, WebGlShader, WebGlUniformLocation, Window, window,
105 },
106};