summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/asm-paint/src/lib.rs
blob: a4f4f548bcd779d20062604afa576726c354a095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mod utils;

use wasm_bindgen::prelude::*;

// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator.
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

#[wasm_bindgen]
extern {
    fn my_alert(s: &str);
}

#[wasm_bindgen]
pub fn greet() {
    my_alert("Hello, asm-paint!");
}