Skip to content

Commit 11182f2

Browse files
authored
[DOC] add wasm design doc (apache#923)
1 parent 8762706 commit 11182f2

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

docs/design/wasm-plugin-design.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: WASM plugin design
3+
keywords: ["WASM"]
4+
description: Apache ShenYu WASM plugin design
5+
---
6+
7+
`Apache ShenYu` is a Java native API Gateway for service proxy, protocol conversion and API governance. Currently, ShenYu has good scalability in the Java language. However, ShenYu's support for multiple languages is still relatively weak.
8+
9+
`WASM`(WebAssembly) bytecode is designed to be encoded in a size- and load-time-efficient binary format. WebAssembly aims to leverage the common hardware features available on various platforms to execute in browsers at machine code speed.
10+
11+
`WASI`(WebAssembly System Interface) allows WASM to run in non browser environments such as Linux.
12+
13+
The goal of `WASMPlugin` is to be able to run WASM bytecode. Other languages, as long as their code can be compiled into WASM bytecode (such as Rust/golang/C++), can be used to write ShenYu plugins.
14+
15+
## Develop Phase
16+
17+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-develop.png" />
18+
19+
## Prepare Phase
20+
21+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-prepare.png" />
22+
23+
## Runtime Phase
24+
25+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-runtime.png" />
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: WASM插件设计
3+
keywords: ["WASM"]
4+
description: Apache ShenYu WASM插件设计
5+
---
6+
7+
`Apache ShenYu`是一个Java原生,用于服务代理、协议转换和API管理的API网关。目前shenyu在Java语言中具有良好的可扩展性,然而shenyu对多种语言的支持仍然相对较弱。
8+
9+
`WASM`(即WebAssembly)字节码被设计为以大小和加载时间高效的二进制格式进行编码。WebAssembly旨在利用各种平台上可用的通用硬件功能,以机器码的速度在浏览器中执行。
10+
11+
`WASI`(即WebAssembly System Interface)则是让WASM可以运行在非浏览器环境中(比如linux)。
12+
13+
`WASMPlugin`的目标是能够运行WASM字节码。其他语言,只要这种语言的代码能被编译成WASM字节码(如Rust/golang/C++),那么这种语言就可以用来编写ShenYu插件。
14+
15+
## 开发阶段
16+
17+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-develop.png" />
18+
19+
## 准备阶段
20+
21+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-prepare.png" />
22+
23+
## 运行阶段
24+
25+
<img src="/img/shenyu/plugin/wasm/wasm-plugin-runtime.png" />
Loading
Loading
Loading

0 commit comments

Comments
 (0)