Add support for version specifications

This commit adds a `#[wasm_bindgen(version = "...")]` attribute support. This
information is eventually written into a `__wasm_pack_unstable` section.
Currently this is a strawman for the proposal in ashleygwilliams/wasm-pack#101
This commit is contained in:
Alex Crichton
2018-04-25 07:26:33 -07:00
parent d9a71b43db
commit 412bebca72
7 changed files with 183 additions and 0 deletions

View File

@ -1,5 +1,7 @@
extern crate parity_wasm;
extern crate wasm_bindgen_shared as shared;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate wasm_gc;
extern crate wasmi;
@ -131,6 +133,7 @@ impl Bindgen {
config: &self,
module: &mut module,
function_table_needed: false,
module_versions: Default::default(),
run_descriptor: &|name| {
let mut v = MyExternals(Vec::new());
let ret = instance