Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on RISC-V 64, unsupported cranelift ISA #2111

Open
FSMaxB opened this issue Jan 22, 2023 · 7 comments
Open

Does not work on RISC-V 64, unsupported cranelift ISA #2111

FSMaxB opened this issue Jan 22, 2023 · 7 comments

Comments

@FSMaxB
Copy link

FSMaxB commented Jan 22, 2023

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?

@FSMaxB
Copy link
Author

FSMaxB commented Jan 22, 2023

Although this changelog entry confuses me: https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md#200

Apparently wasmtime does have support for riscv64 🤔

@FSMaxB
Copy link
Author

FSMaxB commented Jan 22, 2023

Nevermind, you're using wasmer, not wasmtime.

@valpackett
Copy link
Contributor

riscv64 is supported starting with wasmer 3.2.0. zellij is way behind on wasmer updates…

@ifsheldon
Copy link

I got the same/very similar issue when I tried to compile zellij from source on my RISC-V board.

@ToxicFrog
Copy link

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.

@ToxicFrog
Copy link

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.

@ToxicFrog
Copy link

ToxicFrog commented Jun 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants