There are several ways to contribute to posixutils-rs:
- coding
- writing tests
- writing documentation
- testing, especially POSIX compliance testing
- Rough draft: Core algorithm implemented. Bugs may exist. Many options not yet implemented.
- Feature complete: Believed to be complete per POSIX specification.
- Test coverage: Integration tests, positive and negative, are complete, pass 100%
- Code coverage: Automated code coverage data indicates 100%
- Translated: All strings are internationalized, including common OS errors for common error cases.
- Audited: An external party has reviewed and tested for correctness, POSIX compliance, security, races and similar issues.
- Separate logical changes into separate commits. For example, bug fixes and new features should be separate commits.
- All commits should pass tests. This keeps
git bisect
working. - All PRs must pass tests before merging.
- All code contributions must be copyright clean: either freshly written, or copied from source code with a compatible open source license.
cargo fmt
is required.- Ideal goal: Each utility should look like a standard Rust CLI program. Small, lightweight utility with command line processing, core algorithm, and zero external crate dependencies.
- "only std" When an external crate is required, avoid mega-crates. Prefer
std-only, or, tiny crates such as
atty
that perform a single, lightweight function. - Correctness, readability, performance, in that order. Code should be readable by unfamiliar developers. Avoid dense, uncommented code.
- All utilities should have tests.
- Only "quick" tests should be run automatically in
cargo test
- Longer tests, or tests requiring root access, should be triggered via special environment variables.
- POSIX compliance
- Support the most widely used GNU/BSD extensions
- If a system has an OS-specific feature that must be exposed through a given utility, do so.
- Race-free userland. See
ftw
internal crate. - Push small crates out: Create tiny, light-dep crates from common functionality (such as Lex or Yacc file parsing), and publish via cargo. Remove from main posixutils tree and set of crates.
- Include information about your system (
uname -a
) in every issue. - Provide any input data can that be used to reproduce the bug.
- Provide any error output from the utility.
- Describe expected results: What did you expect to happen, and did not?