Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Development

Prerequisites

Setting up the development environment

Clone the repository:

git clone https://github.com/harehare/mq.git
cd mq

Install development dependencies:

# Using cargo
cargo install just wasm-pack

Or if you prefer using asdf:

# Using asdf
asdf install

Or if you prefer using Nix (see Using Nix below for details):

direnv allow  # or: nix develop

Using Nix

If you have Nix with flakes enabled, the repository includes a flake.nix that provides a fully reproducible development environment with Rust (matching rust-toolchain.toml), just, wasm-pack, rust-analyzer, and all other required tools.

The repository also includes a .envrc file, so if you have direnv installed, run the following once and the environment will be activated automatically whenever you enter the directory:

direnv allow

If you prefer not to use direnv, you can enter the shell manually:

nix develop

Common development tasks

Here are some useful commands to help you during development:

# Run the CLI with the provided arguments
just run '.code'

# Run formatting, linting and all tests
just test-all

# Run formatter and linter
just lint

# Build the project in release mode
just build

# Update documentation
just docs

Check the just --list for more available commands and build options.