Guidelines for AI agents working on the appimageupdate project.
appimageupdate is a Rust implementation of AppImageUpdate - a tool for updating AppImages in a decentral way using delta updates. This project is a rewrite of the upstream C++ implementation at https://github.com/AppImage/AppImageUpdate.
Key features:
- Decentralized updates (no central repository)
- Delta updates for efficient downloads
- GPG signature validation
- Works with update information embedded in AppImages
- Commit in small chunks - One logical change per commit
- Never commit broken state - All code must compile and pass tests
- Format before commit - Run
cargo fmtbefore every commit - Fix clippy issues - Run
cargo clippyand address all warnings before committing
Follow conventional commit format with imperative mood:
type: message
Types:
feat:- New featurefix:- Bug fixrefactor:- Code refactoringtest:- Adding or updating testsdocs:- Documentation changeschore:- Maintenance tasksperf:- Performance improvementsstyle:- Code style changes (formatting, etc.)ci:- CI/CD configuration changes
Examples:
feat: add AppImage update information parserfix: handle HTTP range requests correctlyrefactor: extract delta update logic into separate module
cargo fmtAlways run before committing.
cargo clippy --all-targets --all-features -- -D warningsAll clippy warnings must be addressed before committing.
cargo test --all-featuresAll tests must pass before committing.
Before every commit, ensure:
-
cargo fmt- Code is formatted -
cargo clippy- No warnings -
cargo test- All tests pass -
cargo build- Clean build with no errors
appimageupdate/
├── src/
│ ├── lib.rs # Library entry point
│ ├── bin/ # Binary (CLI) entry point
│ └── ... # Library modules
├── tests/ # Integration tests
└── examples/ # Usage examples
- Library-first approach: core functionality in
src/lib.rsand modules - CLI tool uses the library (no duplicated logic)
- Public API should be well-documented with rustdoc
- Use
thiserrorfor error types - Prefer synchronous APIs for simplicity (no async runtime needed unless required)
Keep dependencies minimal. Prefer lightweight libraries:
ureq- HTTP client (synchronous, lightweight)thiserror- Error handlingclap- CLI argument parsing
Avoid adding libraries for things that can be implemented in a few dozen lines.
The upstream C++ implementation is at: https://github.com/AppImage/AppImageUpdate
When implementing features, refer to the upstream for:
- Update information format specification
- Delta update algorithm (zsync-based)
- GPG signature validation behavior
- CLI interface design
- Target MSRV (Minimum Supported Rust Version): Latest stable
- Use
#[deny(missing_docs)]for public APIs - Prefer
Result<T, E>overOption<T>for fallible operations with context - AppImages use ISO 9660 format with ELF wrapper - may need specialized parsing