Thank you for your interest in contributing to FE Engine! This document provides guidelines and instructions for contributing.
Be respectful and constructive in all interactions. We aim to maintain a welcoming and inclusive community.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/fe-engine.git - Add upstream remote:
git remote add upstream https://github.com/krank56/fe-engine.git - Create a feature branch:
git checkout -b feature/your-feature-name
- Rust 1.70 or higher
- Cargo
- (Optional) Metal development tools for GPU features on macOS
cargo build# Run all tests
cargo test
# Run specific test
cargo test test_beam_analysis
# Run with release optimizations
cargo test --releaseWe follow the standard Rust style guidelines:
# Format code
cargo fmt
# Run clippy linter
cargo clippy -- -D warningsConfiguration files:
rustfmt.toml- Code formatting rulesclippy.toml- Linting rules
- Feature:
feature/description - Bug fix:
fix/description - Documentation:
docs/description - Performance:
perf/description
Write clear, descriptive commit messages:
Add support for shell elements
- Implement shell element stiffness matrix
- Add local-to-global transformation
- Include tests for shell element
- Add tests for all new functionality
- Ensure existing tests pass
- Include integration tests for major features
- Add benchmark tests for performance-critical code
- Add doc comments to all public APIs
- Update README.md for user-facing changes
- Add examples for new features
- Update CHANGELOG.md
-
Update your branch with latest upstream:
git fetch upstream git rebase upstream/main
-
Ensure all tests pass and code is formatted:
cargo test cargo fmt cargo clippy -
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
-
PR should include:
- Clear description of changes
- Link to related issues
- Test coverage
- Documentation updates
- Maintainers will review your PR
- Address feedback and update PR
- Once approved, maintainer will merge
- Additional element types (shell, solid, truss)
- Nonlinear analysis support
- Dynamic analysis capabilities
- Performance optimizations
- Cross-platform GPU support
- API documentation improvements
- Tutorial examples
- Wiki content
- Validation examples
- Additional test cases
- Benchmarking suite
- Validation against commercial FEA tools
fe-engine/
├── src/
│ ├── structure/ # Core model definitions
│ ├── builder/ # Model builder API
│ ├── validation/ # Validation system
│ ├── analysis/ # FEA solvers
│ ├── audit/ # Audit trail
│ └── export/ # Result export
├── tests/
│ ├── integration/ # Integration tests
│ ├── contract/ # Contract tests
│ └── benchmarks/ # Benchmark tests
└── examples/ # Usage examples
- Use
Result<T, E>for error handling - Prefer iterator chains over loops
- Use meaningful variable names
- Keep functions small and focused
- Document public APIs with examples
- Profile before optimizing
- Use benchmarks to verify improvements
- Consider memory layout for cache efficiency
- Avoid unnecessary allocations
- Use
thiserrorfor error types - Provide descriptive error messages
- Include context in error chains
- Unit tests in same file as implementation
- Integration tests in
tests/directory - Use
approxcrate for floating-point comparisons - Test edge cases and error conditions
- Open an issue for bugs or feature requests
- Tag issues with appropriate labels
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the MIT License.
Contributors will be acknowledged in the project documentation and release notes.