invaders/src/lib.rs

16 lines
308 B
Rust

use wasm_bindgen::prelude::*;
mod utils;
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
#[wasm_bindgen]
pub fn wasm_main() {
#[cfg(feature = "console_error_panic_hook")]
utils::set_panic_hook();
utils::alert("hello wasm!");
}