Thanks for contributing to Lunatic!
Before continuing please read our code of conduct which all contributors are expected to adhere to.
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.
Code changes to Lunatic are welcomed via the process below.
- 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.
- Please use
cargo fmt
andcargo clippy
to check that code is properly formatted, and linted for potential problems. - 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. - Open a GitHub pull request with your changes and ensure the tests and build pass on CI.
- 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.
- Once the changes have been approved the code will be rebased into the
main
branch.
To build the project run:
cargo build
or for release builds:
cargo build --release
To run the tests:
cargo test
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.
- Project Loom on virtual threads
- Erlang documentation - these explain some concepts that Lunatic implements
- Notes on distributed systems - explains some distributed algorithms (possibly useful for working on distributed Lunatic)