Contribution Guide
Thank you for contributing to the JustEnoughVCS command-line tool! This guide is designed to help you quickly get started with the development process and understand the project's code standards.
Process
Deployment
- Clone the core library (VersionControl) and your forked command-line library, arranging them in the following directory structure:
├─ CommandLine
│ Cargo.lock
│ Cargo.toml
└─ VersionControl
Cargo.lock
Cargo.toml
- Switch the core library to the
devbranch. - In the core library directory, execute
setup.sh(Linux/macOS) orsetup.ps1(Windows) based on your operating system.
cd VersionControl
./setup.sh
# or
.\setup.ps1
Development
- Create a new feature branch from the
devbranch, using the naming formatfeat/xxxx,fix/xxxx, ordoc/xxxx. - Write your code, fixes, or documentation.
Related Articles
Building and Testing
Use scripts/dev/dev_deploy.sh (or .ps1) for test builds. The build artifacts are located in the .temp/deploy/ directory.
- Windows: Add
.temp/deploy/jv_cli.ps1to your PowerShell$PROFILE.
# ...
. C:\...\JustEnoughVCS\CommandLine\.temp\deploy\jv_cli.ps1
# ...
- Linux/macOS: Add a
sourcecommand in.zshrcor.bashrcpointing to.temp/deploy/jv_cli.sh.
# ...
source ~/.../JustEnoughVCS/CommandLine/.temp/deploy/jv_cli.sh
# ...
[!TIP]
For more convenient debugging,
you can run
scripts/make_lnk.ps1orscripts/make_lnk.shto create shortcuts or symbolic links.Related files are ignored by
.gitignore
Submission
- Before pushing code, be sure to execute
scripts/dev/deploy.shfor a formal local deployment to check for potential issues. - When creating a Pull Request (PR), please set the target branch to the command-line repository's
dev. PRs submitted to themainordeploy/branches will not be processed.
Important Notes
- Rust Version: It is recommended to use
rustc 1.92.0 (ded5c06cf 2025-12-08) (stable). - File Size: Strictly prohibit committing binary files larger than 1MB to the repository. If necessary, please discuss it first in an Issue.
- Core Library Modifications: If you need to modify the core library, please refer to the
CONTRIBUTING.mddocument in the VersionControl repository.
Other Development Conventions
- Utility Functions: Reusable functionality should be placed in the
utils/directory (e.g.,utils/feat.rs). Test code should be written directly within the corresponding feature file. - Special Files:
.rsfiles starting with an underscore_are excluded by the.gitignorerule and will not be tracked by Git. - File Movement: If you need to move a file, be sure to use the
git mvcommand or ensure the file is already tracked by Git. The commit message should explain the reason for the move. - Frontend/Backend Responsibilities: The frontend (command-line interface) should remain lightweight, primarily responsible for data collection and presentation. Any operation that needs to modify workspace data must call the interfaces provided by the core library.
Regarding Existing Code
Please note that the above standards were established after the project stabilized. Existing code may contain parts that do not yet follow these rules. If you discover such cases, we welcome and appreciate your submissions to correct them.
Finally
Thank you for reading this far! We look forward to your contributions and welcome you to discuss with us in the project's discussion area at any time.
Once again, thank you sincerely for your support of JustEnoughVCS!
