Getting started
Contributions to Hoot are welcome! Whether you’re fixing bugs, adding features, or improving documentation, your help is appreciated.Setting up your development environment
Code style and standards
Rust code formatting
Hoot uses the standard Rust formatting tools. Before submitting a pull request:Code quality checks
The CI pipeline runs the following checks on all pull requests:- Build verification - Code must compile on Linux, Windows, and macOS
- Tests - All tests must pass with
cargo test --verbose - Clippy - No clippy warnings allowed (
cargo clippy --all-targets -- --deny warnings) - Formatting - Code must be formatted with
cargo fmt - Documentation - Rustdoc must build without warnings
Testing
Running tests
Writing tests
When adding new functionality:- Add unit tests in the same file as your implementation
- Add integration tests in the
tests/directory if appropriate - Test both success and error cases
- Ensure your tests are deterministic and don’t rely on external services
Architecture guidelines
Core components
Before making changes, familiarize yourself with Hoot’s architecture:- Main application (
main.rs) - Application state and event loop - Relay system (
relay/) - WebSocket connections to Nostr relays - Database (
db.rs) - SQLite with SQLCipher encryption - Key storage (
keystorage/) - Platform-specific secure storage - Mail events (
mail_event.rs) - Custom kind 2024 events and NIP-59 gift wrapping - UI system (
ui/) - Modular egui-based interface
CLAUDE.md in the source repository for detailed architecture documentation.
Threading model
Be aware of Hoot’s threading model when making changes:- Main UI thread runs immediate-mode egui
- WebSocket connections use
ewebsockwith wake-up callbacks - Profile image fetching uses
std::thread::spawnwithreqwest::blocking - Gift wrap operations use
pollsterto block on async Nostr operations - Database operations are synchronous (rusqlite)
Pull request process
Write a clear PR description
Your pull request should include:
- A clear description of what the PR does
- Why the change is needed
- Any breaking changes or migration notes
- Screenshots for UI changes
- References to related issues
Reporting issues
When reporting bugs or requesting features:- Search existing issues to avoid duplicates
- Provide context - What were you trying to do?
- Include steps to reproduce for bugs
- Share your environment - OS, Rust version, Hoot version
- Add logs if available - Hoot logs are written to stdout
Code of conduct
Be respectful and professional in all interactions. We’re building software together and everyone’s contribution matters.Getting help
If you need help with your contribution:- Read the
CLAUDE.mdfile in the source repository for architecture details - Check the existing codebase for similar patterns
- Ask questions in your pull request
- Reach out to the maintainer: Jack Chakany at [email protected]