mirror of
https://github.com/nushell/nushell
synced 2025-02-24 11:27:14 +00:00
19 lines
358 B
Rust
19 lines
358 B
Rust
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 {
|
|
fn alert(s: &str);
|
|
}
|
|
|
|
#[wasm_bindgen]
|
|
pub fn greet() {
|
|
alert("Hello, wasm!");
|
|
}
|