Lines
0 %
Functions
Branches
100 %
use serde::{Deserialize, Serialize};
use wasm_bindgen::prelude::*;
#[derive(Serialize, Deserialize)]
pub struct WasmStatus {
loaded: bool,
version: String,
message: String,
}
#[wasm_bindgen]
pub fn get_wasm_status() -> JsValue {
let status = WasmStatus {
loaded: true,
version: env!("CARGO_PKG_VERSION").to_string(),
message: "WASM module loaded successfully".to_string(),
};
serde_wasm_bindgen::to_value(&status).unwrap()
#[wasm_bindgen(start)]
pub fn main() {
console_error_panic_hook::set_once();