1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # RavenRS
//!
//! Beautiful native interfaces, powered by Rust. Write the UI once with
//! declarative views and run it in a native window or in the browser
//! (WebAssembly + WebGPU), drawn by the same GPU renderer.
//!
//! ```no_run
//! use ravenrs::prelude::*;
//!
//! fn app() -> impl View {
//! let count = State::new(0);
//! let c = count.clone();
//! VStack::new((
//! Text::new("Welcome to RavenRS").style(TextStyle::Display),
//! Card::new(Text::bound(&count, |n| format!("Clicks: {n}")).style(TextStyle::Metric)),
//! Button::new("Get Started").on_click(move || c.update(|n| *n += 1)),
//! ))
//! .spacing(24.0)
//! .padding(32.0)
//! }
//!
//! # #[cfg(not(target_arch = "wasm32"))]
//! fn main() -> Result<(), ravenrs::native::PlatformError> {
//! ravenrs::native::run(app(), ravenrs::native::WindowOptions::new("Hello"))
//! }
//! # #[cfg(target_arch = "wasm32")]
//! # fn main() {}
//! ```
//!
//! The crates behind this facade can also be used on their own:
//! [`core`], [`reactive`], [`layout`], [`text`], [`style`], [`render`], [`widgets`].
pub use ravenrs_core as core;
pub use ravenrs_layout as layout;
pub use ravenrs_reactive as reactive;
pub use ravenrs_render as render;
pub use ravenrs_style as style;
pub use ravenrs_text as text;
pub use ravenrs_widgets as widgets;
/// Desktop windows (Windows, macOS, Linux).
/// The browser: a `<canvas>` driven by WebGPU.
/// Everything an app usually needs, in one import.