Skip to content

Commit

Permalink
[Docs] Deprecate the old docs and redirect into the book.
Browse files Browse the repository at this point in the history
Signed-off-by: YiYing He <[email protected]>
  • Loading branch information
q82419 authored and hydai committed Jan 28, 2022
1 parent 7879cb6 commit 19e64ed
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 7,093 deletions.
44 changes: 7 additions & 37 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Contributing to WasmEdge


## Welcome

[**WasmEdge**](https://github.com/WasmEdge/WasmEdge) (previously known as SSVM) is a high-performance WebAssembly (Wasm) VM optimized for Edge Computing, including Edge Clouds and Software Defined Vehicles.
Expand All @@ -15,19 +14,16 @@ If you are looking for ideas for contribution, [here is a wish list](wish_list.m
## Getting Started


### Fork Repository

Fork the WasmEdge repository on GitHub to your personal account.


```
```bash
$ git clone [email protected]:WasmEdge/WasmEdge.git
$ cd WasmEdge
```

Notes: Note the WasmEdge team builds lots of extensions of Server-side WebAssembly, see [TensorFlow](https://github.com/second-state/SSVM-tensorflow), [Storage](https://github.com/second-state/SSVM-storage), [Command interface](https://github.com/second-state/ssvm_process_interface), [Ethereum](https://github.com/second-state/SSVM-evmc), [Substrate](https://github.com/second-state/substrate-ssvm-node). If you want to contribue the extensions, please go to those repositories.

Notes: Note the WasmEdge team builds lots of extensions of Server-side WebAssembly, see [TensorFlow](https://github.com/second-state/WasmEdge-tensorflow), [Storage](https://github.com/second-state/WasmEdge-storage), [Command interface](https://github.com/second-state/wasmedge_process_interface), [Ethereum](https://github.com/second-state/WasmEdge-evmc), [Substrate](https://github.com/ParaState/substrate-ssvm-node). If you want to contribue the extensions, please go to those repositories.

### Setup Development Environment

Expand All @@ -37,22 +33,15 @@ Our development environment requires libLLVM-10 and >=GLIBCXX_3.4.26.

If you are using the older operating system than Ubuntu 20.04, please use our special docker image to build WasmEdge. If you are looking for the pre-built binaries for the older operatoring system, we also provide several pre-built binaries based on manylinux* distribution.




### Docker image



```
```bash
$ docker pull wasmedge/wasmedge
```



### Setup the environment manually

```
```bash
# Tools and libraries
$ sudo apt install -y \
software-properties-common \
Expand All @@ -67,36 +56,27 @@ $ sudo apt install -y gcc g++
$ sudo apt install -y clang
```



## Contribute Workflow

PR are always welcome, even if they only contain small fixes like typos or a few lines of code. If there will be a significant effort, please document it as an issue and get a discussion going before starting to work on it.


Please submit a PR broken down into small changes bit by bit. A PR consisting of a lot features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.


Note: If you split your pull request to small changes, please make sure any of the changes goes to master will not break anything. Otherwise, it can not be merged until this feature is complete.


### Fork and clone

Fork [the WasmEdge repository](https://github.com/WasmEdge/WasmEdge) and clone the code to your local workspace


### Branch

Changes should be made on your own fork in a new branch. The branch should be named XXX-description where XXX is the number of the issue. PR should be rebased on top of master without multiple branches mixed into the PR. If your PR do not merge cleanly, use commands listed below to get it up to date.



### Develop, Build and Test

Write code on the new branch in your fork.


```
```bash
# After pulling our wasmedge docker image
$ docker run -it --rm \
-v <path/to/your/wasmedge/source/folder>:/root/wasmedge \
Expand All @@ -110,14 +90,11 @@ $ docker run -it --rm \
The following built-in tests are only available when the build flag WASMEDGE_BUILD_TESTS sets to ON.
You can use these tests to verify the correctness of WasmEdge binaries.


```
```bash
$ cd <path/to/wasmedge/build_folder>
$ ctest
$ LD_LIBRARY_PATH=$(pwd)/lib/api ctest
```



### Push and Create PR

When ready for review, push your branch to your fork repository on github.com.
Expand All @@ -128,16 +105,12 @@ Once your pull request has been opened it will be assigned to one or more review

Commit changes made in response to review comments to the same branch on your fork.



## Reporting issues

It is a great way to contribute to WasmEdge by reporting an issue. Well-written and complete bug reports are always welcome! Please open an issue on Github.


Before opening any issue, please look up the existing [issues](https://github.com/WasmEdge/WasmEdge/issues) to avoid submitting a duplication. If you find a match, you can "subscribe" to it to get notified on updates. If you have additional helpful information about the issue, please leave a comment.


When reporting issues, always include:

* Version of your system
Expand All @@ -146,16 +119,13 @@ When reporting issues, always include:
Because the issues are open to the public, when submitting the log and configuration files, be sure to remove any sensitive information, e.g. user name, password, IP address, and company name. You can replace those parts with "REDACTED" or other strings like "****".
Be sure to include the steps to reproduce the problem if applicable. It can help us understand and fix your issue faster.


## Documenting

Update the documentation if you are creating or changing features. Good documentation is as important as the code itself.
Documents are written with Markdown. See [Writing on GitHub](https://help.github.com/categories/writing-on-github/) for more details.


## Design new features

You can propose new designs for existing WasmEdge features. You can also design entirely new features, Please submit a proposal via GitHub issues.


WasmEdge maintainers will review this proposal as soon as possible. This is necessary to ensure the overall architecture is consistent and to avoid duplicated work in the roadmap.
8 changes: 0 additions & 8 deletions docs/GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# WasmEdge Runtime Governance


As a sandbox project hosted by CNCF, the WasmEdge Runtime follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

## Maintainer responsibilities
Expand All @@ -21,16 +20,13 @@ As a sandbox project hosted by CNCF, the WasmEdge Runtime follows the [CNCF Code
A reviewer is a core maintainer within the project. They share in reviewing issues and pull requests and their LGTM counts towards the required LGTM count to merge a code change into the project.
Reviewers are part of the organization but do not have write access. Becoming a reviewer is a core aspect in the journey to becoming a committer.


## Committers

A committer is a core maintainer who is responsible for the overall quality and stewardship of the project. They share the same reviewing responsibilities as reviewers, but are also responsible for upholding the project bylaws as well as participating in project level votes.
Committers are part of the organization with write access to all repositories. Committers are expected to remain actively involved in the project and participate in voting and discussing of proposed project level changes.


## Adding maintainers


Maintainers are first and foremost contributors that have shown they are committed to the long term success of a project. Contributors wanting to become maintainers are expected to be deeply involved in contributing code, pull request review, and triage of issues in the project for more than three months.

Just contributing does not make you a maintainer, it is about building trust with the current maintainers of the project and being a person that they can depend on and trust to make decisions in the best interest of the project.
Expand All @@ -41,12 +37,10 @@ After a candidate has been informally proposed in the maintainers forum, the exi

If a candidate is approved, they will be invited to add their own LGTM or approval to the pull request to acknowledge their agreement. A committer will verify the numbers of votes that have been received and the allotted seven days have passed, then merge the pull request and invite the contributor to the organization.


## When does a maintainer lose maintainer status

If a maintainer is no longer interested or cannot perform the maintainer duties listed above, they should volunteer to be moved to emeritus status. In extreme cases this can also occur by a vote of the maintainers per the voting process below.


# Conflict resolution and voting

In general, we prefer that technical issues and maintainer membership are amicably worked out between the persons involved. If a dispute cannot be decided independently, the maintainers can be called in to decide an issue. If the maintainers themselves cannot decide an issue, the issue will be resolved by voting. The voting process is a simple majority in which each maintainer receives one vote.
Expand All @@ -55,8 +49,6 @@ In general, we prefer that technical issues and maintainer membership are amicab

New projects will be added to the WasmEdge organization via GitHub issue discussion in one of the existing projects in the organization. Once sufficient discussion has taken place (~3-5 business days but depending on the volume of conversation), the maintainers of *the project where the issue was opened* (since different projects in the organization may have different maintainers) will decide whether the new project should be added. See the section above on voting if the maintainers cannot easily decide.



## DCO and Licenses

The following licenses and contributor agreements will be used for WasmRuntime projects:
Expand Down
131 changes: 1 addition & 130 deletions docs/build-zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,131 +1,2 @@
# 從原始碼編譯與測試 WasmEdge

請參閱此說明從原始把編譯和測試 WasmEdge 。
以下指引基於 Linux distributions ,對於 MacOS 作業系統,請參閱[在 MacOS 上編譯](build_on_mac.md)

## 下載原始碼

```bash
$ git clone https://github.com/WasmEdge/WasmEdge.git
$ cd WasmEdge
```

## 檢查相依套件

WasmEdge 會基於最新版本的 LLVM 來編譯我們的最新版本。
如果您想從原始碼開始編譯,必須先安裝以下相依套件,或是直接使用我們提供的 Docker image 來編譯,我們提供了多個 Linux 發行版本。

- LLVM 12.0.0 (>= 10.0.0)
- GCC 11.1.0 (>= 9.4.0)

## 準備編譯環境

### 使用 Docker Images

Dockerhub 上的儲存庫 `wasmedge/wasmedge`

您可以使用下列的指令獲取最新的 docker image :

```bash
$ docker pull wasmedge/wasmedge # 等同於 wasmedge/wasmedge:latest
```

#### 可用的標籤

| 標籤名稱 | CPU 架構 | 基於的作業系統 | LLVM 版本 | 編譯環境 | 相容性 | 備註 |
| --- | --- | --- | --- | --- | --- | --- |
| `latest` | x86\_64 | Ubuntu 20.04 LTS | 12.0.0 | CC=clang, CXX=clang++ | Ubuntu 20.04+ | 使用於自動測試,會一直更新到最新的 Ubuntu 版本 |
| `ubuntu-build-gcc` | x86\_64 | Ubuntu 20.04 LTS | 12.0.0 | CC=gcc, CXX=g++ | Ubuntu 20.04+ | 使用於自動測試,會一直更新到最新的 Ubuntu 版本 |
| `ubuntu-build-clang` | x86\_64 | Ubuntu 20.04 LTS | 12.0.0 | CC=clang, CXX=clang++ | Ubuntu 20.04+ | 使用於自動測試,會一直更新到最新的 Ubuntu 版本 |
| `ubuntu2004_x86_64` | x86\_64 | Ubuntu 20.04 LTS | 10.0.0 | CC=gcc, CXX=g++ | Ubuntu 20.04+ | 提供給熟悉 Ubuntu 20.04 LTS 版本的開發者使用 |
| `manylinux2014_x86_64` | x86\_64 | CentOS 7, 7.9.2009 | 12.0.0 | CC=gcc, CXX=g++ | Ubuntu 16.04+, CentOS 7+ | 提供給熟悉 CentOS x86\_64 架構的開發者使用 |
| `manylinux2014_aarch64` | aarch64 | CentOS 7, 7.9.2009 | 12.0.0 | CC=gcc, CXX=g++ | Ubuntu 16.04+, CentOS 7+ | 提供給熟悉 CentOS aarch64 架構的開發者使用 |
| `manylinux2010_x86_64` | x86\_64 | CentOS 6, 6.10 | 12.0.0 | CC=gcc, CXX=g++ | Ubuntu 14.04+, CentOS 6+ | 提供給熟悉 x86\_64 架構舊版系統的開發者使用 |
| `manylinux1_x86_64` | x86\_64 | CentOS 5, 5.11 | 12.0.0 | CC=gcc, CXX=g++ | Ubuntu 14.04+, CentOS 5+ | 提供給熟悉 x86\_64 架構舊版系統的開發者使用 |

### 在 Ubuntu 20.04 上手動安裝相依套件

```bash
# 工具和函式庫
$ sudo apt install -y \
software-properties-common \
cmake \
libboost-all-dev

# 需要 llvm 來支援 wasmedgec 工具
$ sudo apt install -y \
llvm-12-dev \
liblld-12-dev

# WasmEdge 同時支援 clang++ 和 g++ 編譯器
# 您可以選擇其中一個來編譯這個專案
# 如果您傾向使用 gcc
$ sudo apt install -y gcc g++
# 或者您選擇使用 clang
$ sudo apt install -y clang
```

### 對舊版作業系統的支援

我們的開發環境需要 `libLLVM-12``>=GLIBCXX_3.4.33`

如果使用者使用比 Ubuntu 20.04 更舊版的作業系統,請使用我們提供的 docker image 來編譯 WasmEdge 。
若您在尋找舊版作業系統上使用的執行檔與函式庫,我們也提供了幾個基於 manylinux\* 發行版的安裝檔。

| 可移植的 Linux 發行版標籤 | 基礎 image | 提供的環境需 | Docker image |
| --- | --- | --- | --- |
| `manylinux1` | CentOS 5.11 | GLIBC <= 2.5<br>CXXABI <= 3.4.8<br>GLIBCXX <= 3.4.9<br>GCC <= 4.2.0 | wasmedge/wasmedge:manylinux1\_x86\_64 |
| `manylinux2010` | CentOS 6.10 | GLIBC <= 2.12<br>CXXABI <= 1.3.3<br>GLIBCXX <= 3.4.13<br>GCC <= 4.5.0 | wasmedge/wasmedge:manylinux2010\_x86\_64 |
| `manylinux2014` | CentOS 7.9 | GLIBC <= 2.17<br>CXXABI <= 1.3.7<br>GLIBCXX <= 3.4.19<br>GCC <= 4.8.0 | wasmedge/wasmedge:manylinux2014\_x86\_64 |
| `manylinux2014` | CentOS 7.9 | GLIBC <= 2.17<br>CXXABI <= 1.3.7<br>GLIBCXX <= 3.4.19<br>GCC <= 4.8.0 | wasmedge/wasmedge:manylinux2014\_aarch64 |

### 如果您不需要編譯 Ahead-of-time 編譯器

如果使用者不需要 Ahead-of-time 編譯器支援,可以將 CMake 選項 `WASMEDGE_BUILD_AOT_RUNTIME` 設為 `OFF`

```bash
$ cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_AOT_RUNTIME=OFF ..
```

## 編譯 WasmEdge

WasmEdge 提供了各種工具來支援更好的性能以及更多樣的執行期環境,
編譯完成後,您可以找到以下幾個 WasmEdge 相關工具:

1. `wasmedge` 是通用的 WASM runtime 。
* `wasmedge` 可以在直譯器模式下執行一個 `WASM` 檔案,也可以在 Ahead-of-time 模式下執行一個 `so` 檔案。
* 您可以透過將 CMake 選項 `WASMEDGE_BUILD_TOOLS` 設為 `OFF` 來禁止編譯所有工具。
2. `wasmedgec` 是一個 WASM Ahead-of-time 編譯器。
* `wasmedgec` 可以將一個通用的 `WASM` 檔案編譯成 `so` 檔案。
* 您可以透過將 CMake 選項 `WASMEDGE_BUILD_AOT_RUNTIME` 設為 `OFF` 來禁止編譯 Ahead-of-time 編譯器。
3. `libwasmedge_c.so` 是 WasmEdge C API 的共享函式庫。
* `libwasmedge_c.so` 提供了連接 WASM runtime 和 Ahead-of-time 編譯器的 C 語言 API。
* 如果 `WASMEDGE_BUILD_AOT_RUNTIME` 選項被設為 `OFF` ,與 Ahead-of-time 編譯器相關的 API 都將回傳錯誤。
4. `ssvm-qitc` 與 AI 應用程式相關,是支援 ONNX 格式的 AI 模型的 ONNC runtime 。
* 若您想嘗試使用 `ssvm-qitc` ,請參考 [ONNC-Wasm](https://github.com/ONNC/onnc-wasm) 專案來設定工作環境與執行幾個範例。
* 這是我們的 [ONNC-Wasm Tutorial ( YouTube 影片 )](https://www.youtube.com/watch?v=cbiPuHMS-iQ) 。

```bash
# 下載 WasmEdge docker image 後
$ docker run -it --rm \
-v <path/to/your/wasmedge/source/folder>:/root/wasmedge \
wasmedge/wasmedge:latest
(docker)$ cd /root/wasmedge
(docker)$ mkdir -p build && cd build
(docker)$ cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_TESTS=ON .. && make -j
```

## 執行內建測試

內建的測試僅有編譯選項 `WASMEDGE_BUILD_TESTS` 設為 `ON` 的時候才會啟用。

使用者可以使用這些測試來驗證 WasmEdge 執行檔與函式庫的正確性。

```bash
$ cd <path/to/wasmedge/build_folder>
$ LD_LIBRARY_PATH=$(pwd)/lib/api ctest
```

## 執行應用程式

接下來,請參考 [這份文件](run.md)`wasmedge` 上執行 WebAssembly 應用程式。
This page is moved into the [WasmEdge book](https://wasmedge.org/book/zh-TW/extend/build.html).
Loading

0 comments on commit 19e64ed

Please sign in to comment.