blob: b8e10a5e926cd83ef423813927e269fbf038f00a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#![recursion_limit = "1024"]
extern crate console_error_panic_hook;
extern crate wee_alloc;
use std::panic;
use view::main::MainView;
use wasm_bindgen::prelude::*;
use yew::prelude::App;
// Use `wee_alloc` as the global allocator.
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
pub mod view;
pub mod viewmodel;
fn init() {
panic::set_hook(Box::new(console_error_panic_hook::hook));
}
#[wasm_bindgen(start)]
pub fn run_app() {
init();
App::<MainView>::new().mount_to_body();
}
|