Add an example of --no-modules in action

This commit is contained in:
Alex Crichton
2018-04-19 07:20:35 -07:00
parent 45e4983e8c
commit 574e54a89d
8 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#![feature(proc_macro, wasm_custom_section, wasm_import_module)]
extern crate wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern {
fn alert(s: &str);
}
#[wasm_bindgen]
pub fn greet(name: &str) {
alert(&format!("Hello, {}!", name));
}