Skip to content

Commit

Permalink
Update website (#35)
Browse files Browse the repository at this point in the history
- update installation.md
- update contribute_codes.md
- update script for access statistics
- update footer
  • Loading branch information
iyangsj authored Nov 15, 2023
1 parent 426eb2f commit 04f39f3
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 23 deletions.
2 changes: 1 addition & 1 deletion website/docs/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The `--all` option enables cargo to build both the tquic library and example too
If you want to enable the C API, just add `-F ffi` option to the `cargo build` command:

```bash
cargo build --release --all -F ffi
cargo build --release -F ffi
```
</TabItem>

Expand Down
4 changes: 2 additions & 2 deletions website/docs/how_to_contribute/contribute_codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The guidelines in this section will help you develop TQUIC in a local environmen

- Please refer to the coding format of Rust language.
- Unit test is needed for all codes. All unit tests should be passed.
- Please follow [regulations of submitting codes](contribute_codes#guide-of-submitting-pr-to-github).
- Please follow [regulations of submitting codes](contribute_codes#guide-of-submitting-pull-request-to-github).


### [Fork](https://help.github.com/articles/fork-a-repo/)
Expand Down Expand Up @@ -146,7 +146,7 @@ Please wait for the review. If any modifications are necessary, you can update t

### Pass unit tests

Every new commit in your Pull Request will trigger CI unit tests, so please ensure that necessary comments have been included in your commit message. Please refer to [commit](contribute_codes.md#commit)
Every new commit in your Pull Request will trigger CI unit tests, so please ensure that necessary comments have been included in your commit message. Please refer to [commit](contribute_codes.md#commit).

Please note the procedure of CI unit tests in your Pull Request which will be finished in several minutes.

Expand Down
34 changes: 29 additions & 5 deletions website/docs/how_to_contribute/development_guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ cbindgen -o include/tquic.h

| Directory/File | Description |
| -------------- | ----------- |
| src/connection/ | Core implementation of the QUIC protocol |
| src/congestion_control/ | Various congestion control algorithms |
| src/tls/ | An wrapper of boringssl/rustls |
| src/h3/ | HTTP/3 protocol |
| src/qlog/ | Qlog |
| src/connection/ | Core implementation of the QUIC protocol |
| src/congestion_control/ | Various congestion control algorithms |
| src/multipath_scheduler/ | Various multipath scheduling algorithms |
| src/tls/ | An wrapper of boringssl/rustls |
| src/h3/ | HTTP/3 protocol |
| src/qlog/ | Qlog |
| src/ffi.rs | Foreign Function Interface for C/C++ |
| src/build.rs | Build tools for boringssl |
| src/\*.rs | Fundamental building blocks for the TQUIC library |


## Unit testing

* How to output test case logs
Expand All @@ -64,6 +66,28 @@ cargo tarpaulin --exclude-files "src/third_party/*" -o html
```


## Fuzz testing

* How to install the tool [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) for for fuzzing
```
rustup install nightly
rustup default nightly
cargo install cargo-fuzz
```

* How to list all the existing fuzz targets
```
cargo fuzz list
```

* How to run a fuzzing target
```
cargo fuzz run <target_name> -- -max_total_time=30
```

Refer to the [cargo-fuzz documentation](https://rust-fuzz.github.io/book/cargo-fuzz.html) for more information.


## Conformance testing

We maintaine a formal specification of the [QUIC v1](https://datatracker.ietf.org/doc/html/rfc9000) protocol using the [Ivy language](http://microsoft.github.io/ivy/). This specification can be used to test implementations of QUIC using [compositional specification-based testing methods](https://dl.acm.org/doi/10.1145/3341302.3342087).
Expand Down
4 changes: 2 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const config = {
scripts: [
// Access Statistics
{
src: 'https://hm.baidu.com/hm.js?fd65f9f2d0d936713c5ec3e52dc1b497',
src: 'https://hm.baidu.com/hm.js?5f7e9bd63c8f9a814fb73b9ff8c2235b',
async: true,
},
],
Expand Down Expand Up @@ -184,7 +184,7 @@ const config = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} The TQUIC Authors | Documentation Distributed under CC-BY-4.0`,
copyright: `Copyright © ${new Date().getFullYear()} The TQUIC Authors | Documentation Distributed under CC-BY-4.0 <br> Copyright © ${new Date().getFullYear()} Tencent. All Rights Reserved | <a href=https://beian.miit.gov.cn style="color:#FFFFFF;">Yue B2-20090059-1892</a>`,
},
prism: {
theme: lightCodeTheme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cargo build --release --all
如果要启用C语言接口,请在`cargo build`命令后添加参数`-F ffi`

```bash
cargo build --release --all -F ffi
cargo build --release -F ffi
```
</TabItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sidebar_position: 1

- 请遵守Rust编程语言代码风格规范。
- 所有代码都需要单元测试。所有单元测试都应通过。
- 请参考[代码合入规范](contribute_codes#guide-of-submitting-pr-to-github)
- 请参考[代码合入规范](contribute_codes#github-pull-request%E6%8C%87%E5%8D%97)


### [派生代码库](https://help.github.com/articles/fork-a-repo/)
Expand Down Expand Up @@ -62,7 +62,7 @@ no changes added to commit (use "git add" and/or "git commit -a")

### 编译及测试

关于编译和测试,请参考[安装](../getting_started/installation)
关于编译和测试,请参考[安装](../getting_started/installation)章节。


### 提交代码
Expand Down Expand Up @@ -146,7 +146,7 @@ $ git push origin my-cool-stuff

### 通过单元测试

Pull Request中每一次新的提交都会触发持续集成单元测试,因此请确保在提交消息中包含必要的注释。请参考[commit](contribute_codes.md#commit)
Pull Request中每一次新的提交都会触发持续集成单元测试,因此请确保在提交消息中包含必要的注释。请参考[commit](contribute_codes.md#%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81)章节。

请注意Pull Request中的持续集成单元测试,会执行几分钟才完成。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ cbindgen -o include/tquic.h

| 目录或文件 | 说明 |
| -------------- | ----------- |
| src/connection/ | QUIC协议核心实现 |
| src/congestion_control/ | 各种拥塞控制算法实现 |
| src/tls/ | 基于boringssl/rustls的封装 |
| src/h3/ | HTTP/3协议 |
| src/qlog/ | Qlog |
| src/ffi.rs | C/C++语言的封装接口 |
| src/build.rs | boringssl库的编译 |
| src/\*.rs | TQUIC协议库的基础组件 |
| src/connection/ | QUIC协议核心实现 |
| src/congestion_control/ | 各种拥塞控制算法实现 |
| src/multipath_scheduler/ | 各种多路径调度算法实现 |
| src/tls/ | 基于boringssl/rustls的封装 |
| src/h3/ | HTTP/3协议 |
| src/qlog/ | Qlog |
| src/ffi.rs | C/C++语言的封装接口 |
| src/build.rs | boringssl库的编译 |
| src/\*.rs | TQUIC协议库的基础组件 |



Expand All @@ -66,6 +67,29 @@ cargo tarpaulin --exclude-files "src/third_party/*" -o html
```


## 模糊测试

* 如何安装模糊测试工具[cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz)
```
rustup install nightly
rustup default nightly
cargo install cargo-fuzz
```

* 如果查看已有模糊测试用例
```
cargo fuzz list
```

* 如果执行指定模糊测试用例
```
cargo fuzz run <target_name> -- -max_total_time=30
```

更多用法参见[cargo-fuzz文档](https://rust-fuzz.github.io/book/cargo-fuzz.html)



## 一致性测试

我们使用[Ivy语言](http://microsoft.github.io/ivy/)定义了[QUIC v1](https://datatracker.ietf.org/doc/html/rfc9000)协议的形式化规范。基于该规范,使用[基于组合规范的测试方法](https://dl.acm.org/doi/10.1145/3341302.3342087)可以测试QUIC实现的一致性。
Expand Down
2 changes: 1 addition & 1 deletion website/i18n/zh/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"description": "The label of footer link with label=Blog linking to /blog"
},
"copyright": {
"message": "Copyright © 2023 TQUIC作者 | 文档发布基于CC-BY-4.0授权许可",
"message": "Copyright © 2023 TQUIC作者 | 文档发布基于CC-BY-4.0授权许可<br> Copyright © 2023 腾讯公司 版权所有 | <a href=https://beian.miit.gov.cn style=\"color:#FFFFFF;\">粤B2-20090059-1892</a> ",
"description": "The footer copyright"
}
}

0 comments on commit 04f39f3

Please sign in to comment.