coapum 0.2.0

A modern, ergonomic CoAP (Constrained Application Protocol) library for Rust with support for DTLS, observers, and asynchronous handlers
Documentation
name: Cross-Platform

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test-platforms:
    name: Test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
        rust: [stable]
        
    steps:
    - name: Checkout sources
      uses: actions/checkout@v5
      
    - name: Install Rust toolchain
      uses: dtolnay/rust-toolchain@stable
      with:
        toolchain: ${{ matrix.rust }}
        
    - name: Cache cargo registry (Unix)
      if: runner.os != 'Windows'
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-${{ matrix.rust }}-
          
    - name: Cache cargo registry (Windows)
      if: runner.os == 'Windows'
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-${{ matrix.rust }}-
          
    - name: Build
      run: cargo build --verbose
      
    - name: Run tests
      run: cargo test --verbose
      
    - name: Build examples
      run: cargo build --examples --verbose

  build-targets:
    name: Build for ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target:
          - x86_64-unknown-linux-gnu
          - x86_64-unknown-linux-musl
          - aarch64-unknown-linux-gnu
          - x86_64-pc-windows-gnu
          - x86_64-unknown-freebsd
          
    steps:
    - name: Checkout sources
      uses: actions/checkout@v5
      
    - name: Install Rust toolchain
      uses: dtolnay/rust-toolchain@stable
      with:
        targets: ${{ matrix.target }}
        
    - name: Install cross
      run: cargo install cross --git https://github.com/cross-rs/cross
      
    - name: Build for target
      run: cross build --target ${{ matrix.target }} --verbose

  build-apple-targets:
    name: Build for Apple ${{ matrix.target }}
    runs-on: macos-latest
    strategy:
      matrix:
        target:
          - x86_64-apple-darwin
          - aarch64-apple-darwin
          
    steps:
    - name: Checkout sources
      uses: actions/checkout@v5
      
    - name: Install Rust toolchain
      uses: dtolnay/rust-toolchain@stable
      with:
        targets: ${{ matrix.target }}
        
    - name: Build for target
      run: cargo build --target ${{ matrix.target }} --verbose