interlink-mcp 0.4.1

Cryptographically-authenticated, cross-machine agent-to-agent chat for Claude Code, over MCP channels
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --all --check
      - run: cargo clippy --all-targets --all-features
      - run: cargo test --all-features

  # The portability guarantee is testable, so it is tested. A single C
  # dependency (`ring` was the last one) reintroduces a C toolchain for every
  # cross-compile and breaks static linking.
  no-c-dependencies:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: No C-compiling build dependencies
        run: |
          if cargo tree --all-features -e build | grep -E '\b(cc|cmake|bindgen|nasm) v'; then
            echo "::error::a C-compiling build dependency was introduced"; exit 1
          fi
      - name: No C crypto/TLS backends
        run: |
          if cargo tree --all-features | grep -E '\b(ring|aws-lc-sys|openssl-sys) v'; then
            echo "::error::a C crypto backend was introduced"; exit 1
          fi

  # Feature-gated code only compiles under the right cfg; without this a typo in
  # a #[cfg(feature = "...")] passes locally and breaks for a user.
  features:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@cargo-hack
      - run: cargo hack --feature-powerset --no-dev-deps check

  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          # Each musl target builds on its NATIVE-arch runner, so no cross linker
          # or C toolchain is needed — just `rustup target add`. That is the whole
          # portability claim, exercised directly.
          - { os: ubuntu-latest, target: x86_64-unknown-linux-musl, static: true }
          - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl, static: true }
          # static CRT, native
          - { os: windows-latest, target: x86_64-pc-windows-msvc, static: false }
          # macOS cannot statically link libSystem; "no third-party dylibs" is
          # the strongest guarantee available, and pure Rust gives it.
          - { os: macos-latest, target: aarch64-apple-darwin, static: false }
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
      - name: Build
        shell: bash
        run: |
          if [ "${{ matrix.target }}" = "x86_64-pc-windows-msvc" ]; then
            export RUSTFLAGS="$RUSTFLAGS -C target-feature=+crt-static"
          fi
          cargo build --release --all-features --target ${{ matrix.target }}
      - name: Assert static (Linux musl)
        if: matrix.static
        # Modern Rust musl builds are static-PIE, which `file` reports as
        # "static-pie linked"; older ones say "statically linked". Match either
        # (both contain "static"); a dynamic binary says "dynamically linked".
        run: file target/${{ matrix.target }}/release/interlink-bus | grep -qi static