Contributing to gd
Thanks for helping. gd aims to stay small, fast and correct, so contributions are held to a few concrete rules.
Setup
# Rust stable (see rust-version in Cargo.toml) and protoc
brew install protobuf # or: apt-get install protobuf-compiler
cargo test --workspace # unit, property, contract and end-to-end tests
Optional, for the database adapters:
docker run -d -p 55432:5432 -e POSTGRES_PASSWORD=gd -e POSTGRES_DB=gd postgres:17-alpine
GD_TEST_POSTGRES_URL=postgres://postgres:gd@localhost:55432/gd \
cargo test -p grovedock-adapters --test contract
Where code goes
- Domain logic →
crates/core. No I/O, no transport. - Infrastructure → a new adapter in
crates/adaptersimplementing a port. It must passtests/contract.rs; add your adapter to that file. - A server feature → the Grovedock server is not open source; propose the protocol change (below) in an issue, and any server can implement it.
- A client feature →
crates/gd/src/features/<name>.rs, returning data; printing belongs inmain.rs. - Protocol changes →
crates/proto/proto/(gd.proto,gd_platform.proto,gd_issues.proto,gd_releases.proto). v1 is stable: add fields and RPCs, never renumber or change the meaning of existing ones.
Before opening a PR
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
- Every behaviour change comes with a test that fails without it.
- Performance-sensitive changes include before/after numbers (
cargo bench -p grovedock-coreorbench/run.sh, which runs gd against a Grovedock server). - Keep commits focused; use Conventional Commits
(
feat:,fix:,perf:,docs:…).
Tests for new functionality
Every new feature and every behaviour change lands with automated tests in the same change
request: unit tests next to the code, and an end-to-end test in crates/*/tests/ for anything
a user can run. A bug fix includes a test that fails without the fix. Changes are not merged
without them. See How Grovedock is tested.
Questions and discussion
Ask questions, discuss ideas and track bugs and feature requests as issues. They are public, searchable and open to anyone with a free Grovedock account. Issues, change requests and code comments are in English.
Reporting bugs
Open an issue with the gd --version and grovedockd --version output, the command, what
you expected and what happened. Security issues: see SECURITY.md.