# Contributing

Thank you for helping. Please open an issue before starting anything large.

## Before you open a pull request

```sh
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
```

If you touch behaviour, also run `conformance/run.py` (see the README).

## Rules of the code

- `heart-core` stays `no_std` and free of I/O. Anything touching the outside world is an `Effect`.
- `heart-core` and `heartd` use `#![forbid(unsafe_code)]`. Only the WASM boundary may use `unsafe`.
- Everything is bounded. A new queue, map or buffer needs a limit.
- Fail closed. If something cannot be checked, refuse it.
- New behaviour needs a test. A requirement from the standard should name its section.

## Changing the spec data

`spec/1.0` is a copy of the published specification, so do not edit it by hand. Change the specification, then run `scripts/sync-spec.sh`.

## Commits

Use [Conventional Commits](https://www.conventionalcommits.org/), such as `fix(valve): drop unclassified fields`. Add a line to `CHANGELOG.md` for anything users will notice.

## Conduct

This project follows the [Code of Conduct](CODE_OF_CONDUCT.md).
