mirror of
https://github.com/ApfelTeeSaft/ia-get.git
synced 2026-08-26 19:23:36 +00:00
1.6 KiB
1.6 KiB
GitHub Copilot Instructions for ia-get
Project Overview
This is a Rust CLI tool for downloading files from the Internet Archive, built with Nix flakes for reproducible builds.
Development Guidelines
Rust Standards
- Follow standard Rust conventions and idiomatic patterns
- Use
cargo fmtandcargo clippyfor code formatting and linting - Prefer explicit error handling with
Result<T, E>types - Use
anyhoworthiserrorfor error handling consistency
Nix Integration
- This project uses Nix flakes for development environment and packaging
- When suggesting build commands, prefer
nix developfor entering the dev shell - Build with
nix buildrather than direct cargo commands when possible - Maintain compatibility with the supported systems: x86_64-linux, aarch64-darwin, x86_64-darwin, aarch64-linux
Dependencies
- Keep dependencies minimal and well-justified
- Update Cargo.lock when adding new dependencies
- Prefer crates that are well-maintained and have good Nix support
Code Structure
- Follow CLI best practices with clear subcommands and help text
- Use structured logging for better debugging
- Implement proper signal handling for long-running downloads
- Include comprehensive error messages for user-facing operations
Testing
- Write unit tests for core functionality
- Include integration tests for CLI behavior
- Test cross-platform compatibility where relevant
Documentation
- Update README.md for any new features or usage changes
- Include examples in help text and documentation
- Document any Internet Archive API specifics or limitations