diff options
author | natrixaeria <janng@gmx.de> | 2019-05-29 21:51:49 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-29 21:51:49 +0200 |
commit | bf0137c3fc6093df085b9d95cd251b7f67d94815 (patch) | |
tree | 435f024e02e4f0bd867d1ca5a829d3ef19a97545 /WebInterface/wasm/webhogg/src/lib.rs | |
parent | a6d2d62fae44b6d8c96e51055f7222bc679efc48 (diff) |
Create webhogg project directory
Diffstat (limited to 'WebInterface/wasm/webhogg/src/lib.rs')
-rw-r--r-- | WebInterface/wasm/webhogg/src/lib.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/WebInterface/wasm/webhogg/src/lib.rs b/WebInterface/wasm/webhogg/src/lib.rs new file mode 100644 index 0000000..8b75ee1 --- /dev/null +++ b/WebInterface/wasm/webhogg/src/lib.rs @@ -0,0 +1,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() +} |