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    iter::Iterator,
22    marker::PhantomData,
23    mem::{swap, take, zeroed},
24    panic::{AssertUnwindSafe, catch_unwind},
25    sync::{LazyLock, OnceLock, RwLock, RwLockReadGuard},
26    thread::LocalKey,
27};
28
29pub use {js_sys::*, lombok_macros::*, wasm_bindgen::prelude::*, web_sys::*};
30
31pub(crate) use bin_encode_decode::{Charset, EncodeError};
32
33/// The wall clock [`now_micros`] reads on a host build. On wasm the clock
34/// comes from JS instead, so importing this there is an `unused_imports`
35/// warning — the mirror of the dead-const warning the host build would give
36/// the other half of the same function.
37#[cfg(not(target_arch = "wasm32"))]
38pub(crate) use std::time::{SystemTime, UNIX_EPOCH};
39
40pub(crate) use renderer::*;
41
42use std::{
43    any::Any,
44    cell::{Cell, Ref, RefCell, RefMut, UnsafeCell},
45    num::ParseIntError,
46    rc::Rc,
47    str::from_utf8,
48    sync::{
49        PoisonError, RwLockWriteGuard,
50        atomic::{AtomicBool, AtomicUsize, Ordering},
51    },
52    thread::AccessError,
53    vec::Vec,
54};