init: it builds

This commit is contained in:
鲁树人
2024-09-02 21:01:19 +01:00
commit ff11a8186e
23 changed files with 1073 additions and 0 deletions

19
um_wasm/src/lib.rs Normal file
View File

@@ -0,0 +1,19 @@
mod utils;
use utils::set_panic_hook;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
fn alert(s: &str);
}
#[wasm_bindgen]
pub fn init() {
set_panic_hook();
}
#[wasm_bindgen]
pub fn greet() {
alert("hello world!");
}