#![feature(ascii_char)] #![feature(ascii_char_variants)] #![feature(async_closure)] #![feature(exit_status_error)] #![feature(rustc_private)] #![feature(fn_traits)] #![recursion_limit = "1024"] // TODO Remove pre 0.1 release, its just very annoying when prototyping and moving alot of stuff #![allow(dead_code)] #![allow(unused_imports)] pub mod api; pub mod app; #[cfg(feature = "ssr")] pub mod server; #[wasm_bindgen::prelude::wasm_bindgen] pub fn hydrate() { use cfg_if::cfg_if; use tracing::Level; use tracing_wasm::WASMLayerConfigBuilder; use crate::app::*; console_error_panic_hook::set_once(); cfg_if! { if #[cfg(debug_assertions)] { let conf = WASMLayerConfigBuilder::new() .set_max_level(Level::DEBUG) .build(); } else { let conf = WASMLayerConfigBuilder::new() .set_max_level(Level::INFO) .build(); } } tracing_wasm::set_as_global_default_with_config(conf); tracing::debug!("Hello, world!"); let body = leptos::leptos_dom::document() .body() .expect("body element to exist"); leptos::mount_to(body, App) }