message: Flatten imports
diff: @@ -16,13 +16,7 @@ use std::fs::File;
  use std::path::Path;
  use std::str::FromStr;
  use tempfile::NamedTempFile;
  -use wasmer::imports;
  -use wasmer::wat2wasm;
  -use wasmer::Instance;
  -use wasmer::Module;
  -use wasmer::RuntimeError;
  -use wasmer::Store;
  -use wasmer::Value;
  +use wasmer::{imports, wat2wasm, Instance, Module, RuntimeError, Store, Value};
  use wasmer_compiler::{CpuFeature, Target, Triple};
  use wasmer_compiler_cranelift::Cranelift;
  use wasmer_engine_dylib::Dylib;
  @@ -68,27 +62,6 @@ i32.add)
  let mut dylib_file = Path::new("./sum.dylib");
  module.serialize_to_file(dylib_file)?;
  - let module = unsafe { Module::deserialize_from_file(&store, dylib_file) }?;
  -
  - // Congrats, the Wasm module has been deserialized! Now let's
  - // execute it for the sake of having a complete example.
  -
  - // Create an import object. Since our Wasm module didn't declare
  - // any imports, it's an empty object.
  - let import_object = imports! {};
  -
  - println!("Instantiating module...");
  - // Let's instantiate the Wasm module.
  - let instance = Instance::new(&module, &import_object)?;
  -
  - println!("Calling `sum` function...");
  - // The Wasm module exports a function called `sum`.
  - let sum = instance.exports.get_function("sum")?;
  - let results = sum.call(&[Value::I32(1), Value::I32(2)])?;
  -
  - println!("Results: {:?}", results);
  - assert_eq!(results.to_vec(), vec![Value::I32(3)]);
  -
  Ok(())
  }
  