struct ReturnValue(u32, u32);
impl IntoHost for ReturnValue {
type Regs = (u32, u32);
type Destructor = ();
#[inline(always)]
fn into_host(value: Self) -> (Self::Regs, ()) {
((value.0, value.1), ())
}
}
but I see no reason to not support (u32, u32) directly without the extra work
But from the host side, I am not very sure how to use call_typed with it
poc/executor/src/lib.rs:69:64
|
69 | let (res_ptr, res_len) = instance.call_typed::<(u32,), (u32, u32)>(&mut self.context, "main", (input_ptr,))?;
| ---------- ^^^^^^^^^^ the trait `polkavm::api::AbiTy` is not implemented for `(u32, u32)`, which is required by `(u32, u32): polkavm::api::FuncResult`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `polkavm::api::AbiTy`:
i32
i64
u32
u64
= note: required for `(u32, u32)` to implement `polkavm::api::FuncResult`
I got the guest program to compile with this
but I see no reason to not support (u32, u32) directly without the extra work
But from the host side, I am not very sure how to use
call_typed
with it