Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 3.62 KB

CONTRIBUTING.md

File metadata and controls

93 lines (67 loc) · 3.62 KB

Contributing to Lunatic

Thanks for contributing to Lunatic!

Before continuing please read our code of conduct which all contributors are expected to adhere to.

Contributing bug reports

If you have found a bug in Lunatic please check to see if there is an open ticket for this problem on our GitHub issue tracker. If you cannot find an existing ticket for the bug please open a new one.

A bug may be a technical problem such as a compiler crash or an incorrect return value from a library function, or a user experience issue such as unclear or absent documentation. If you are unsure if your problem is a bug please open a ticket and we will work it out together.

Contributing code changes

Code changes to Lunatic are welcomed via the process below.

  1. Find or open a GitHub issue relevant to the change you wish to make and comment saying that you wish to work on this issue. If the change introduces new functionality or behaviour this would be a good time to discuss the details of the change to ensure we are in agreement as to how the new functionality should work.
  2. Please use cargo fmt and cargo clippy to check that code is properly formatted, and linted for potential problems.
  3. Changes, adding and removing host functions require changes to the wat/all_imports.wat file. Every host function lunatic exposes requires an import directive to assert that end developers can import the function.
  4. Open a GitHub pull request with your changes and ensure the tests and build pass on CI.
  5. A Lunatic team member will review the changes and may provide feedback to work on. Depending on the change there may be multiple rounds of feedback.
  6. Once the changes have been approved the code will be rebased into the main branch.

Local development

To build the project run:

cargo build

or for release builds:

cargo build --release

To run the tests:

cargo test

Changelog generation

The changelog is updated using the git-cliff cli, which generates the changelog file from the Git history by utilizing conventional commits.

The changelog template is defined in Cargo.toml under [workspace.metadata.git-cliff.*].

Updating the CHANGELOG.md file can be achieved with the following command:

git cliff --config ./Cargo.toml --latest --prepend ./CHANGELOG.md

The commit types are as follows:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

For more information, see the git-cliff usage documentation.

Useful resources