blob: 698292003ee938bad14d491b0b07061fd0890232 (
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::MainView;
// Use `wee_alloc` as the global allocator.
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
mod view;
mod util;
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();
}
|