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
26
27
28
29
30
31
32
33
34
35
36
37
38
#![no_std]
mod app;
mod browser;
mod clock;
mod inputs;
mod router;
mod utils;
pub use app::App;
pub use browser::{Browser, B};
pub use clock::PerformanceClock;
pub use inputs::Inputs;
pub use utils::encode_gcode_program;
use wasm_bindgen::prelude::*;
#[wasm_bindgen(start)]
pub fn on_module_loaded() {
console_error_panic_hook::set_once();
}
#[wasm_bindgen]
pub fn setup_world() -> App { App::new(Inputs::default()) }
#[wasm_bindgen]
pub fn poll(app: &mut App, browser: &Browser) { app.poll(browser); }
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;