DEPENDENCIES - every crate in the build, and why it is there

Policy (kissback roadmap, approved 10 October 2026): system C libraries link
dynamically, as in the C build, because faultlib.so injects faults by
interposing glibc and the libraries' own symbols; nothing may reach the kernel
around glibc on a path a fault harness tests; Cargo.lock is committed; the
minimum Rust is what Gentoo ships (1.98); no clap, anyhow or log of our own.

`cargo tree -e normal,build` lists 27 crates besides kisscore, kissback and
kissmount: 6 chosen directly and 21 pulled in by them. Checked 12 October
2026, after kissmount's own FUSE layer took the place of fuser and the 28
crates it brought.

Advisories: Cargo.lock checked against the RustSec advisory database on 14
November 2026. libz-sys went 1.1.29 -> 1.1.33 (RUSTSEC-2026-0418: with cc
1.6.0 or later its build script printed the whole build environment into
target/*/build/libz-sys-*/output); zstd 0.14.2 -> 0.14.4, zstd-safe 8.1.0 ->
8.3.0 and zstd-sys 2.1.1 -> 2.1.3 for their October advisories, none of which
reaches a function kissback calls. Checked again for 0.20.10 on 3 December
2026 (the database as of 3 December): no advisory reaches a locked
version. Check again before each release.

DIRECT, chosen
  libc 0.2          glibc's functions, called as glibc's functions. Every read,
                    write, open, readdir and stat on a path a harness tests
                    goes through it - so faultlib's hooks see them.
  liblzma 0.4       system liblzma, for .xz stored files. Chosen over xz2 by
                    the rule "the actively maintained one": liblzma 0.4.8 was
                    released 2026-08-09, xz2's last release is 0.1.7 of
                    2022-06-06. Default features off: the default pulls in
                    bindgen and a clang build dependency for nothing.
                    liblzma-sys asks pkg-config for liblzma 5.8.0 or LATER
                    (C needs 5.2.0) and, finding none, compiles the xz copy
                    bundled in it and links that statically, without a word.
                    Both testbeds have 5.8.4. README says how to tell.
  zstd 0.14         system libzstd (feature pkg-config) for .zst stored files.
                    Default features off: they compile a bundled libzstd.
                    kissback depends on it directly too since slice 5 (the
                    compressing writer), with the same features. Its worker
                    threads (ZSTD_c_nbWorkers, as C sets them) need no
                    "zstdmt" feature: that only builds threads into a
                    BUNDLED libzstd, and the system one has them.
  openssl 0.10      system libcrypto, for SHA-256 (--verify). Chosen over the
                    pure-Rust sha2 by measurement, under the approved rule
                    "within about 10%, sha2": on aarch64 (arm64ai, 2 GiB in
                    64 KiB blocks, three rounds) openssl 1258-1289 MB/s, sha2
                    1118-1126 MB/s - sha2 12% slower, outside the margin.
                    x86_64 (amd64ai, no SHA instructions): openssl 488-492,
                    sha2 236-238 - half the speed.
  libssh2-sys 0.3   system libssh2, for the sftp transport. The approved list
                    named ssh2, the safe wrapper; this is the FFI layer ssh2
                    is built on - confirmed by the user on 11 October, in
                    place of ssh2. Used directly because what kissmount SAYS
                    about an sftp failure depends on detail the wrapper folds
                    away - a readdir's negative count against its end, the
                    session's last errno against the sftp status, whether a
                    server reported a size. One crate fewer than ssh2, which
                    adds parking_lot on top. Linked against the SYSTEM
                    libssh2: .cargo/config.toml sets
                    LIBSSH2_SYS_USE_PKG_CONFIG, without which libssh2-sys
                    compiles and links a bundled copy.
  curl-sys 0.4      system libcurl, for the S3 transport (phase 3, decided
                    12 October: libcurl and a Signature V4 of our own on
                    openssl's HMAC, not object_store or rust-s3, which need
                    tokio and some 100 crates, nor ureq, a second TLS stack).
                    The FFI layer, not the curl crate on top of it
                    (confirmed by the user 12 October, as libssh2-sys was
                    for ssh2): that
                    crate calls curl_global_init() from an ELF constructor
                    before main, in every run of every program linking it,
                    S3 or not - opening OpenSSL's configuration among other
                    things - which would shift the call counts the fault
                    harnesses inject by. kisscore's s3.rs initialises
                    libcurl on the first S3 connection. Default features
                    off. The one new crate: libz-sys and the build helpers
                    were here already. Like liblzma-sys, where pkg-config
                    finds no libcurl it compiles the copy bundled in it and
                    links that statically, with a line in the build log
                    and nothing else.
                    It names windows-sys for Windows builds: never compiled
                    here, but cargo vendor carries it into the release
                    tarball.

PULLED IN by liblzma, zstd, openssl
  liblzma-sys       the FFI declarations for liblzma. ALSO a direct dependency
                    of kissback since phase 2, slice 5, with its "parallel"
                    feature: backup compresses with lzma_stream_encoder_mt(),
                    as the C build does, and the liblzma crate only offers
                    that behind its own "parallel" feature, which adds
                    num_cpus. No new crate - the same one, one more feature.
                    Both builds link /usr/lib64/liblzma.so.5, so the encoder
                    producing the stored .xz files is the same code.
  zstd-safe         safe wrappers zstd builds on
  zstd-sys          the FFI declarations for libzstd
  openssl-sys       the FFI declarations for libcrypto
  libz-sys          libssh2-sys's and curl-sys's: system zlib, through
                    pkg-config
  openssl-macros    a proc macro of openssl's
  foreign-types, foreign-types-shared
                    openssl's handle types
  bitflags          openssl's flag sets
  cfg-if            conditional compilation (openssl)
  proc-macro2, quote, syn, unicode-ident
                    proc-macro machinery for openssl-macros
  pkg-config        build time: finds the system libraries
  cc, jobserver, shlex, find-msvc-tools, vcpkg
                    build time, the -sys crates' build scripts. Nothing is
                    compiled by them in this build: every library is found
                    through pkg-config. vcpkg and find-msvc-tools are Windows
                    probes that do nothing here.

NOT A CRATE: the FUSE protocol
  kissmount serves /dev/fuse itself (kissmount/src/fuse.rs, phase 4): the
  operations a read-only filesystem needs - init, lookup, forget, getattr,
  readlink, open, read, release, opendir, readdir, releasedir, statfs,
  interrupt, destroy - mount(2) as root and fusermount3 otherwise, a pool of
  threads. In place of fuser 0.18 (decided 11 October to keep "for now"),
  which brought 28 crates - nix, parking_lot, log, num_enum, zerocopy, three
  proc-macro stacks, toml_edit for a derive's crate name - and forced two of
  DIVERGENCES' items, both gone with it. Its system calls go through glibc,
  as the rest do.
