Contribution Process
Contributions to NativeLink or its dependencies should be made in the form of GitHub pull requests. Each pull request will be reviewed by a core contributor (someone with permission to land patches) and either landed in the main tree or given feedback for changes that would be required. Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on it. This is to prevent duplicated efforts from contributors on the same issue.Development Environment
NativeLink supports multiple development workflows:Nix
Recommended development environment with reproducible builds
Bazel
Primary build system for production builds and testing
Cargo
Direct Rust development with Cargo toolchain
Before You Start
Git Setup
NativeLink has a specific contribution process to ensure consistent quality across all commits:Configure SSH Keys
In your GitHub settings, set up distinct authentication and signing keys. See GitHub’s documentation:
Fork the Repository
Fork the
TraceMachina/nativelink repository by clicking on the Fork button on GitHub.Development Workflows
Building from Source
Choose your preferred build method:- Nix - Recommended for reproducible builds and CI parity
- Bazel - Primary build system with remote execution support
- Cargo - Standard Rust development workflow
Code Quality
NativeLink maintains high code quality standards:- Pre-commit Hooks: Run
pre-commit run -ato check formatting and lints - Rust Formatting: Automatically enforced via
rustfmt - Clippy Lints: Strict linting rules defined in
Cargo.toml - Documentation Tests: Run
bazel test docteststo verify code examples
Testing
Test your changes thoroughly:Creating Pull Requests
Make Changes and Commit
Follow commit message guidelines:
- Use imperative mood (“Add feature” not “Adds feature”)
- Start with capital letter
- No trailing period
- Keep title under 50 characters
- Add details in commit body (72 char line length)
Push and Create PR
Common Tasks
Fixing Rust Formatting
Running Pre-commit Hooks
Setting up rust-analyzer
Generate project configuration for your IDE:Generating Documentation
Generating Code Coverage
Documentation Style
NativeLink follows the Microsoft Style Guide. Check documentation with Vale:Code of Conduct
NativeLink’s Code of Conduct is available in the CODE_OF_CONDUCT file.Next Steps
Build from Source
Learn how to build NativeLink locally
Development with Nix
Set up the recommended development environment
Development with Bazel
Use Bazel for building and testing
Development with Cargo
Work with standard Rust tooling