Add wasm package
This commit is contained in:
parent
1e1934b492
commit
e1ba3d44c7
1 changed files with 71 additions and 0 deletions
19
backend/sync_wasm/src/lib.rs
Normal file
19
backend/sync_wasm/src/lib.rs
Normal file
|
|
@ -0,0 +1,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 "C" {
|
||||
// fn alert(s: &str);
|
||||
// }
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn greet() -> String {
|
||||
"hi".to_string()
|
||||
}
|
||||
Loading…
Reference in a new issue