mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +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:
@@ -163,7 +163,7 @@ impl WasmExecutor {
|
||||
where
|
||||
F: FnOnce(
|
||||
AssertUnwindSafe<&Arc<dyn WasmModule>>,
|
||||
AssertUnwindSafe<&dyn WasmInstance>,
|
||||
AssertUnwindSafe<&mut dyn WasmInstance>,
|
||||
Option<&RuntimeVersion>,
|
||||
AssertUnwindSafe<&mut dyn Externalities>,
|
||||
) -> Result<Result<R>>,
|
||||
@@ -217,7 +217,7 @@ impl WasmExecutor {
|
||||
.new_instance()
|
||||
.map_err(|e| format!("Failed to create instance: {:?}", e))?;
|
||||
|
||||
let instance = AssertUnwindSafe(instance);
|
||||
let mut instance = AssertUnwindSafe(instance);
|
||||
let mut ext = AssertUnwindSafe(ext);
|
||||
let module = AssertUnwindSafe(module);
|
||||
|
||||
@@ -283,7 +283,7 @@ impl CodeExecutor for WasmExecutor {
|
||||
runtime_code,
|
||||
ext,
|
||||
false,
|
||||
|module, instance, _onchain_version, mut ext| {
|
||||
|module, mut instance, _onchain_version, mut ext| {
|
||||
with_externalities_safe(&mut **ext, move || {
|
||||
preregister_builtin_ext(module.clone());
|
||||
instance.call_export(method, data).map(NativeOrEncoded::Encoded)
|
||||
@@ -438,7 +438,7 @@ impl RuntimeSpawn for RuntimeInstanceSpawn {
|
||||
// pool of instances should be used.
|
||||
//
|
||||
// https://github.com/paritytech/substrate/issues/7354
|
||||
let instance =
|
||||
let mut instance =
|
||||
module.new_instance().expect("Failed to create new instance from module");
|
||||
|
||||
instance
|
||||
@@ -525,7 +525,7 @@ impl<D: NativeExecutionDispatch + 'static> CodeExecutor for NativeElseWasmExecut
|
||||
runtime_code,
|
||||
ext,
|
||||
false,
|
||||
|module, instance, onchain_version, mut ext| {
|
||||
|module, mut instance, onchain_version, mut ext| {
|
||||
let onchain_version =
|
||||
onchain_version.ok_or_else(|| Error::ApiError("Unknown version".into()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user