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
13pub use {app::*, event::*, noderef::*, reactive::*, vdom::*};
14
15pub use std::{
16    borrow::Cow,
17    collections::hash_map::DefaultHasher,
18    collections::{HashMap, HashSet, VecDeque},
19    fmt::{self, Debug, Display, Formatter},
20    hash::{Hash, Hasher},
21    marker::PhantomData,
22    mem::{swap, take, zeroed},
23    panic::{AssertUnwindSafe, catch_unwind},
24    sync::{LazyLock, OnceLock, RwLock, RwLockReadGuard},
25    thread::LocalKey,
26};
27
28pub use {js_sys::*, lombok_macros::*, wasm_bindgen::prelude::*, web_sys::*};
29
30pub use bin_encode_decode::{Charset, EncodeError};
31
32/// The wall clock [`now_micros`] reads on a host build. On wasm the clock
33/// comes from JS instead, so importing this there is an `unused_imports`
34/// warning — the mirror of the dead-const warning the host build would give
35/// the other half of the same function.
36#[cfg(not(target_arch = "wasm32"))]
37pub use std::time::{SystemTime, UNIX_EPOCH};
38
39pub(crate) use renderer::*;
40
41use std::{
42    any::Any,
43    cell::{Cell, Ref, RefCell, UnsafeCell},
44    num::ParseIntError,
45    rc::Rc,
46    sync::atomic::{AtomicBool, AtomicUsize, Ordering},
47    vec::Vec,
48};