Setting Up Your Environment

In order to work on and build iamb locally, you will need:

  • stable Rust toolchain with clippy installed
  • nightly Rust toolchain with rustfmt installed

You can install the necessary Rust dependencies using rustup:

rustup toolchain install stable --component clippy
rustup toolchain install nightly --component rustfmt

You will also likely want to use rust-analyzer during your development. Refer to its documentation for help on setting it up in your preferred editor.

Programming in Rust

If you are new to Rust, some helpful resources to learn or refer to are:

You can find more resources on the Rust website.

At some point while working on iamb, you will have to touch one of its dependencies. Some of the libraries whose docs you may need are:

Finding an Issue

You may already have an idea of a feature you want to add or a bug that’s affecting you, but if you’re looking for something to get started learning how to contribute to iamb, you can search for a GitHub issue that interests you, and comment on it when you start working on it!

A couple useful ways to search through the open issues are:

Building, Formatting and Testing

The commands you will want to run the most are:

  • cargo check to run the type checker and borrow checker
  • cargo build to build a debug binary (outputs to target/debug/iamb)
  • cargo test to run the unit tests
  • cargo clippy to run lints and get suggestions for simplifying code
  • cargo +nightly fmt to apply the crate’s standard formatting to your changes

Once you have something you’re happy with, you can run cargo build --release to get a release binary. If you have a machine with plenty of RAM, you can use cargo build --profile release-lto to build a smaller, optimized binary using Link-Time Optimization.

Making a Pull Request

If you are unfamiliar with Git or GitHub, refer to the Git Book or Creating a pull request to get started.

If you want feedback while you’re still working on something, then please open a Draft Pull Request, so that someone can take a look.

Getting Help

There are several different places you can reach out for help:

  • to discuss in a Matrix room
  • File a GitHub issue to discuss your change (or comment on an existing one)
  • Open a Draft Pull Request to show and discuss code