mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
Bump wasmtime from 0.19.0 to 0.22.0 (#7865)
* Bump wasmtime from 0.19.0 to 0.22.0 Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 0.19.0 to 0.22.0. - [Release notes](https://github.com/bytecodealliance/wasmtime/releases) - [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md) - [Commits](https://github.com/bytecodealliance/wasmtime/compare/v0.19.0...v0.22.0) Signed-off-by: dependabot[bot] <support@github.com> * Account for ImportType::name() being an Optional * Account for parameters being a impl Iterator now Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -113,7 +113,7 @@ impl EntryPoint {
|
||||
])
|
||||
},
|
||||
})
|
||||
.map(|results|
|
||||
.map(|results|
|
||||
// the signature is checked to have i64 return type
|
||||
results[0].unwrap_i64() as u64
|
||||
)
|
||||
@@ -124,27 +124,28 @@ impl EntryPoint {
|
||||
}
|
||||
|
||||
pub fn direct(func: wasmtime::Func) -> std::result::Result<Self, &'static str> {
|
||||
match (func.ty().params(), func.ty().results()) {
|
||||
(&[wasmtime::ValType::I32, wasmtime::ValType::I32], &[wasmtime::ValType::I64]) => {
|
||||
Ok(Self { func, call_type: EntryPointType::Direct })
|
||||
}
|
||||
_ => {
|
||||
Err("Invalid signature for direct entry point")
|
||||
}
|
||||
use wasmtime::ValType;
|
||||
let entry_point = wasmtime::FuncType::new(
|
||||
[ValType::I32, ValType::I32].iter().cloned(),
|
||||
[ValType::I64].iter().cloned(),
|
||||
);
|
||||
if func.ty() == entry_point {
|
||||
Ok(Self { func, call_type: EntryPointType::Direct })
|
||||
} else {
|
||||
Err("Invalid signature for direct entry point")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn wrapped(dispatcher: wasmtime::Func, func: u32) -> std::result::Result<Self, &'static str> {
|
||||
match (dispatcher.ty().params(), dispatcher.ty().results()) {
|
||||
(
|
||||
&[wasmtime::ValType::I32, wasmtime::ValType::I32, wasmtime::ValType::I32],
|
||||
&[wasmtime::ValType::I64],
|
||||
) => {
|
||||
Ok(Self { func: dispatcher, call_type: EntryPointType::Wrapped(func) })
|
||||
},
|
||||
_ => {
|
||||
Err("Invalid signature for wrapped entry point")
|
||||
}
|
||||
use wasmtime::ValType;
|
||||
let entry_point = wasmtime::FuncType::new(
|
||||
[ValType::I32, ValType::I32, ValType::I32].iter().cloned(),
|
||||
[ValType::I64].iter().cloned(),
|
||||
);
|
||||
if dispatcher.ty() == entry_point {
|
||||
Ok(Self { func: dispatcher, call_type: EntryPointType::Wrapped(func) })
|
||||
} else {
|
||||
Err("Invalid signature for wrapped entry point")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user