If you want to help Best Of RS become better, there are three ways:
- Recommend One (share your knowledge of the Rust ecosystem)
- Report bugs and feature requirements (share your usage experience)
- Contribute code (open Pull Requests to extend or improve features)
The first two are easy to find on the GitHub page. This guide focuses on how to contribute code to
Best Of RS.
Before contributing, take a look at Architecture.
After cloning this project, make sure your dependencies are up to date.
You should install a compatible version of dioxus-cli for the Dioxus version in crates/ui/Cargo.toml.
Before starting development, confirm the following prerequisites:
- Get your
GitHub Tokenfor admin features. - Run your
Database(Postgres is now the only one db adapter) andRedis. For local development, using Docker is strongly recommended. - Add
development.tomlincrates/infra/src/config/based on the example template, then set your actual keys.
Then, in the workspace root directory, run:
dx serve -p uiYou can also run with the experimental hot-reload feature:
dx serve --hot-reload -p ui(Optional) Development & Production
dx uses the configuration in crates/ui/Dioxus.toml. There is another Dioxus.toml.prod for better production build output.
If you are interested in the differences, see the official DioxusLabs documentation.
This repository enforces code quality through Pull Request CI checks.
Before your contribution is merged, the following CI jobs must pass:
Check:RUSTFLAGS="-A ambiguous_glob_reexports" cargo check --workspace --all-featuresRustfmt:cargo fmt --all -- --checkClippy:cargo clippy --workspace --all-targets --all-features -- -D warnings -A ambiguous_glob_reexports
If any job fails, update the PR until all checks pass.
Before pushing, run the same checks locally:
RUSTFLAGS="-A ambiguous_glob_reexports" cargo check --workspace --all-features
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings -A ambiguous_glob_reexports(Optional) Local Git Hook (Private)
You can create a local private hook in .git/hooks/pre-commit to run these commands automatically.
Example hook template:
#!/usr/bin/env bash
set -euo pipefail
RUSTFLAGS="-A ambiguous_glob_reexports" cargo check --workspace --all-features
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings -A ambiguous_glob_reexportsNote: files under .git/hooks/ are local-only and are not committed to this repository.