Don't require Store in Instance constructor (#810)

* Don't require `Store` in `Instance` constructor

This can be inferred from the `Module` argument. Additionally add a
`store` accessor to an `Instance` in case it's needed to instantiate
another `Module`.

cc #708

* Update more constructors

* Fix a doctest

* Don't ignore store in `wasm_instance_new`

* Run rustfmt
This commit is contained in:
Alex Crichton
2020-01-13 17:50:57 -06:00
committed by GitHub
parent f592811c9a
commit 420dcd76fd
19 changed files with 56 additions and 28 deletions

View File

@@ -59,7 +59,6 @@ use wasmtime_runtime::Export;
///
/// // Create module instance that imports our function
/// let instance = wasmtime::Instance::new(
/// &store,
/// &module,
/// &[times_two_function.into()]
/// )?;