Skip to content

Commit

Permalink
[README] Add the C API documentation link.
Browse files Browse the repository at this point in the history
Signed-off-by: YiYing He <[email protected]>
  • Loading branch information
q82419 committed Jul 19, 2021
1 parent 2b2575f commit 6cf2125
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README-zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ WasmEdge 的一個主要應用場景是從一個 host 應用程式啟動一個

# 管理 WasmEdge 虛擬機器實例

有了 [WasmEdge C API](https://github.com/WasmEdge/WasmEdge/blob/master/include/api/wasmedge.h.in) ,您可以編寫程式來啟動、停止和管理您自己的應用程式中的 WasmEdge 虛擬機器實例。例如:
有了 [WasmEdge C API](doc/c_api.md) ,您可以編寫程式來啟動、停止和管理您自己的應用程式中的 WasmEdge 虛擬機器實例。例如:

* 當在 [Node.js](https://www.secondstate.io/articles/getting-started-with-rust-function/) 或者在 [飛書](http://reactor.secondstate.info/docs/user-create-a-bot.html) 上嵌入了 WasmEdge 函式,可以在當有傳入請求時,由應用程式啟動虛擬機器。
* 當 WasmEdge 函式被外掛到像 [YoMo](https://github.com/yomorun/yomo-flow-ssvm-example) 這樣的資料流引擎中時,虛擬機器可以在一個新的資料點流經系統時啟動。
* 作為一個相容於 OCI 的執行體, WasmEdge 應用程式可以由像是 CRI-O 與 Docker Hub 的 Docker 工具來管理。 [由此觀看](https://github.com/second-state/runw) 我們正在進行的對 Kubernetes 的支援。

您也可以參閱 [WasmEdge C API 快速開始指南](doc/c_api_quick_start.md)

# 支援 wasm 標準擴充

WasmEdge 支持可選用的 WebAssembly 新特性和提案。這些提案很可能在未來成為官方的 WebAssembly 標準。 WasmEdge 支援以下提案。
Expand Down
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ WasmEdge 的一个主要应用场景是从一个 host 应用程序启动一个

# 管理 WasmEdge 虚拟机实例

有了 [WasmEdge C API](https://github.com/WasmEdge/WasmEdge/blob/master/include/api/wasmedge.h.in), 您可以编写程序来启动、停止和管理您自己的应用程序中的 WasmEdge 虚拟机实例。例如
有了 [WasmEdge C API](doc/c_api.md), 您可以编写程序来启动、停止和管理您自己的应用程序中的 WasmEdge 虚拟机实例。您也可以参阅[WasmEdge C API 快速开始指引](doc/c_api_quick_start.md)。例如

* 当 WasmEdge 函数嵌入在了 [Node.js](https://www.secondstate.io/articles/getting-started-with-rust-function/) 或者在 [飞书](http://reactor.secondstate.info/docs/user-create-a-bot.html), 当有传入请求时,虚拟机由应用程序启动。
* 当 WasmEdge 函数被插入到像 [YoMo](https://github.com/yomorun/yomo-flow-ssvm-example) 这样的数据流引擎中时,当一个新的数据点流经系统时,虚拟机就会启动。
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ WasmEdge and its contained wasm program can be started from the CLI as a new pro

# Embed WasmEdge into a host application

A major use case of WasmEdge is to start an VM instance from a host application. In general, you can use the [WasmEdge C API](https://github.com/WasmEdge/WasmEdge/blob/master/include/api/wasmedge.h.in) to do so.
A major use case of WasmEdge is to start an VM instance from a host application. In general, you can use the [WasmEdge C API](doc/c_api.md) to do so. You can also refer to the [quick start guide](doc/c_api_quick_start.md) of the WasmEdge C API.

However, the Wasm spec, and the [WasmEdge C API](https://github.com/WasmEdge/WasmEdge/blob/master/include/api/wasmedge.h.in), only supports very limited data types as input parameters and return values for the contained Wasm bytecode functions. In order to pass complex data types, such as a string of an array, as call arguments into the contained function, you should use the bindgen solution provided by the [rustwasmc](https://github.com/second-state/rustwasmc) toolchain.
However, the Wasm spec, and the [WasmEdge C API](doc/c_api.md), only supports very limited data types as input parameters and return values for the contained Wasm bytecode functions. In order to pass complex data types, such as a string of an array, as call arguments into the contained function, you should use the bindgen solution provided by the [rustwasmc](https://github.com/second-state/rustwasmc) toolchain.

We currently supports bindgen in the [Node.js host environment](https://www.secondstate.io/articles/getting-started-with-rust-function/) and in [Golang environment](https://github.com/second-state/WasmEdge-go-examples/tree/master/go_Mobilenet). We are working on [supporting interface types](https://github.com/WasmEdge/WasmEdge/issues/264) in place of bindgen for future releases.

Expand Down

0 comments on commit 6cf2125

Please sign in to comment.