Skip to main content

euv_core/
lib.rs

1//! euv-core
2//!
3//! A declarative, cross-platform UI framework for Rust with virtual DOM,
4//! reactive signals, and HTML macros for WebAssembly.
5
6mod app;
7mod event;
8mod noderef;
9mod reactive;
10mod renderer;
11mod vdom;
12
13#[cfg(test)]
14#[path = "../tests/registry/mod.rs"]
15mod tests;
16
17pub use {app::*, event::*, noderef::*, reactive::*, vdom::*};
18
19pub use std::{
20    borrow::Cow,
21    collections::hash_map::DefaultHasher,
22    collections::{HashMap, HashSet, VecDeque},
23    fmt::{self, Debug, Display, Formatter},
24    hash::{Hash, Hasher},
25    iter::Iterator,
26    marker::PhantomData,
27    mem::{swap, take, zeroed},
28    panic::{AssertUnwindSafe, catch_unwind},
29    sync::{LazyLock, OnceLock, RwLock, RwLockReadGuard},
30    thread::LocalKey,
31};
32
33pub use {js_sys::*, lombok_macros::*, wasm_bindgen::prelude::*, web_sys::*};
34
35pub(crate) use bin_encode_decode::{Charset, EncodeError};
36
37/// The wall clock [`now_micros`] reads on a host build. On wasm the clock
38/// comes from JS instead, so importing this there is an `unused_imports`
39/// warning — the mirror of the dead-const warning the host build would give
40/// the other half of the same function.
41#[cfg(not(target_arch = "wasm32"))]
42pub(crate) use std::time::{SystemTime, UNIX_EPOCH};
43
44pub(crate) use renderer::*;
45
46use std::{
47    any::Any,
48    cell::{Cell, Ref, RefCell, RefMut, UnsafeCell},
49    num::ParseIntError,
50    rc::Rc,
51    str::from_utf8,
52    sync::{
53        PoisonError, RwLockWriteGuard,
54        atomic::{AtomicBool, AtomicUsize, Ordering},
55    },
56    thread::AccessError,
57    vec::Vec,
58};