mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Rename namespace
to js_namespace
Along the way remove the namespace in Rust as this ended up causing too many problems, alas! The `js_namespace` attribute now almost exclusively modifies the JS bindings, hence the "js" in the name now.
This commit is contained in:
@ -6,11 +6,11 @@ use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern {
|
||||
#[wasm_bindgen(namespace = console)]
|
||||
#[wasm_bindgen(js_namespace = console)]
|
||||
fn log(s: &str);
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn run() {
|
||||
console::log("Hello from Rust!");
|
||||
log("Hello from Rust!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user