aex/src/lib.rs

37 lines
863 B
Rust
Raw Normal View History

//! aex — a D&D 5e character sheet and campaign dashboard.
//!
//! Leptos 0.8 app with actix-web SSR and client-side hydration. The crate
//! root declares the modules and the WASM entry point; `main.rs` holds the
//! SSR server, `app.rs` the component tree.
2025-09-11 05:43:59 +00:00
pub mod app;
#[allow(unused_imports)]
2025-09-11 07:27:57 +00:00
use leptos::prelude::*;
#[macro_use]
extern crate log;
#[allow(unused_imports)]
#[macro_use]
extern crate anyhow;
pub (crate) mod prelude;
pub mod entities;
pub mod state;
pub mod utils;
pub mod statics;
mod components;
#[allow(unused_imports)]
2025-09-11 07:27:57 +00:00
use prelude::*;
/// WASM entry point: hydrates `App` into the server-rendered DOM.
/// Only compiled with the `hydrate` feature.
2025-09-11 05:43:59 +00:00
#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
use app::*;
console_error_panic_hook::set_once();
leptos::mount::hydrate_body(App);
}