oci-zero 0.1.0

A no-std, allocation-free streaming core for OCI registries
Documentation
name: CI

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  quality:
    name: Stable Rust
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
          targets: wasm32-unknown-unknown
      - run: cargo fmt --all --check
      - run: cargo clippy --workspace --exclude oci-zero-no-std-extract --all-targets --all-features -- -D warnings
      - run: cargo clippy --release -p oci-zero-no-std-extract -- -D warnings
      - run: cargo test --workspace --exclude oci-zero-no-std-extract --all-features
      - name: WebAssembly and Chrome extension checks
        run: |
          cargo check -p oci-zero-web --target wasm32-unknown-unknown
          node --check web/app.js
          node --check web/background.js
          node --check web/playwright.config.mjs
          node --check web/scan-worker.js
          node --check web/tests/browser.spec.mjs
          node --check web/tests/server.mjs
          python3 -m json.tool web/manifest.json > /dev/null
      - name: Public OCI artifact metadata smoke tests
        run: cargo test --release --test metadata_smoke inspects_public_registry_fixtures -- --ignored --nocapture
      - name: no_std MbedTLS streamed extraction smoke test
        run: |
          cargo build --release -p oci-zero-no-std-extract
          target/release/oci-zero-no-std-extract \
            'https://install.datadoghq.com/v2/agent-package/blobs/sha256:bc219703080f03ad836d51bf7f72cc3ced34f5ba440a49f450d6a5dea98ceff4' \
            application_monitoring.yaml.example > /dev/null
      - name: Official zstd decodeCorpus conformance
        run: |
          curl -fsSLo /tmp/zstd-1.5.7.tar.gz https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz
          echo "eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3  /tmp/zstd-1.5.7.tar.gz" | sha256sum --check
          tar -xzf /tmp/zstd-1.5.7.tar.gz -C /tmp
          make -C /tmp/zstd-1.5.7/tests decodecorpus
          DECODECORPUS=/tmp/zstd-1.5.7/tests/decodecorpus cargo test -p zstd-zero --test conformance decodes_official_decodecorpus_frames -- --ignored
      - run: cargo doc --workspace --exclude oci-zero-no-std-extract --no-deps --all-features
        env:
          RUSTDOCFLAGS: -D warnings
      - run: cargo package -p gzip-zero
      - run: cargo package -p zstd-zero

  msrv:
    name: Rust 1.75 / no_std
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.75.0
        with:
          targets: thumbv7em-none-eabi
      - run: cargo check -p oci-zero -p gzip-zero -p zstd-zero --lib --no-default-features --target thumbv7em-none-eabi
      - run: cargo check -p oci-zero --lib --no-default-features --features gzip,zstd --target thumbv7em-none-eabi