summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/webhogg/src/lib.rs
blob: 8b75ee1a6d3ca583b8cc48083bc7311c1f48bdad (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
25
mod client_logger;
mod webhogg_exception;
mod app;

use wasm_bindgen::prelude::*;
use app::WebhoggApplication as App;

#[macro_use]
extern crate log;

fn run_application() {
    match App::new().and_then(|mut app| app.run()) {
        Ok(_) => info!("program terminated successfully"),
        Err(e) => error!("program terminated with failure > {}", e)
    }
}

#[wasm_bindgen(start)]
pub fn entry() {
    client_logger::init_logger();

    info!("begin running wasm application");

    run_application()
}