bosk 0.1.0

Pure-Rust LightGBM inference: parses the text model format directly — no FFI, zero deps. Optional ONNX Runtime and CatBoost backends behind the same small Model trait.
Documentation
name: CI

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

# A new run supersedes the in-flight one for the same PR/branch; runs on
# main are never cancelled.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  # The flagship zero-dependency path: fast, no native toolchains needed.
  pure:
    name: pure-Rust LightGBM path
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo clippy --locked --no-default-features --all-targets -- -D warnings
      - run: cargo test --locked --no-default-features
      - run: RUSTDOCFLAGS="-D rustdoc::broken_intra_doc_links" cargo doc --locked --no-default-features --no-deps

  # Full build with the native onnx/catboost backends. ort downloads a
  # prebuilt ONNX Runtime and catboost-rust a prebuilt libcatboostmodel —
  # both need network access at build time.
  all-features:
    name: onnx + catboost backends
    runs-on: ubuntu-latest
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --locked --all-features --all-targets -- -D warnings
      - run: cargo test --locked --all-features
      - run: RUSTDOCFLAGS="-D rustdoc::broken_intra_doc_links" cargo doc --locked --all-features --no-deps

  # Minimum supported Rust version (pure path only; the native backends
  # track their own MSRVs).
  msrv:
    name: MSRV
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4
      # The @ref selects the toolchain version, not a version of the action.
      - uses: dtolnay/rust-toolchain@1.65
      # cargo 1.65 cannot read the committed v4 lock file, and resolving the
      # manifest afresh would clone the multi-GB crates.io git index — the
      # sparse protocol needs 1.68+ (measured: >30 min). The pure path
      # compiles with zero dependencies, so swapping in a dependency-free
      # manifest checks exactly the code `--no-default-features` builds,
      # with no registry access at all.
      - run: |
          rm Cargo.lock
          printf '%s\n' \
            '[package]' \
            'name = "bosk"' \
            'version = "0.0.0"' \
            'edition = "2021"' \
            'rust-version = "1.65"' \
            'autobenches = false' \
            '' \
            '[lib]' \
            'path = "src/lib.rs"' \
            > Cargo.toml
          cargo test