blob: 401e99683789943f30d3ffb86e41fa94ad82fd2a (
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 wee_alloc;
extern crate console_error_panic_hook;
use wasm_bindgen::prelude::*;
use yew::prelude::App;
use std::panic;
use view::main::MainView;
// 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();
}
|