Compile Error that only happens on one target(RISC-V) that doesn't happen on another target(x86-64)

Hello I've wondered if this happens to be a compiler error as it doesn't make sense for it to only happen on one target, is this a bug?

Here the error:

error[E0308]: mismatched types
   --> lapce-proxy/src/plugin/wasi.rs:384:37
    |
384 |     HttpState::new()?.add_to_linker(&mut linker, |_| HttpCtx {
    |                       ------------- ^^^^^^^^^^^ expected `Linker<_>`, found `wasmtime::Linker<_>`
    |                       |
    |                       arguments to this method are incorrect
    |
    = note: `wasmtime::Linker<_>` and `Linker<_>` have similar names, but are actually distinct types

To reproduce you'll need either an x86 compiler target and a risc-v target(Linux)

  1. git clone GitHub - lapce/lapce: Lightning-fast and Powerful Code Editor written in Rust
  2. cargo update
  3. cargo build (--release)

You may have two different versions of the same crate in your dependencies, caused by WASM crates having a different version.

Try

cargo tree -d --target=all
# or
cargo tree -d --target=wasm-wasi

all: (realistically too much to look though)

wasm-wasi:

Figured it out with the dev of the project.

actually no it does seem to be a CPU issue or compiler issue as it compiles fine on qemu but not on my system(bare-metal)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.