Gunnar

nordisk/heimdall

CONTRIBUTING.md

Contributing to Heimdall

Thank you for your interest in Heimdall. This page says how to get the code, how to report a bug, and how to propose a change.

Heimdall is a defensive sandbox. Its tests exercise its own containment and nothing outside it; a contribution follows the same rule.

Get the code

Anyone can clone the repository anonymously over SSH. Any SSH key works, and it does not have to be registered:

git clone ssh://anonymous@git.gunnar.rs:2222/nordisk/heimdall.git
cd heimdall
cargo build --release

The main branch is main. Releases are annotated tags (v0.1.0); until the crates are on crates.io, consumers depend on a tag (see docs/API.md).

Report a bug or ask for a feature

Issues live on gunnar.rs, in the repository nordisk/heimdall. You need an account on https://www.gunnar.rs to file an issue: sign up there with a passkey, then open the issue in the console. With the Gunnar CLI, gunnar forge issue open --repo nordisk/heimdall --title … --body … files a signed issue.

If you cannot sign up, write to gunnar@gunnar.rs.

A good bug report gives:

Do not report a vulnerability as an issue. Follow SECURITY.md instead.

Propose a change

  1. Start from a fresh main, on a branch of your own.
  2. Make the change in small commits. Each commit message says what changed and why.
  3. Push the branch to a repository of your own on gunnar.rs and open a pull request against main in the console. Contributions come only as pull requests on git.gunnar.rs; patches by e-mail are not taken.
  4. A maintainer reviews the change. It is merged when the review and the checks below are green.

Before your first change is merged, you accept the Contributor License Agreement in CLA.md: your first pull request adds one line to CLA-SIGNATURES.md (see below).

Test first: RED, then GREEN

Every change comes with a test. A bug fix starts with a failing test. Commit the failing test first (its message starts with RED), then the change that makes it pass (GREEN). The reviewer runs the test at both commits. Every test name says what it proves. A new parser gets a property test and a cargo-fuzz target under fuzz/.

Coding rules

Licence of contributions

Heimdall is dual licensed: under the GNU Affero General Public License v3.0 only (AGPL-3.0-only), and under a commercial licence (see COMMERCIAL-LICENSING.md). It is owned jointly by Ignalina ApS and Vetra Automation AB.

Because of the dual licence, every outside contribution needs the Contributor License Agreement (CLA) in CLA.md, version 1.1. It grants Ignalina ApS and Vetra Automation AB a licence to your contribution, including the right to license it under the commercial licence as well as under the AGPL, and a licence to any patent of yours that the contribution necessarily uses. You confirm that the contribution is yours to give. You keep the copyright in your contribution.

To accept the CLA, add one line to CLA-SIGNATURES.md in your first pull request, in the form that file shows. This line is the only way to accept the CLA. You accept once; it covers all your contributions. Questions about the CLA: gunnar@gunnar.rs.

Conduct

Be kind and stay on the subject. Criticise code, not people.