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

Add Wasmer's WAMR backend #17

Open
Robbepop opened this issue Nov 4, 2024 · 4 comments
Open

Add Wasmer's WAMR backend #17

Robbepop opened this issue Nov 4, 2024 · 4 comments

Comments

@Robbepop
Copy link
Member

Robbepop commented Nov 4, 2024

@syrusakbary First, congrats to the Wasmer 5.0 update!

I have noticed that Wasmer 5.0 included WAMR as backend and wondered if it would make sense to add it as another Wasmer backend to wasmi-benchmarks? I have not yet included WAMR since it has no easy bindings for Rust but with Wasmer 5.0 this has probably changed.

Does Wasmer 5.0 use WAMR's fast-interpreter, classic-interpreter or one of its JITs? I'd be most interesting in its fast-interpreter backend from the Wasmi perspective.

@syrusakbary
Copy link

I think we used fast-interpreter (no JIT). I believe @xdoardo can probably follow up on this since he worked on that.
In any case, it should be possible to support all of those cases via feature flags

@xdoardo
Copy link

xdoardo commented Nov 4, 2024

Hello! By default, we build WAMR with AOT disabled and FAST_INTERP enabled.

@Robbepop
Copy link
Member Author

Robbepop commented Nov 4, 2024

@syrusakbary @xdoardo okay thanks a lot for the information! Probably makes sense to integrate WAMR support via Wasmer 5.0. :) Looking forward to the results once integration is complete.

@Robbepop
Copy link
Member Author

Robbepop commented Nov 5, 2024

Copying here an answer from Wasmer Discord about building Wasmer 5.0 with multiple backends:

Sorry, I missed the notification. Unfortunately it's not possible right now, as they use two features that conflict with each other. In the near future we'll move to a different architecture that allows single binaries with (hopefully) all the backends available together.

So, depending on your needs, you can have:

  • One build with cranelift, llvm, singlepass (or any combination)
  • One build with wamr
  • One build with v8
  • One build with wasmi

Building Wasmer 5.0 with WAMR:

cargo build --package=wasmer --no-default-features --features=\
    wamr,\
    wasmer-artifact-create,\
    static-artifact-create,\
    wasmer-artifact-load,\
    static-artifact-load

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

No branches or pull requests

3 participants