subx-cli 1.7.2

AI subtitle processing CLI tool, which automatically matches, renames, and converts subtitle files.
Documentation
# Cross-compilation overrides for `cross` (cross-rs/cross), used by the
# release workflow (.github/workflows/release.yml) to produce the Linux
# aarch64 gnu artifact.
#
# The `pre-build` block runs once per image inside the host (x86_64)
# container before the cross build and is committed to the resulting
# image, so files staged here are visible to the build step.
#
# Two prerequisites must be satisfied before `cargo build` succeeds for
# `aarch64-unknown-linux-gnu`:
#
# 1. `openssl-sys` (a transitive *build* dependency reached via
#    `ort-sys -> ureq -> native-tls -> openssl-sys`) requires OpenSSL
#    development headers on the *build* machine. Install `libssl-dev` and
#    `pkg-config` from apt.
#
# 2. `ort-sys` 2.0.0-rc.10 ships ONNX Runtime as prebuilt static archives
#    downloaded from <https://cdn.pyke.io/>. Inside cross containers the
#    download cache lookup resolves to `/.cache/ort.pyke.io/...` (root
#    has no real `$HOME`); when the rename of the temporary extract
#    directory fails the build script falls back to `OUT_DIR` for the
#    extraction, but `lib_dir` remains pinned to the never-populated
#    cache path and the subsequent `copy_libraries` call panics with
#    `Failed to read contents of /.cache/ort.pyke.io/...`.
#
#    Side-step the bug by pre-fetching the official Pyke tarball into a
#    deterministic, image-local path and pointing `ORT_LIB_LOCATION` at
#    its `lib/` subdirectory via the workflow `env:` block. The hash in
#    the URL matches the entry in `ort-sys`'s `dist.txt` for
#    `none aarch64-unknown-linux-gnu`.
[target.aarch64-unknown-linux-gnu]
pre-build = [
    "apt-get update && apt-get install --assume-yes --no-install-recommends pkg-config libssl-dev curl ca-certificates",
    "mkdir -p /opt/onnxruntime",
    "curl --fail --silent --show-error --location --retry 5 --retry-all-errors --retry-delay 2 https://cdn.pyke.io/0/pyke:ort-rs/ms@1.22.0/aarch64-unknown-linux-gnu.tgz -o /tmp/ort.tgz",
    # SHA-256 from `ort-sys`'s `dist.txt` (`none aarch64-unknown-linux-gnu`
    # row in the v2.0.0-rc.10 source tree). Mirrors the integrity check
    # `ort-sys`'s own `verify_file()` would have performed had its
    # download path actually worked inside the cross container.
    "echo '24E4760207136FC50B854BB5012AB81DE6189039CF6D4FD3F5B8D3DB7E929F1E  /tmp/ort.tgz' | tr 'A-F' 'a-f' | sha256sum -c -",
    "tar -xzf /tmp/ort.tgz -C /opt/onnxruntime --strip-components=1",
    "rm /tmp/ort.tgz",
]

# `ORT_LIB_LOCATION` is read by `ort-sys`'s build script. Listing it in
# `passthrough` makes `cross` forward the value from the host environment
# (set in `.github/workflows/release.yml`) into the build container.
[target.aarch64-unknown-linux-gnu.env]
passthrough = ["ORT_LIB_LOCATION"]