Thanks for your interest in contributing to Relink. Contributions of all sizes are welcome, including bug reports, documentation improvements, examples, tests, refactors, and new features.
This document describes the general contribution workflow for the project.
You can help by:
- reporting bugs or unclear behavior
- improving documentation or examples
- adding tests or benchmarks
- fixing issues labeled
good first issue - proposing or implementing new features
- improving portability, safety, or performance
For small fixes, feel free to open a pull request directly.
For larger changes, please open an issue first so we can align on scope and design before implementation. This is especially helpful for:
- public API changes
- loader behavior changes
- feature-flag changes
- large refactors
- cross-platform or
no_stdbehavior changes
Before opening a new issue or pull request, please check whether the topic has already been discussed.
Relink uses stable Rust for regular development. The current minimum supported Rust version is 1.93.0.
Typical setup:
rustup toolchain install stable
cargo testSome CI jobs also use nightly or cross targets. You usually do not need to run every CI configuration locally unless your change touches those areas directly.
- Fork the repository and create a topic branch from
main. - Keep the change focused. Small, reviewable pull requests are preferred.
- Add or update tests when behavior changes.
- Update documentation when the public API, examples, or user-facing behavior changes.
- Run formatting and relevant tests locally.
- Open a pull request with a clear description of the change and why it is needed.
At a minimum, please run:
cargo fmt --all
cargo testIf your change touches feature-gated code, also run:
cargo test --features fullIf you changed platform-specific code or workspace crates, running additional checks is appreciated when practical. For example:
cargo run -p windows-elf-loader --example from_memoryNotes:
- The
mini-loadercrate is exercised in CI with a nightly toolchain and ano_stdtarget. - Cross-target validation is primarily handled by CI.
Please try to match the existing style of the codebase:
- prefer focused changes over unrelated cleanup
- keep public APIs clear and well-documented
- preserve existing behavior unless the change intentionally adjusts it
- add tests for bug fixes and behavior changes when possible
- keep examples and docs in sync with code changes
This project contains low-level loader logic and unsafe code. When touching unsafe code:
- keep the change narrowly scoped
- explain important invariants in code comments when needed
- describe the safety reasoning in the pull request
Conventional Commit-style messages are recommended and match the current history well. Examples:
fix(loader): reject malformed program header tablesrefactor(elf): wrap ELF metadata with semantic typesdocs(readme): clarify lazy binding workflow
This is recommended rather than strictly required, but it helps keep history readable.
Before opening a pull request, please check that:
- the change is based on the latest
mainbranch - the pull request has a clear title and description
- relevant tests pass locally
- documentation and examples are updated if needed
- unrelated formatting or refactoring is not mixed into the same change
Reviews may ask for:
- narrower scope
- clearer tests
- updated documentation
- safer handling of low-level or platform-specific behavior
Please do not worry if feedback asks for iteration. That is a normal part of the process.
Bug reports are most helpful when they include:
- the target platform
- Rust version
- enabled feature flags
- a minimal reproduction or failing example
- expected behavior and actual behavior
By contributing to this repository, you agree that your contributions will be licensed under the same terms as the project: MIT OR Apache-2.0.