mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-07 19:42:16 +00:00
This needed and update now that we're explicitly importing `*.wasm` to import `*.js` instead. Additionally this was moved over to the `web` target to avoid needing Webpack Closes #1743
14 lines
235 B
Rust
14 lines
235 B
Rust
use wasm_bindgen::prelude::*;
|
|
|
|
// lifted from the `console_log` example
|
|
#[wasm_bindgen]
|
|
extern "C" {
|
|
#[wasm_bindgen(js_namespace = console)]
|
|
fn log(s: &str);
|
|
}
|
|
|
|
#[wasm_bindgen(start)]
|
|
pub fn run() {
|
|
log("Hello, World!");
|
|
}
|