Stream: wasmtime

Topic: ✔ wasmtime-py canonical_abi_realloc failure


view this post on Zulip Jens Gåsemyr Magnus (Jul 08 2022 at 09:46):

I have an issue where calling canonical_abi_realloc from Python after linking causes an error: thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', crates/c-api/src/linker.rs:105:80, anyone know what this could be? Version conflicts? I am running this in an linux arm64 vm on an arm mac

view this post on Zulip bjorn3 (Jul 08 2022 at 10:32):

That is an error in wasmtime_linker_define_wasi which seems to happen when the wasi context is not set. This field seems to be set by wasmtime_context_set_wasi. It seems you have to call store.set_wasi(wasi) on the python side before instantiating the linker. wasi here is of the type WasiConfig. See https://github.com/bytecodealliance/wasmtime-py/blob/7ebdf1cb0c792da8c6b4c9b54630ac0da1a6a655/examples/linking.py#L20

Python WebAssembly runtime powered by Wasmtime. Contribute to bytecodealliance/wasmtime-py development by creating an account on GitHub.

view this post on Zulip Jens Gåsemyr Magnus (Jul 08 2022 at 14:34):

Thanks! This was indeed the issue, works perfectly now!

view this post on Zulip Notification Bot (Jul 08 2022 at 16:32):

bjorn3 has marked this topic as resolved.


Last updated: Nov 22 2024 at 17:03 UTC