This project accepts contributions via GitHub Issues exclusively. We do not accept Pull Requests.
This project uses AI-assisted coding for development. In this workflow:
- PRs lose context: A pull request shows what changed, but not why or how decisions were made. The AI prompts, design discussions, and iterative refinements that produced the code are invisible.
- PRs are hard to review: AI-generated PRs tend to be large, touching many files, making thorough review impractical.
- Issues preserve context: A well-written issue captures the problem, expected behavior, examples, and constraints—everything both humans and AI agents need to produce a good solution.
The more context you provide, the better the result. Include:
- Problem description: What's wrong, or what's missing?
- Expected behavior: What should happen?
- Actual behavior: What happens instead? (for bugs)
- Example output: Paste terminal output, error messages, stack traces
- Reproduction steps: Commands to reproduce the issue
- System info: Output of
uname -a, Rust version, etc. - POSIX spec references: Link to relevant POSIX documentation
- Test cases: Input files, expected output files
- Feature rationale: Why is this feature needed? What use cases?
Think of your issue as providing context for an AI coding agent. The richer the context, the better the implementation.
All contributions are welcome via issues:
- Bug reports: Describe the bug with reproduction steps and expected behavior
- Feature requests: Describe the feature and its use cases
- POSIX compliance issues: Reference the spec, show non-compliant behavior
- Documentation improvements: Describe what's unclear or missing
- Test case suggestions: Provide input/output examples for testing
There are several ways to contribute to posixutils-rs:
- coding
- writing tests
- writing documentation
- testing, especially POSIX compliance testing
Build: cargo build --release
Test all (long, more than 15 minutes on some hosts) cargo test --release
Test (one module): cargo test --release -p posixutils-SOMECRATE
- 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 bisectworking. - All code must be copyright clean: either freshly written, or copied from source code with a compatible open source license.
cargo fmtis 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
tempfilethat perform a single, lightweight function. - Correctness, readability, performance, in that order. Code should be readable by unfamiliar developers. Avoid dense, uncommented code.
- Write small functions. Break up large functions. The compiler can inline as needed.
- No
#[allow(dead_code)]markers. Code should compile without warnings. If code is unused, delete it. If code is only used in tests, use#[cfg(test)].
- POSIX compliance
- Full integration test coverage
- Support widely used GNU/BSD extensions
- Race-free userland. (See
ftwinternal 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.
- If a system has an OS-specific feature that must be exposed through a given utility, do so.
- 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?
- Test pattern:
- Pre-generate input data files.
- Run system OS utility on input data files, generating known-good output.
- Store input and output in-tree, as known-good data.
- Write a TestPlan that executes our utility, using static input data, and compares output with static output data (OS reference data).
- Use plib's TestPlan framework for integration tests.
- Integration test harness should ONLY contain
modstatements. Test logic is in $module/tests/$category/mod.rs files. - Only "quick" tests should be run automatically in
cargo test - Longer tests, or tests requiring root access, should be triggered via special environment variables.