ok-ready-go/crypto_helper/src/lib.rs

21 lines
376 B
Rust
Raw Normal View History

2023-02-09 13:23:28 +01:00
mod utils;
pub mod crypto;
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 alert(s: &str);
}
#[wasm_bindgen]
pub fn greet() {
alert("Hello, crypto!");
}