-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add in-repository documentation in doc/ and link from README #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # RustFS Project Documentation | ||
|
|
||
| This folder contains in-repository documentation for the RustFS project. For the full user manual, installation, and API reference, see the official [RustFS Documentation](https://docs.rustfs.com). | ||
|
|
||
| ## Contents | ||
|
|
||
| | Document | Description | | ||
| |----------|-------------| | ||
| | [Architecture](architecture.md) | High-level design, components, and workspace layout | | ||
| | [Development](development.md) | Building, testing, and contributing (Make targets, pre-commit) | | ||
| | [Configuration](configuration.md) | Configuration overview and environment variables | | ||
|
|
||
| ## Quick Links | ||
|
|
||
| - **Getting started (users)**: [docs.rustfs.com/installation](https://docs.rustfs.com/installation/) | ||
| - **Full docs**: [docs.rustfs.com](https://docs.rustfs.com) | ||
| - **Contributing**: [CONTRIBUTING.md](../CONTRIBUTING.md) and [doc/development.md](development.md) | ||
| - **CI and quality**: [.github/workflows/ci.yml](../.github/workflows/ci.yml), [Makefile](../Makefile) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Architecture | ||
|
|
||
| RustFS is a high-performance, distributed object storage system built in Rust with full S3 compatibility. This document summarizes the in-repository layout and main components. | ||
|
|
||
| ## Overview | ||
|
|
||
| - **Core binary**: The `rustfs` crate is the main application (API, console, storage orchestration). | ||
| - **Workspace**: All shared logic lives in crates under `crates/`; see the root [Cargo.toml](../Cargo.toml) `[workspace].members` for the full list. | ||
|
|
||
| ## Main Components | ||
|
|
||
| | Area | Crates | Purpose | | ||
| |------|--------|---------| | ||
| | **Core** | `rustfs` | Main server binary, S3 API, admin console, storage coordination | | ||
| | **Config** | `rustfs-config` | Configuration and environment variable handling | | ||
| | **Storage** | `rustfs-ecstore`, `rustfs-filemeta`, `rustfs-targets` | Erasure coding, metadata, target backends | | ||
| | **Auth & IAM** | `rustfs-appauth`, `rustfs-iam`, `rustfs-credentials`, `rustfs-keystone` | Authentication, policies, Keystone integration | | ||
| | **Security** | `rustfs-crypto`, `rustfs-kms` | Cryptography and key management | | ||
| | **Operations** | `rustfs-heal`, `rustfs-scanner`, `rustfs-audit` | Healing, scanning, audit targets | | ||
| | **Observability** | `rustfs-metrics`, `rustfs-obs`, `rustfs-notify` | Metrics, tracing, event notifications | | ||
| | **Protocols** | `rustfs-protocols`, `rustfs-s3select-api`, `rustfs-s3select-query` | FTPS/SFTP, S3 Select | | ||
| | **Utilities** | `rustfs-common`, `rustfs-utils`, `rustfs-rio`, `rustfs-workers` | Shared types, I/O, worker pools | | ||
|
|
||
| The root [Cargo.toml](../Cargo.toml) is the source of truth for crate names and membership. | ||
|
|
||
| ## Scoped Guidance | ||
|
|
||
| Path-specific rules for contributors and tooling are in `AGENTS.md` files: | ||
|
|
||
| - [.github/AGENTS.md](../.github/AGENTS.md) | ||
| - [crates/AGENTS.md](../crates/AGENTS.md) | ||
| - [crates/config/AGENTS.md](../crates/config/AGENTS.md) | ||
| - Additional scoped files under `crates/`, `rustfs/src/admin/`, and `rustfs/src/storage/` | ||
|
|
||
| See the root [AGENTS.md](../AGENTS.md) for precedence and mandatory pre-commit checks. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Configuration Overview | ||
|
|
||
| RustFS is configured via environment variables. This page gives an overview; the canonical source of truth is the `rustfs-config` crate. | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| - **Naming**: Use flat `RUSTFS_*` names (e.g. `RUSTFS_REGION`, `RUSTFS_ADDRESS`, `RUSTFS_VOLUMES`). Do not use module-segmented names like `RUSTFS_CONFIG_*`. | ||
| - **Constants and conventions**: See [crates/config/src/constants/](../crates/config/src/) and [crates/config/README.md](../crates/config/README.md) (including environment variable naming). | ||
|
|
||
| ## Key Variables (examples) | ||
|
|
||
| | Variable | Purpose | | ||
| |----------|---------| | ||
| | `RUSTFS_REGION` | Deployment region | | ||
| | `RUSTFS_ADDRESS` | Server address | | ||
| | `RUSTFS_VOLUMES` | Storage volumes | | ||
| | `RUSTFS_SCANNER_ENABLED` | Enable scanner | | ||
| | `RUSTFS_HEAL_ENABLED` | Enable healing | | ||
|
|
||
| Deprecated aliases are documented in [crates/config/README.md](../crates/config/README.md); compatibility behavior is maintained there. | ||
|
|
||
| ## Full Configuration Reference | ||
|
|
||
| For all options, defaults, and deployment guides (including TLS and Keystone), use the official [RustFS Documentation](https://docs.rustfs.com). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Development Guide | ||
|
|
||
| This page covers building, testing, and running quality checks for RustFS. For code formatting rules and PR expectations, see [CONTRIBUTING.md](../CONTRIBUTING.md). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Rust (see root [Cargo.toml](../Cargo.toml) `rust-version`) | ||
| - For full quality gates: `make` (see [.config/make/](../.config/make/) and root [Makefile](../Makefile)) | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| # Build the RustFS binary | ||
| make build | ||
| # or | ||
| cargo build --release | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
|
||
| ```bash | ||
| # Run tests | ||
| make test | ||
| # or | ||
| cargo test --all-targets | ||
| ``` | ||
|
Comment on lines
+21
to
+26
|
||
|
|
||
| ## Code Quality (Mandatory Before Commit) | ||
|
|
||
| Run all pre-commit checks: | ||
|
|
||
| ```bash | ||
| make pre-commit | ||
| ``` | ||
|
|
||
| If `make` is unavailable, run the equivalent steps from [.config/make/](../.config/make/). Typical steps: | ||
|
|
||
| - Format: `cargo fmt --all` and `cargo fmt --all --check` | ||
| - Lint: `cargo clippy --all-targets --all-features -- -D warnings` | ||
| - Check: `cargo check --all-targets` | ||
| - Tests: `cargo test --all-targets` | ||
|
|
||
|
Comment on lines
+38
to
+42
|
||
| See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed formatting and clippy rules. | ||
|
|
||
| ## Make Targets | ||
|
|
||
| - `make help` — Main help and categories | ||
| - `make help-build` — Build-related targets | ||
| - `make help-docker` — Docker and image targets | ||
| - `make fmt` / `make fmt-check` — Format and verify | ||
| - `make clippy` — Clippy | ||
| - `make check` — Compilation check | ||
| - `make test` — Tests | ||
| - `make pre-commit` — All checks required before commit | ||
|
|
||
| ## CI | ||
|
|
||
| Quality gates are defined in [.github/workflows/ci.yml](../.github/workflows/ci.yml). Keep local checks aligned with CI so `make pre-commit` matches what runs on the branch. | ||
|
|
||
| ## Branch and PR Baseline | ||
|
|
||
| - Use feature branches from latest `main`. | ||
| - Follow [Conventional Commits](https://www.conventionalcommits.org/), subject ≤ 72 characters. | ||
| - Use [.github/pull_request_template.md](../.github/pull_request_template.md) for PRs; use `N/A` for non-applicable sections. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link text points to
crates/config/src/constants/, but the actual link target is../crates/config/src/, which doesn’t match. Update the URL to point at thesrc/constants/directory (or adjust the link text) so readers land on the intended location.