mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 14:12:13 +00:00
19 lines
261 B
Rust
19 lines
261 B
Rust
#![feature(proc_macro)]
|
|
|
|
extern crate wasm_bindgen;
|
|
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen]
|
|
extern {
|
|
type console;
|
|
|
|
#[wasm_bindgen(static = console)]
|
|
fn log(s: &str);
|
|
}
|
|
|
|
#[wasm_bindgen]
|
|
pub fn run() {
|
|
console::log("Hello from Rust!");
|
|
}
|