From c82d95bf9846083b1df206444d103de607d44370 Mon Sep 17 00:00:00 2001 From: Zhang Jingqiang Date: Tue, 3 Dec 2024 23:11:44 +0800 Subject: [PATCH] update and format docs --- .cargo/config.toml | 1 - .github/dependabot.yml | 1 - CHANGELOG.md | 1 - README.ja_JP.md | 10 ++++++---- README.md | 9 +++++---- README.zh_CN.md | 2 +- doc/dev-setup.md | 30 ++++++++++++++++++++++++------ 7 files changed, 36 insertions(+), 18 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 864ddbda6..fff79c321 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,3 @@ - [target.'cfg(target_arch = "x86_64")'] rustflags = [ "-C", "target-cpu=x86-64-v2", diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0af24dc02..cb22732fd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,3 @@ - version: 2 updates: - package-ecosystem: cargo diff --git a/CHANGELOG.md b/CHANGELOG.md index f75563fe3..887c12dfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - Each component have its own changelog. - [g3proxy](g3proxy/CHANGELOG) diff --git a/README.ja_JP.md b/README.ja_JP.md index 83bc39ed0..55a175376 100644 --- a/README.ja_JP.md +++ b/README.ja_JP.md @@ -46,16 +46,18 @@ G3 プロジェクトには多くのコンポーネントが含まれており 詳しい機能紹介とユーザーガイドは[g3proxy](g3proxy/README.md)をご覧ください。 -Sphinx を使用して生成された g3proxy リファレンス ドキュメントは、[Read the Docs](https://g3-project.readthedocs.io/projects/g3proxy/en/latest/) -でオンラインで参照できます。 詳細な設定形式、ログ形式、監視管理定義、プロトコル定義などを含みます。 +Sphinx を使用して生成された g3proxy リファレンス +ドキュメントは、[Read the Docs](https://g3-project.readthedocs.io/projects/g3proxy/en/latest/) +でオンラインで参照できます。 詳細な設定形式、ログ形式、メトリクスの定義、メトリクスの定義などを含みます。 ### g3tiles 作業中のリバースプロキシソリューション。 -Sphinx を使用して生成された g3tiles リファレンス ドキュメントは、[Read the Docs](https://g3-project.readthedocs.io/projects/g3tiles/en/latest/) +Sphinx を使用して生成された g3tiles リファレンス +ドキュメントは、[Read the Docs](https://g3-project.readthedocs.io/projects/g3tiles/en/latest/) でオンラインで参照できます。 -詳細な設定形式、ログ形式、監視管理定義などを含みます。 +詳細な設定形式、ログ形式、メトリクスの定義などを含みます。 ### g3bench diff --git a/README.md b/README.md index 4ce68896e..925fce803 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ including but not limited to proxy / reverse proxy (WIP) / load balancer (TBD) / ## Components -The G3 project contains many components, each of which has a separate subdirectory containing its own code, documentation, etc. +The G3 project contains many components, each of which has a separate subdirectory containing its own code, +documentation, etc. In addition to the component directories, there are some public directories: @@ -46,9 +47,9 @@ as we have basic support built in. See [g3proxy](g3proxy/README.md) for detailed introduction and user guide docs. -You can view the g3proxy reference documentation generated by sphinx online at +You can view the g3proxy reference documentation generated by sphinx online at [Read the Docs](https://g3-project.readthedocs.io/projects/g3proxy/en/latest/), -including detailed configuration format, log format, monitoring point definition, protocol definition, etc. +including detailed configuration format, log format, metrics definition, protocol definition, etc. ### g3tiles @@ -56,7 +57,7 @@ A work in progress reverse proxy solution. You can view the g3tiles reference documentation generated by sphinx online at [Read the Docs](https://g3-project.readthedocs.io/projects/g3tiles/en/latest/), -including detailed configuration format, log format, monitoring point definition, etc. +including detailed configuration format, log format, metrics definition, etc. ### g3bench diff --git a/README.zh_CN.md b/README.zh_CN.md index b4619e2fc..78181c745 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -43,7 +43,7 @@ G3项目包含许多组件,每一个组件单独一个子目录,包含各自 - 多种日志 & 监控解决方案集成能力 详细功能介绍及用户指南请看 [g3proxy](g3proxy/README.md)。 - + 可在 [Read the Docs](https://g3-project.readthedocs.io/projects/g3proxy/en/latest/) 线上查看使用sphinx生成的g3proxy参考文档, 包括详细配置格式、日志格式、监控打点定义、协议定义等。 diff --git a/doc/dev-setup.md b/doc/dev-setup.md index c5faa4f5e..846c8082f 100644 --- a/doc/dev-setup.md +++ b/doc/dev-setup.md @@ -1,5 +1,6 @@ Dev-Setup ----- + # Toolchain ## Install rustup @@ -34,19 +35,21 @@ rustup self update ## Install stable toolchains List all available components: + ```shell rustup component list ``` The following components is required and should have already been installed: - - rustc - - rust-std - - cargo - - rustfmt - - clippy +- rustc +- rust-std +- cargo +- rustfmt +- clippy **llvm-tools** is also recommended to be installed: + ```shell script rustup component add llvm-tools ``` @@ -54,11 +57,13 @@ rustup component add llvm-tools ## Install nightly toolchains Install nightly toolchains: + ```shell script rustup toolchain install nightly ``` List components in nightly channel: + ```shell script rustup component list --toolchain nightly ``` @@ -66,6 +71,7 @@ rustup component list --toolchain nightly ## Update toolchains Run the following command to update the toolchains for all channel: + ```shell script rustup update ``` @@ -73,11 +79,13 @@ rustup update # Plugins for cargo To install: + ```shell script cargo install ``` To update: + ```shell script cargo install -f ``` @@ -249,6 +257,7 @@ cargo build --vendored-openssl ## Development Libraries For *g3proxy*: + ```text openssl >= 1.1.1 c-ares >= 1.13.0 @@ -259,12 +268,14 @@ python3 >= 3.7 ## Development Tools The tools for C development should be installed, including but not limited to: + ```text gcc pkg-config ``` If the c-ares version in the OS repo is too old, the following tools is also required: + ```text cmake ``` @@ -272,6 +283,7 @@ cmake ## Rpc Code Generator We use capnproto rpc to communicate with the running daemon process: + ```text capnproto ``` @@ -279,6 +291,7 @@ capnproto ## Testing Tools The following tools are needed to run testing scripts: + ```text curl ``` @@ -286,6 +299,7 @@ curl ## Scripting Tools The following tools are used in scripts under directory *scripts/*: + ```text git jq @@ -296,6 +310,7 @@ xz ## Scripting Libraries We use python3 for more complicated scripts, the following packages are needed: + ```text toml requests @@ -306,13 +321,15 @@ dnspython ## Document Tools -We use [sphinx](https://www.sphinx-doc.org/en/master/) to generate docs, with theme [sphinx-rtd-theme](https://pypi.org/project/sphinx-rtd-theme/). +We use [sphinx](https://www.sphinx-doc.org/en/master/) to generate docs, with +theme [sphinx-rtd-theme](https://pypi.org/project/sphinx-rtd-theme/). ## Packaging Tools ### deb For all *Debian* based distributions: + ```text lsb-release dpkg-dev @@ -322,6 +339,7 @@ debhelper ### rpm For all *rhel* based distributions: + ```text rpmdevtools rpm-build