-
Notifications
You must be signed in to change notification settings - Fork 73
wasmedge: add support for WasmEdge engine. #193
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting this!
Please help to link with the issue 97, thanks. |
you can do that by putting the comment in the description like |
0969e19
to
0531685
Compare
a0cc723
to
05b0cf2
Compare
@q82419 this is still failing to build. |
Hi @PiotrSikora , |
05b0cf2
to
260db03
Compare
Hi @PiotrSikora , We choose to use our pre-built shared library instead. Thanks. |
Hi @q82419, unfortunately, this isn't acceptable solution. Proxy-Wasm C++ Host is used in products where supply chain security is a big concern, so we cannot rely on prebuilt artifacts from untrusted sources. We need to figure out a way to build Boost / WasmEdge from sources in Bazel. |
Hi @PiotrSikora , Thanks for the feedback. |
fdca782
to
affa434
Compare
affa434
to
397d194
Compare
Hi @PiotrSikora , We've updated the |
That's fine, thanks! |
bazel/repositories.bzl
Outdated
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmedge.BUILD", | ||
sha256 = "e7c86b397aa2d5e712cd06af9fe1ed5604fe7d1d6dedbc6d62c846dd0131953d", | ||
strip_prefix = "WasmEdge-f34286ea920eefa9884ee31f7c509aa8bd99aec3", | ||
url = "https://github.com/WasmEdge/WasmEdge/archive/f34286ea920eefa9884ee31f7c509aa8bd99aec3.tar.gz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks this is a custom branch that bundles boost
and spdlog
, which means that updating this runtime without your help might be tricky in the future. What's the plan for those commits? Do you intend to merge them into master
branch or is the plan to keep them forever in a development branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll keep the branch, and merge the master
into that branch for each official release.
For the 0.9.0
release, we pushed the proxy-wasm/0.9.0
tag and use the tag in this PR.
397d194
to
1339541
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, I had to cleanup our CI before accepting new engines, otherwise we'd be evicting cache on each PR run. We should be good to go now, so could you merge master
and resolve the conflicts? Thanks!
Also, could you explain what's the advantage of WasmEdge over the existing engines that we support? Currently, we have V8 (fast JIT), Wasm Micro Runtime (fast interpreter), Wasmtime (Cranelift), WAVM (LLVM JIT/AOT), and it's unclear what use case does WasmEdge address, and why users should select WasmEdge over any of the existing eninges.
Hi @PiotrSikora , WasmEdge has the following advantages over all Wasm runtimes, including V8:
|
1339541
to
0656808
Compare
0656808
to
d7144f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WasmEdge has the following advantages over all Wasm runtimes, including V8:
- WasmEdge supports some non-standard but necessary extensions for cloud-native environments. For example, it supports non-blocking network sockets, WasmEdge-bindgen for complex para passing, and Tensorflow / AI inference. They may not be important for a proxy embedded runtime right now, but they could expand the types of applications your developers might want to try.
- In a service mesh environment, the developer might want to use Wasm in both the proxy and the microservice. WasmEdge is the runtime that provides the best integration with various k8s distributions. In fact, WasmEdge is itself an OCI container that can be managed by container tools- neither node nor other wasm runtime is a container.
- WasmEdge provides excellent support for JavaScript, including ES6 and NPM modules, async networking, the fetch API, React SSR, and even mixing Rust code with JS code.
None of that matters when embedding WasmEdge's engine part (without extra runtime APIs) into Proxy-Wasm.
- Through the AOT compiler, WasmEdge is one of the fastest WebAssembly runtimes on the market.
Do you have any data behind this (compared to V8, WAMR, Wasmtime, WAVM, etc.)?
- WasmEdge is written in C++, and hence has better (in our view) support for different OSes and language SDKs.
I'd argue that C, C++, and Rust all have pretty good support, so this isn't a differentiator.
- It is often a good idea to support multiple runtimes because each project might have different roadmaps, adoption, and community. For example, WasmEdge is a CNCF project working with a lot of cloud-native projects. Other Wasm runtimes might be focused on the browser or IoT devices.
That's definitely true, and I'm greateful for you working on adding WasmEdge to Proxy-Wasm.
However, I still don't know when I should recommend WasmEgde over V8/WAMR/Wasmtime/WAVM to Proxy-Wasm users? What's the benefit?
Hi, This is Michael Yuan from WasmEdge. :) For the points 1 and 2 below: I think the bigger picture is that people are increasingly using WebAssembly as a runtime for microservices themselves, in addition to the data plane. It simplifies development and deployment if the entire system uses the same WebAssembly runtime with the same extensions, SDKs, and toolings. On this front, WasmEdge with its support for async networking sockets, cryptography, and Kubernetes, is a compelling choice of WebAssembly across the proxies and the microservices. For point 3, please see WasmEdge performance benchmarks: https://github.com/WasmEdge/WasmEdge/blob/master/README.md#performance For point 4, wouldn't it be nice to program traffic rules using JavaScript? ;) Cheers!
|
Signed-off-by: YiYing He <[email protected]>
2e72747
to
9bb9eef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Signed-off-by: YiYing He <[email protected]>
Hi,
Here's the maintainer of the WasmEdge runtime.
This pull request implements the WasmEdge supporting for the proxy-wasm with the newest WasmEdge release version (0.8.2).
For this first version, we provides the interpreter mode of WASM runtime, and the AOT mode supporting for proxy-wasm is still work in progress.
Please feel free to review this pull request and give us some advices if there's issues, bugs, or incomplete implementations.
Thank you.
Resolves #97