negentropy 0.5.1

Rust implementation of the negentropy set-reconciliation protocol.
Documentation
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install nightly toolchain
        run: rustup install nightly

      - name: Add rustfmt for nightly
        run: rustup component add rustfmt --toolchain nightly

      - name: Check
        run: cargo +nightly fmt --all --check -- --config format_code_in_doc_comments=true

  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - version: stable # STABLE
          - version: 1.51.0 # MSRV
        build-args:
          - ""
          - "--no-default-features"
          - "--target wasm32-unknown-unknown"
    steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: Rust Cache
      uses: Swatinem/rust-cache@v2.7.8

    - name: Set default toolchain
      run: rustup default ${{ matrix.rust.version }}

    - name: Add WASM
      if: ${{ matrix.build-args == '--target wasm32-unknown-unknown' }}
      run: rustup target add wasm32-unknown-unknown

    - name: Set profile
      run: rustup set profile minimal && rustup component add clippy

    - name: Build
      run: cargo build ${{ matrix.build-args }}

    - name: Tests
      if: ${{ matrix.build-args != '--target wasm32-unknown-unknown' }}
      run: cargo test ${{ matrix.build-args }}

    - name: Clippy
      run: cargo clippy ${{ matrix.build-args }} -- -D warnings