diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 64ef82e..d696c68 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -72,3 +72,17 @@ jobs: uses: actions/checkout@v4 - name: Check semver uses: obi1kenobi/cargo-semver-checks-action@v2 + + check-external-types: + name: Validate external types appearing in public API + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Install rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-02-07 + # ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml + - run: cargo install cargo-check-external-types + - run: cargo check-external-types diff --git a/Cargo.toml b/Cargo.toml index 38b7258..b8c6c58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,3 +51,10 @@ hex-literal = "0.4" [badges] travis-ci = { repository = "rusticata/pcap-parser" } + +[package.metadata.cargo_check_external_types] +allowed_external_types = [ + "nom", + "nom::*", + "circular::Buffer", +]