Stream: wasmtime

Topic: unsigned types in host functions


view this post on Zulip Maksym Zavershynskyi (Jun 05 2020 at 23:34):

How hard would it be to implement https://github.com/bytecodealliance/wasmtime/issues/1829 ? Does anyone know the approximate scope of work and maybe the time estimate?

When using Linker.func with function with signature fn(u64, u64) -> i32 get this error the trait wasmtime::func::IntoFunc<_, _> is not implemented for fn(u64, u64) -> i32 It is importan...

view this post on Zulip Dan Gohman (Jun 05 2020 at 23:38):

It's possible it's as easy as copying the impl WasmTy for i64 in crates/wasmtime/src/func.rs and adding a u64 variant

view this post on Zulip Dan Gohman (Jun 05 2020 at 23:41):

One subtlety is that wasm itself doesn't have signed/unsigned distinction, so there'd be no typechecking ensuring that you're actually passing a u64 to a u64 parameter, and not an i64, but that might be ok for now

view this post on Zulip Dan Gohman (Jun 05 2020 at 23:41):

and interface types should help with this in the future

view this post on Zulip Maksym Zavershynskyi (Jun 10 2020 at 17:20):

Thank you!


Last updated: Nov 22 2024 at 17:03 UTC