alef 0.25.37

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
#[wasm_bindgen(constructor)]
pub fn new(visitor: wasm_bindgen::JsValue) -> {{ struct_name }} {
    let bridge = {{ module_name }}::{{ bridge_struct_name }}::new(visitor);
    let handle = std::sync::Arc::new(std::sync::Mutex::new(bridge));
    Self {
        inner: std::sync::Arc::new(handle),
    }
}