Thank you for your interest in contributing to Yazi! We welcome contributions in the form of bug reports, feature requests, documentation improvements, and code changes.
This guide will help you understand how to contribute to the project.
Before you begin, ensure you have met the following requirements:
- Rust installed on your machine. You can download it from rustup.rs.
- Familiarity with Git and GitHub.
-
Fork the Yazi repository to your GitHub account.
-
Clone your fork to your local machine:
git clone https://github.com/<your-username>/yazi.git
-
Set up the upstream remote:
git remote add upstream https://github.com/sxyazi/yazi.git
A brief overview of the project's structure:
.
├── assets/ # Assets like images and fonts
├── nix/ # Nix-related configurations
├── scripts/ # Helper scripts used by CI/CD
├── snap/ # Snapcraft configuration
├── yazi-adapter/ # Yazi image adapter
├── yazi-boot/ # Yazi bootstrapper
├── yazi-cli/ # Yazi command-line interface
├── yazi-config/ # Yazi configuration file parser
├── yazi-core/ # Yazi core logic
├── yazi-dds/ # Yazi data distribution service
├── yazi-fm/ # Yazi file manager
├── yazi-plugin/ # Yazi plugin system
├── yazi-proxy/ # Yazi event proxy
├── yazi-scheduler/ # Yazi task scheduler
├── yazi-shared/ # Yazi shared library
├── .github/ # GitHub-specific files and workflows
├── Cargo.toml # Rust workflow configuration
└── README.md # Project overview
-
Ensure the latest stable Rust is installed:
rustc --version cargo --version
-
Build the project:
cargo build
-
Run the tests:
cargo test
-
Format the code (requires
rustfmt
nightly):rustup component add rustfmt --toolchain nightly rustfmt +nightly **/*.rs
If you find a bug, please file an issue.
If you have a feature request, please file an issue.
Yazi's documentation placed at yazi-rs/yazi-rs.github.io, contributions related to documentation need to be made within this repository.
-
Create a new branch for your changes:
git checkout -b your-branch-name
-
Make your changes. Ensure that your code follows the project's coding style and passes all tests.
-
Commit your changes with a descriptive commit message:
git commit -m "feat: an awesome feature"
-
Push your changes to your fork:
git push origin your-branch-name
-
Ensure your fork is up-to-date with the upstream repository:
git fetch upstream git checkout main git merge upstream/main
-
Rebase your feature branch onto the main branch:
git checkout your-branch-name git rebase main
-
Create a pull request to the
main
branch of the upstream repository. Follow the pull request template and ensure that:- Your code passes all tests and lints.
- Your pull request description clearly explains the changes and why they are needed.
-
Address any review comments. Make sure to push updates to the same branch on your fork.