tuhaihe commented on code in PR #261:
URL: https://github.com/apache/cloudberry-site/pull/261#discussion_r2036429545


##########
docs/developer/develop-extensions-using-rust.md:
##########
@@ -0,0 +1,313 @@
+# Develop Database Extensions Using PGRX
+
+This document explains how to develop database extensions using Rust and the 
PGRX framework. PGRX is a Rust framework for developing extensions for Apache 
Cloudberry, offering a safe and efficient development experience.
+
+For the core features of PGRX, see [PGRX Core Features](#pgrx-core-features). 
For notes of PGRX, see [Considerations and Best Practices for 
PGRX](#considerations-and-best-practices-for-pgrx).
+
+## Requirements for Development Environment
+
+- Make sure that your OS is one of Debian/Ubuntu and RHEL/CentOS.
+- Make sure that your Apache Cloudberry cluster is compiled from source code, 
not installed using RPM package.
+
+### Basic Software Environment
+
+Required software:
+
+- Rust toolchain (`rustc`, `cargo`, and `rustfmt`) - install via 
https://rustup.rs
+- Git
+- libclang 11 or higher (for bindgen)
+- GCC 7 or higher
+
+### PostgreSQL Dependencies
+
+Install required PostgreSQL dependencies for your OS:
+
+For Debian/Ubuntu:
+
+```bash
+sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison \
+    libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
+```
+
+For RHEL/CentOS:
+
+```bash
+sudo yum install -y bison-devel readline-devel zlib-devel openssl-devel wget 
ccache
+sudo yum groupinstall -y 'Development Tools'
+```
+
+After installing the dependencies, you can start developing extensions.
+
+## Quick Start for PGRX
+
+This section introduces the process of quickly developing extensions using 
PGRX, including:
+
+- Setting up and installing PGRX
+- Creating extension
+- Installing and using extension
+
+### Set up and Install PGRX
+

Review Comment:
   Can add one note like this:
   
   ```suggestion
   :::note
   PGRX is maintained by PgCentral Foundation, Inc., while we used here is one 
[forked PGRX version](https://github.com/cloudberry-contrib/pgrx) with better 
compatibility within Cloudberry. It's contributed by the community members and 
customized for Cloudberry, but please note that it is not maintained as one 
official Cloudberry project.
   :::
   ```



##########
i18n/zh/docusaurus-plugin-content-docs/current/developer/develop-extensions-using-rust.md:
##########
@@ -0,0 +1,309 @@
+# 使用 PGRX 框架开发数据库扩展
+
+本文档介绍如何使用 Rust 和 PGRX 框架开发数据库扩展。PGRX 是一个高效、安全的 Rust 框架,适用于开发 Apache Cloudberry 
的数据库扩展。
+
+PGRX 的功能说明,参考 [PGRX 核心功能](#pgrx-核心功能)。PGRX 的注意事项,参考 [PGRX 注意事项](#pgrx-注意事项)。
+
+## 开发环境要求
+
+- 确保您的操作系统为 Debian/Ubuntu 或 RHEL/CentOS 系统。
+- 确保您的 Apache Cloudberry 集群是通过源码编译的,非通过 RPM 包安装的。
+
+### 基础软件环境
+
+- 确保已安装以下软件:
+
+  - Rust 工具链(`rustc`、`cargo` 和 `rustfmt`),建议通过 https://rustup.rs 安装
+  - Git
+  - libclang 11 或更高版本(用于 bindgen)
+  - GCC 7 或更高版本
+
+### PostgreSQL 依赖
+
+确保已根据操作系统安装以下 PostgreSQL 依赖:
+
+对于 Debian/Ubuntu 系统:
+
+```bash
+sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison \
+    libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
+```
+
+对于 RHEL/CentOS 系统:
+
+```bash
+sudo yum install -y bison-devel readline-devel zlib-devel openssl-devel wget 
ccache
+sudo yum groupinstall -y 'Development Tools'
+```
+
+完成上述依赖安装后,即可开始开发扩展。
+
+## 快速上手
+
+本节介绍如何使用 PGRX 快速开发数据库扩展,主要包括:
+
+- 配置 PGRX 环境与安装
+- 创建扩展
+- 安装和使用扩展
+
+### 配置 PGRX 环境与安装
+

Review Comment:
   ```suggestion
   :::note
   PGRX 由 PgCentral Foundation, Inc. 维护,但此处我们使用的版本是一个 [PGRX 
衍生版本](https://github.com/cloudberry-contrib/pgrx),与 Cloudberry 
保持了良好的兼容性。该版本是由社区成员贡献,而非 Cloudberry 官方项目。
   :::
   ```



##########
docs/developer/develop-extensions-using-rust.md:
##########
@@ -0,0 +1,313 @@
+# Develop Database Extensions Using PGRX
+
+This document explains how to develop database extensions using Rust and the 
PGRX framework. PGRX is a Rust framework for developing extensions for Apache 
Cloudberry, offering a safe and efficient development experience.
+
+For the core features of PGRX, see [PGRX Core Features](#pgrx-core-features). 
For notes of PGRX, see [Considerations and Best Practices for 
PGRX](#considerations-and-best-practices-for-pgrx).
+
+## Requirements for Development Environment
+
+- Make sure that your OS is one of Debian/Ubuntu and RHEL/CentOS.
+- Make sure that your Apache Cloudberry cluster is compiled from source code, 
not installed using RPM package.
+
+### Basic Software Environment
+
+Required software:
+
+- Rust toolchain (`rustc`, `cargo`, and `rustfmt`) - install via 
https://rustup.rs
+- Git
+- libclang 11 or higher (for bindgen)
+- GCC 7 or higher
+
+### PostgreSQL Dependencies
+
+Install required PostgreSQL dependencies for your OS:
+
+For Debian/Ubuntu:
+
+```bash
+sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison \
+    libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
+```
+
+For RHEL/CentOS:
+
+```bash
+sudo yum install -y bison-devel readline-devel zlib-devel openssl-devel wget 
ccache
+sudo yum groupinstall -y 'Development Tools'

Review Comment:
   Could we specify the dependencies? But if not, it also seems ok.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to