Update wasmtime to 0.29.0 (#9552)

* Start

* Move to ctx

* Make it compile for now

* More work

* Get rid off state-holder

* Use less Refcells

* 🤦

* Don't use RefCell

* Use names for parameters

* Fixes after merge

* Fixes after merge

* Review feedback

* FMT
This commit is contained in:
Bastian Köcher authored and GitHub committed 2021-09-29 12:30:46 +00:00
1 parent e64693933f
commit 2deed49706
19 files changed
+451 -430

No files matched your search

+2 -2
View File
@@ -736,7 +736,7 @@ pub struct WasmiInstance {
unsafe impl Send for WasmiInstance {}
impl WasmInstance for WasmiInstance {
fn call(&self, method: InvokeMethod, data: &[u8]) -> Result<Vec<u8>, Error> {
fn call(&mut self, method: InvokeMethod, data: &[u8]) -> Result<Vec<u8>, Error> {
// We reuse a single wasm instance for multiple calls and a previous call (if any)
// altered the state. Therefore, we need to restore the instance to original state.
@@ -767,7 +767,7 @@ impl WasmInstance for WasmiInstance {
)
}
fn get_global_const(&self, name: &str) -> Result<Option<sp_wasm_interface::Value>, Error> {
fn get_global_const(&mut self, name: &str) -> Result<Option<sp_wasm_interface::Value>, Error> {
match self.instance.export_by_name(name) {
Some(global) => Ok(Some(
global