Skip to main content

ravenrs/
lib.rs

1#![doc = include_str!("../README.md")]
2//!
3//! ## Crates behind this facade
4//!
5//! [`core`], [`animation`], [`reactive`], [`layout`], [`text`], [`style`], [`render`] and [`widgets`]
6//! can also be used on their own.
7
8/// Keeps the code in the skill for AI assistants compiling.
9#[cfg(doctest)]
10#[doc = include_str!("../../../plugins/ravenrs/skills/ravenrs/SKILL.md")]
11struct SkillDoctests;
12
13pub use ravenrs_animation as animation;
14pub use ravenrs_core as core;
15pub use ravenrs_layout as layout;
16/// The interpreter behind `LiveRunner`, for registering more of an app's own types.
17#[cfg(feature = "live")]
18pub use ravenrs_live as live;
19pub use ravenrs_movie as movie;
20pub use ravenrs_reactive as reactive;
21pub use ravenrs_render as render;
22pub use ravenrs_style as style;
23pub use ravenrs_text as text;
24pub use ravenrs_widgets as widgets;
25
26/// Desktop windows (Windows, macOS, Linux).
27#[cfg(not(target_arch = "wasm32"))]
28pub mod native {
29    pub use ravenrs_platform_native::{
30        AppIdentity, OpenDialog, PlatformError, SaveDialog, SystemNotifier, SystemTray, WindowOptions,
31        diagnose, open_url, open_with_system, run, run_as, run_with_icon,
32    };
33}
34
35/// The browser: a `<canvas>` driven by WebGPU.
36#[cfg(target_arch = "wasm32")]
37pub mod web {
38    pub use ravenrs_platform_web::{IndexedDbStorage, WebApp, WebBackend, WebError, WebOptions, start};
39}
40
41/// Everything an app usually needs, in one import.
42pub mod prelude {
43    pub use ravenrs_animation::{Animated, Easing, Spring, Transition};
44    pub use ravenrs_core::{
45        AccessAction, AccessTree, Color, CursorIcon, Effect, ImageData, ImageQuad, Insets, LinearGradient,
46        Point, Quad, Rect, Role, Scene, Shadow, Size, Toggled,
47    };
48    pub use ravenrs_layout::{Align, Justify};
49    pub use ravenrs_reactive::{Binding, Derived, State};
50    pub use ravenrs_style::{Semantic, TextStyle, Theme, Weight};
51    pub use ravenrs_widgets::*;
52}