shared-files 0.4.0

Single writer, multiple reader in-process file sharing
Documentation
# shared-files task runner
# https://taskfile.dev
version: '3'

tasks:
  default:
    desc: List available tasks
    cmds:
      - task --list --sort=none
    silent: true

  fmt:
    desc: Format all Rust sources
    aliases: [format]
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo fmt --all

  fmt:check:
    desc: Check formatting without modifying files
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo fmt --all -- --check

  lint:
    desc: Run clippy (all features, warnings as errors)
    aliases: [lint:check]
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo clippy --all-targets --all-features -- -D warnings

  lint:fix:
    desc: Auto-fix clippy lints, then format
    aliases: [fix]
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged
      - task: fmt

  check:
    desc: Type-check without producing binaries
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo check --all-targets --all-features
      - task: fmt:check

  build:
    desc: Build the crate (debug, all features)
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo build --all-targets --all-features

  build:release:
    desc: Build the crate (release, all features)
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo build --release --all-features

  test:
    desc: Run the test suite (all features, via nextest)
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
      - sh: command -v cargo-nextest
        msg: "cargo-nextest not found — cargo install cargo-nextest"
    cmds:
      # nextest runs test binaries in parallel with live progress, so a slow
      # test (e.g. nodelay) no longer looks like a hang. It does not run
      # doctests; use `task test:doc` (included in `task ci`) for those.
      - cargo nextest run --all-features {{.CLI_ARGS}}

  test:doc:
    desc: Run doctests (all features)
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo test --doc --all-features

  doc:
    desc: Build rustdoc (all features, no deps)
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo doc --all-features --no-deps

  doc:open:
    desc: Build and open rustdoc in the browser
    preconditions:
      - sh: command -v cargo
        msg: "cargo not found — install Rust from https://rustup.rs/"
    cmds:
      - cargo doc --all-features --no-deps --open

  clean:
    desc: Remove build artifacts
    status:
      - test ! -d target
    cmds:
      - cargo clean

  ci:
    desc: Run checks expected in CI (fmt check, lint, test, doctests)
    cmds:
      - task: fmt:check
      - task: lint
      - task: test
      - task: test:doc