Cfait shares one Rust core across TUI, GUI, and Android clients. To maintain consistency, please follow these guidelines.
- Feature Parity: New features should ideally be implemented across all three clients (TUI, GUI, Android). Duplicated logic should by avoided. (Don't Repeat Yourself (DRY))
- Tests: Test your changes on all three clients to ensure nothing breaks.
- Update Documentation: If you add a feature, update both the
README.mdand the in-app help for all clients (common:src/help.rs, TUI:src/tui/view.rs, GUI:src/gui/view/help.rs, Android:android/app/src/main/java/com/trougnouf/cfait/ui/HelpScreen.kt). - Keep it Light: Aim for simplicity to minimize the codebase and maintenance burden and to keep the program fast.
Before submitting, please ensure your changes meet the following criteria:
- Add Unit Tests for any new logic where applicable.
- Pass CI Checks. The CI will fail if these commands don't pass locally:
cargo fmt --all -- --check cargo clippy --all-features --all-targets cargo test --all-features --all-targets - Set
git config core.hooksPath .githooksto automatically format the code before committing. - Use
cargo fmt --allandcargo clippy --all-features --all-targets --fix --allow-dirtyto automatically fix formatting & most linting issues. - Regenerate the Kotlin bindings if you make changes to
mobile.rs:cargo build --lib --features mobilecargo run --features mobile --bin uniffi-bindgen generate --library target/debug/libcfait.so --language kotlin --out-dir ./android/app/src/main/java --config uniffi.toml
Pull requests should be submitted on https://codeberg.org/trougnouf/cfait
- TUI:
cargo run - GUI:
cargo run --features gui --bin cfait-gui - Android: See build instructions in
README.md.
- Testing: Use the current development version of Cfait (e.g.
cfait-giton Arch Linux or the rolling release available on https://codeberg.org/trougnouf/cfait/releases ) and report any bug before the next release. - Documentation: Can always be improved
- Localization: https://translate.codeberg.org/projects/cfait