This commit is contained in:
2020-01-30 21:11:12 +08:00
parent 66b3d096db
commit 9e8f93b667
9 changed files with 5600 additions and 0 deletions

13
wasm/src/lib.rs Normal file
View File

@@ -0,0 +1,13 @@
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern {
pub fn alert(s: &str);
}
#[wasm_bindgen]
pub fn greet(name: &str) {
alert(&format!("Hello, {}!", name));
}