zellij
zellij copied to clipboard
Does not work on RISC-V 64, unsupported cranelift ISA
Basic information
zellij --version: zellij 0.34.4
stty size: 91 384
uname -av : Linux starfive 5.15.0-starfive #1 SMP Wed Dec 21 03:56:12 EST 2022 riscv64 GNU/Linux
Further information
I recently received a Starfive VisionFive 2 RISC-V devboard, installed rust on it and installed zellij using cargo install zellij.
When trying to run zellij, I get the following error:
Error occurred in server:
× Thread 'wasm' panicked.
├─▶ Originating Thread(s)
│ 1. ipc_server: NewClient
│ 2. screen_thread: NewTab
│ 3. plugin_thread: NewTab
│
├─▶ At /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-cranelift-2.3.0/src/config.rs:73:45
╰─▶ construct Cranelift ISA for triple: Unsupported
help: If you are seeing this message, it means that something went wrong.
Please report this error to the github issue.
(https://github.com/zellij-org/zellij/issues)
Also, if you want to see the backtrace, you can set the `RUST_BACKTRACE` environment variable to `1`.
I expect that this is a result from plugins being WebAssembly and whatever webassembly runtime (~~probably wasmtime~~) you use relies on cranelift, which doesn't have support for RISC-V yet.
~~According to https://docs.wasmtime.dev/stability-platform-support.html#interpreter-support, wasmtime doesn't even have an interpreter, so I guess the only way to get zellij to run on RISC-V is if it were possible to completely disable plugins, so it doesn't even try to run webassembly?~~
~~Although this changelog entry confuses me: https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md#200~~
~~Apparently wasmtime does have support for riscv64 :thinking:~~
Nevermind, you're using wasmer, not wasmtime.
riscv64 is supported starting with wasmer 3.2.0. zellij is way behind on wasmer updates…
I got the same/very similar issue when I tried to compile zellij from source on my RISC-V board.
Can confirm this is still happening in 0.39.2 -- I get a glimpse of the UI, then it dies with construct Cranelift ISA for triple: Unsupported.
Looking at it, it looks like RISC-V support was added in Wasmer 3.2, and Zellij is still on 3.1.1 -- so fixing this requires another Wasmer bump, which, according to #2706, is going to be difficult.
More generally, it would be good if it had a way to execute plugins in an interpreter; then having a JIT for the runtime ISA is a performance optimization rather than a hard requirement.
Unfortunately, it looks like this is not something Cranelift can do, and while there's a cranelift-interpreter crate, it's still a work in progress.
After #3349 merged, this issue is resolved.