Thank you for your interest in contributing to Ferrous Forge! This document provides guidelines and instructions for contributing.
This project and everyone participating in it is governed by the Ferrous Forge Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [kryptobaseddev@gmail.com].
Before reporting an issue:
- Check existing issues to avoid duplicates
- Try to reproduce the issue with the latest version
- Collect relevant information (OS, Rust version, error messages)
When reporting:
- Use a clear, descriptive title
- Provide steps to reproduce
- Include expected vs actual behavior
- Add relevant logs or screenshots
Feature requests are welcome! Please:
- Check if the feature has already been requested
- Explain the use case and benefits
- Consider if it aligns with project goals
- Be open to discussion and alternatives
# Clone the repository
git clone https://github.com/yourusername/ferrous-forge
cd ferrous-forge
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build the project
cargo build
# Run tests
cargo test
# Run with verbose output for development
cargo run -- --verbose- Fork the repository on GitHub
- Create a feature branch:
git checkout -b feature-name - Make your changes following our coding standards
- Test your changes:
cargo test - Check formatting:
cargo fmt - Run clippy:
cargo clippy - Commit with clear message:
git commit -m "feat: add new feature" - Push to your fork:
git push origin feature-name - Create a Pull Request on GitHub
This project uses Ferrous Forge's own standards:
- Rust Edition 2024
- No underscore parameters
- No unwrap() in production code
- All public APIs must be documented
- Maximum 300 lines per file
- Maximum 50 lines per function
Run validation before committing:
cargo run -- validate .Follow conventional commits:
type: brief description
Longer explanation if needed.
Fixes #issue-number
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Test additions or changeschore: Maintenance tasks
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run with output
cargo test -- --nocapture
# Run benchmarks
cargo bench- Write unit tests for new functions
- Add integration tests for new features
- Use property-based testing where appropriate
- Ensure tests are deterministic
Example test:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_feature() {
// Arrange
let input = "test";
// Act
let result = process(input);
// Assert
assert_eq!(result, expected);
}
}All public items must be documented:
/// Processes input according to standards.
///
/// # Arguments
/// * `input` - The data to process
///
/// # Returns
/// Processed result or error
///
/// # Examples
/// ```
/// let result = process("data")?;
/// ```
pub fn process(input: &str) -> Result<String> {
// Implementation
}When adding features:
- Update relevant .md files in docs/
- Add examples to documentation
- Update README if needed
- Ensure
cargo docbuilds without warnings
- Ensure CI passes: All checks must be green
- Update documentation: If behavior changes
- Add tests: For new functionality
- Request review: From maintainers
- Address feedback: Make requested changes
- Squash commits: If requested by maintainers
Maintainers handle releases:
- Update version in Cargo.toml
- Update CHANGELOG.md
- Create git tag
- Publish to crates.io
- Create GitHub release
- Check documentation in docs/
- Look at existing issues
- Ask in discussions
- Reach out to maintainers
Contributors are recognized in:
- GitHub contributors page
- Release notes for significant contributions
- CONTRIBUTORS.md file (for regular contributors)
Thank you for contributing to Ferrous Forge!