mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
init: it builds
This commit is contained in:
19
um_wasm/src/lib.rs
Normal file
19
um_wasm/src/lib.rs
Normal 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!");
|
||||
}
|
||||
Reference in New Issue
Block a user