mockrs 1.2.6

A crate that provides a X8664Mocker to mock function calls and intercept on x86_64 architecture.
Documentation
---
name: Rust

"on":
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: cargo build --verbose
      - name: Run tests
        run: cargo test --verbose

  test-aarch64:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Enable ARM64 cross toolchain and QEMU user emulation
        run: |
          sudo apt-get update
          # qemu + binfmt for transparent execution and cross toolchain
          # install cross sysroot and build tools without enabling multiarch
          sudo apt-get install -y \
            qemu-user-static binfmt-support \
            gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
            pkg-config make cmake
          sudo update-binfmts --enable qemu-aarch64

      - name: Install Rust toolchain and aarch64 target
        run: |
          rustup toolchain install stable
          rustup target add aarch64-unknown-linux-gnu

      - name: Build (aarch64)
        run: |
          export AARCH64_LD=aarch64-linux-gnu-gcc
          export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$AARCH64_LD"
          export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
          cargo build --target aarch64-unknown-linux-gnu --verbose

      - name: Run tests (aarch64 via qemu-user-static)
        run: |
          export AARCH64_LD=aarch64-linux-gnu-gcc
          export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$AARCH64_LD"
          export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
          export RUST_BACKTRACE=1
          cargo test --target aarch64-unknown-linux-gnu --verbose