mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user