Running WASIp2 Components with crun+wasmtime supported?
- Dominant language
- C
- Stars
- 4.1k
- Forks
- 444
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 43
Description
Hi,
I am currently having trouble running a WASIp2 component via crun with WASM support via wasmtime.
The setup in use is basically a copy&paste of [docs/wasm-wasi-example.md](https://github.com/containers/crun/blob/main/docs/wasm-wasi-example.md).
Upon running the image with podman the following error is printed:
```text
WARNING: image platform (wasi/wasm) does not match the expected platform (linux/amd64)
[libcrun:wasmtime]: failed to compile module: failed to parse WebAssembly module
Caused by:
expected a WebAssembly module but was given a WebAssembly component
```
I am not that proficient in C but it seems like the wasmtime handler only invokes functions compatible with WASIp1. Is WASIp2 with wasmtime supported by crun? Or could my instillation of libwasmtime.so be faulty?
Output of `crun -V`:
```text
crun version 1.23.1
commit: d20b23dba05e822b93b82f2f34fd5dada433e0c2
rundir: /run/user/1000/crun
spec: 1.0.0
+SELINUX +APPARMOR +CAP +SECCOMP +EBPF +WASM:wasmtime +YAJL
```
Thanks for your help!
Contributor guide
Assessment
This issue has not been assessed yet.