Skip to content

wasm: add support for wasmedge runtime #774

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

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

ibmibmibm
Copy link
Contributor

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 8, 2021

@ibmibmibm Not a blocker: but would it be possible to add a small section with cri-o as example in a small doc here https://github.com/containers/crun/tree/main/docs ?

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 8, 2021

@ibmibmibm Also does current implementation of wasmedge supports building a .wat in crun during runtime ?

@ibmibmibm
Copy link
Contributor Author

ibmibmibm commented Nov 8, 2021

@ibmibmibm Also does current implementation of wasmedge supports building a .wat in crun during runtime ?

No, we focus on wasm binary format only.

@ibmibmibm ibmibmibm force-pushed the feature/wasmedge branch 2 times, most recently from 5203fd6 to d697bb9 Compare November 8, 2021 11:10
Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 8, 2021

LGTM

@flouthoc flouthoc merged commit d78b1b6 into containers:main Nov 8, 2021
@flouthoc
Copy link
Collaborator

flouthoc commented Nov 8, 2021

@ibmibmibm Thanks for the PR 😄

@giuseppe
Copy link
Member

giuseppe commented Nov 8, 2021

we definitely need to get either wasmer or wasmedge into major distros like Fedora so that we can enable the feature by default :-)

@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2021

@lsm5 @jnovy thoughts?

@lsm5
Copy link
Member

lsm5 commented Nov 8, 2021

@giuseppe what's the upstream repo for wasmer / wasmedge?

@ibmibmibm ibmibmibm deleted the feature/wasmedge branch November 9, 2021 07:50
@giuseppe
Copy link
Member

giuseppe commented Nov 9, 2021

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 9, 2021

I'll also confirm from wasmer maintainers if they are planning to pack and distribute if not then we can do it ourselves.

@jnovy
Copy link
Contributor

jnovy commented Nov 9, 2021

@giuseppe does wasm/wasmedge need to be packaged separately?

@giuseppe
Copy link
Member

giuseppe commented Nov 9, 2021

yes, I think we need new packages for that.

I'd stick just with one now, like wasmer, to avoid wasting resources on two different backends that have the same features

@TomSweeneyRedHat
Copy link
Member

@jnovy @giuseppe is this something we need for RHEL or just Fedora at this point? Looping in @fatherlinux. I'm hoping the answer is RHEL 8.5/9.1 or later....

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

Definitely later. RHEL 8.7 and 9.1 is fine with me.

@juntao
Copy link

juntao commented Nov 9, 2021

I'd stick just with one now, like wasmer, to avoid wasting resources on two different backends that have the same features

Hello, I am a maintainer at WasmEdge. :)

May I suggest to have WasmEdge included as default? 😅 We can commit to maintain and support the upstream version. WasmEdge is a Linux Foundation / CNCF hosted project.

And if you are interested, here are some of the differentiating features WasmEdge has beyond WASM and WASI standards:

https://github.com/WasmEdge/WasmEdge/blob/master/docs/highlights.md

Thank you for your consideration!

@flouthoc
Copy link
Collaborator

@juntao I dont have a strong opinion on this one. But one edge with wasmer is that it supports building .wat modules on the fly. I think it will be a good advantage feature advantage for crun in long run and at this point wasmer has a huge community building and improving runtime.

But again i don't have a strong opinion on this one.

@flouthoc
Copy link
Collaborator

flouthoc commented Nov 10, 2021

But I might be missing lot of other points hence looping in @syrusakbary for his opinions on this one and for ref original wasmer hook PR: #742

@syrusakbary
Copy link

Thanks for the chiming me in @flouthoc.
First of all, great work on adding Wasm support via Wasmer on crun... your original PR #742 is really impressive!

As far as I'm aware Wasmer is the most popular runtime among CNCF companies already (many of them already using it on production). It's quite mature (11k commits) and it supports many features that will make it ideal for being the default crun Wasm runtime. Here are some:

  • Support for multiple compilers (llvm, cranelift and singlepass)
  • Multiple engines (dylib and universal)
  • Pre-compiled AOT and "JIT" running modes
  • Headless mode (so we can ship a super slim version of Wasmer in case we want to run pre-compiled modules)
  • Resource limitation
  • WAT support
  • Tons of language integrations (C, Python, Go, Ruby, Zig, Rust, C#, Java, Elixir, ...)
  • Very strong community

Aside of that, there are many integrations of Wasmer in multiple OSS already (Gentoo, Arch Linux, ...), so I think it will be relatively easy to target new ones (RHEL, Fedora): https://repology.org/project/wasmer/versions

@giuseppe
Copy link
Member

are you planning on adding wasmer (and the C bindings) to Fedora?

Until there is no package for Fedora, as well as other distros we are targeting, we won't be able to switch the support for wasmer in the crun build

@rhatdan
Copy link
Member

rhatdan commented Nov 10, 2021

Right we need the libraries built into fedora and eventually debian and ubuntu. Then we can turn it on by default. If it goes well we can consider it in RHEL and potentially OpenShift.

@lsm5
Copy link
Member

lsm5 commented Nov 10, 2021

@syrusakbary / @juntao if you know anybody that would be interested in creating and owning the Fedora package, please send them my way. I'd be happy to review and approve both wasmer and wasmedge into Fedora assuming long term maintenance won't be on me :)

@juntao
Copy link

juntao commented Nov 11, 2021

@lsm5 WasmEdge's @hydai will be responsible for creating and maintaining WasmEdge's RPM / Fedroa package. :) Please let us know the next steps.

@giuseppe
Copy link
Member

@juntao a good starting point on adding a new package to Fedora is here: https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_New_Contributors/

flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 5, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 5, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space like `krustlet` which rely on `wasmtime` under the hood.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742
* https://github.com/krustlet/krustlet

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 6, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space like `krustlet` which rely on `wasmtime` under the hood.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742
* https://github.com/krustlet/krustlet

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 11, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space like `krustlet` which rely on `wasmtime` under the hood.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742
* https://github.com/krustlet/krustlet

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 11, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space like `krustlet` which rely on `wasmtime` under the hood.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742
* https://github.com/krustlet/krustlet

Signed-off-by: Aditya R <[email protected]>
flouthoc added a commit to flouthoc/crun that referenced this pull request Jul 12, 2022
Following PR initiates and adds support for crun to be able to build and
run wasm/wasi workload in a native manner using `wasmtime`.

Crun already supports running `wasm` workload using `wasmer` and `wasmedge`
following PR extends this feature so that end-users can switch to `wasmtime`,
following feature is proposed inorder to maintain feature parity with
other tools in the same space like `krustlet` which rely on `wasmtime` under the hood.

Ref:
* Wasmedge integration: containers#774
* Wasmer integration: containers#742
* https://github.com/krustlet/krustlet

Signed-off-by: Aditya R <[email protected]>
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

Successfully merging this pull request may close these issues.

9 participants