Thank you for your interest in contributing to Axonml! This document provides guidelines and information for contributors.
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
- Rust 1.70 or later
- Cargo (comes with Rust)
- Git
# Clone the repository
git clone https://github.com/automatanexus/axonml.git
cd axonml
# Build all crates
cargo build --workspace
# Run tests
cargo test --workspace
# Run clippy (linting)
cargo clippy --workspace
# Format code
cargo fmt --all- Check existing issues to avoid duplicates
- Use the bug report template
- Include:
- Rust version (
rustc --version) - Operating system
- Minimal reproduction code
- Expected vs actual behavior
- Rust version (
- Check existing issues and discussions
- Use the feature request template
- Describe:
- Use case and motivation
- Proposed API (if applicable)
- Alternatives considered
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
cargo test --workspace) - Run clippy (
cargo clippy --workspace) - Format code (
cargo fmt --all) - Commit with clear messages
- Push to your fork
- Open a Pull Request
- Follow the Rust API Guidelines
- Use
cargo fmtfor formatting - Use
cargo clippyfor linting - Document public APIs with doc comments
Each source file should follow this structure:
//! Module Name - Brief Description
//!
//! Detailed description of the module.
//!
//! @version X.Y.Z
//! @author AutomataNexus Development Team
// =============================================================================
// Imports
// =============================================================================
use ...;
// =============================================================================
// Constants
// =============================================================================
// =============================================================================
// Types and Traits
// =============================================================================
// =============================================================================
// Implementations
// =============================================================================
// =============================================================================
// Tests
// =============================================================================
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_example() {
// ...
}
}- Write unit tests for new functionality
- Place tests in a
testssubmodule or intests/ - Use descriptive test names:
test_tensor_addition_broadcasts_correctly - Test edge cases and error conditions
- Document all public items
- Include examples in doc comments
- Update README if adding significant features
- Add entries to CHANGELOG.md
- Minimize external dependencies
- Prefer well-maintained, widely-used crates
- Feature-gate optional dependencies
- Document why each dependency is needed
- Benchmark performance-critical code
- Avoid unnecessary allocations
- Use iterators over loops where appropriate
- Consider SIMD for hot paths
- Avoid
unsafeunless absolutely necessary - Document safety invariants for any
unsafecode - Prefer safe abstractions
- Title: Use a clear, descriptive title
- Description: Explain what and why (not just how)
- Tests: Include tests for changes
- Documentation: Update docs as needed
- Changelog: Add entry for user-facing changes
- Code compiles without warnings
- All tests pass
- Clippy passes without warnings
- Code is formatted with
cargo fmt - Documentation updated
- CHANGELOG.md updated (if applicable)
Releases follow semantic versioning (SemVer):
- MAJOR: Breaking API changes
- MINOR: New features, backwards compatible
- PATCH: Bug fixes, backwards compatible
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and general discussion
- Email: dev@automatanexus.dev
Contributors are recognized in:
- CHANGELOG.md for their contributions
- GitHub contributors page
Thank you for contributing to Axonml!
AutomataNexus Development Team