Files
guara/CONTRIBUTING.md
T
Lucas RayanandClaude Sonnet 5 6328220c60
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s
chore(i18n): finish translating code comments and scripts to English
Completes the English-only standardization for code, comments, scripts
and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en,
untouched). Covers the remaining crates/, apps/gui/ui/ and
apps/gui/src-tauri/ comments, .gitea/ workflow and template comments,
.githooks/ hooks, and the scripts/ source comments for the files
already renamed in a prior commit (check.sh, generate-logo.py,
install-hooks.sh).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
2026-10-30 20:43:02 -03:00

3.9 KiB

Contributing to Guará

English · Português

Thanks for helping! Golden rules:

  1. Never write to the source. Any code that opens a device must use source::open_path (read-only). PRs that write to the source disk are rejected.
  2. Test with real data. New detectors/readers need a test that recovers a known file bit for bit (see crates/guara-core/tests/ and scripts/make-fixtures.sh).
  3. Be honest about confidence. If the content cannot be validated, confidence is at most medium.
  4. 100% English codebase and comments. All source code, comments, scripts, CI workflows, and commit messages must be written in English, while the GUI/CLI remains bilingual (PT-BR and EN via i18n-en.js).

Workflow

scripts/install-hooks.sh  # once: enables commit-msg and pre-push Git hooks
scripts/check.sh          # fast (seconds): fmt, clippy as in CI, i18n, scripts, workflows, semver
scripts/check.sh --full   # includes cargo test --workspace and cargo audit

The CI takes 5 to 30 minutes on Linux, so run the check before pushing: almost everything that makes the CI fail shows up locally in seconds. Documentation-only changes (*.md, docs/) skip the CI.

On Linux the tests build images with mtools, ntfs-3g, e2fsprogs, exfatprogs, imagemagick, zip and python3. Without these tools the image tests are skipped (set GUARA_REQUIRE_FIXTURES=1 to make them fail).

For the external reference images (BitLocker, FileVault 2, dfvfs, AFF4), run scripts/fetch-testdata.sh; without them those tests are skipped. The BitLocker test takes about 75 s.

The desktop app signs its update packages: tauri.conf.json has createUpdaterArtifacts on, so a local tauri build needs TAURI_SIGNING_PRIVATE_KEY (any key made with tauri signer generate; the release key lives only in the repository secrets). For a quick local bundle, pass --config '{"bundle":{"createUpdaterArtifacts":false}}'.

Releases and Versioning

Versions strictly follow Semantic Versioning 2.0.0 (MAJOR.MINOR.PATCH), synchronized across Cargo.toml, apps/gui/src-tauri/Cargo.toml, and apps/gui/src-tauri/tauri.conf.json (enforced by scripts/check.sh).

Pushing a v* tag makes the Gitea CI create the release (notes come from CHANGELOG.md, so update it first), attach the Linux CLI (x86_64 and aarch64), the desktop app for Linux (x86_64 and aarch64) and Windows, and build the updater's latest.json.

There is no macOS build: it needs Apple's SDK and code signing, which a Linux runner cannot provide.

Where to make changes

A map of the modules is in docs/architecture.md. What is missing and what is welcome is in the ROADMAP.

Adding a file format

Simple detectors live in crates/guara-core/src/signatures.rs; the newer ones in formats.rs. Add the detector to detect, the first byte to might_start, the extension to category_for_ext/matches_ext and a real file to scripts/make-fixtures.sh with a bit-exactness test.

Adding a file system

Create the reader in crates/guara-core/src/fs/, register it in fs/mod.rs and bring a test with a real or reference image. We do not ship a reader without validation: that is why ReFS and Storage Spaces do not exist yet. Small images without personal data are the best gift you can give the project.

Documentation

The main version is in English and every file has a Portuguese translation (*.pt-BR.md, docs/pt-BR/). No em dashes or en dashes. When you change a feature, update both versions (English and Portuguese) of docs/support.md, the CHANGELOG and, if applicable, the ROADMAP.

Commits

Commits must follow Conventional Commits 1.0.0 in English (feat:, fix:, chore:, ci:, docs:, refactor:, test:, perf:, build:), e.g. fix(ntfs): handle sparse data runs correctly. One logical change per PR. Enforced automatically by .githooks/commit-msg.