[package]
name = "timberfs"
version = "0.6.0"
edition = "2021"
description = "Experimental append-only, transparently compressed, write-time-indexed filesystem for log files"
license = "MIT OR Apache-2.0"
repository = "https://github.com/torstei/timberfs"

[[bin]]
name = "timberfs"
path = "src/main.rs"

[dependencies]
anyhow = "1"
chrono = "0.4"
clap = { version = "4", features = ["derive"] }
# default-features off: skip the libfuse C linkage (pure-Rust mount via
# fusermount3). abi-7-19 enables the notify API (Notifier::inval_inode),
# used to invalidate kernel caches after rotation; ABI 7.19 is ancient
# (kernel 3.x) so this doesn't restrict where timberfs runs.
fuser = { version = "0.15", default-features = false, features = ["abi-7-19"] }
libc = "0.2"
regex = "1"
tar = "0.4"
zstd = "0.13"

[profile.release]
lto = true

# Debian packaging (build with `cargo deb`, needs `cargo install cargo-deb`)
[package.metadata.deb]
maintainer = "Torstein Tauno Svendsen <torstei@gmail.com>"
copyright = "2026, Torstein Tauno Svendsen"
section = "admin"
priority = "optional"
# fusermount3 (package fuse3) is exec'ed at mount time; $auto picks up the
# shared-library deps of the binary itself.
depends = ["$auto", "fuse3"]
extended-description = """\
Experimental FUSE filesystem purpose-built for log files. Files in the \
mount are append-only and stored as chunked zstd frames with a per-chunk \
write-time index, so "give me what was written between 13:42 and 13:43" \
is a binary search plus a few frame decompressions regardless of file \
size. Includes time-based rotation and retention that relocate compressed \
frames verbatim, and the data files remain recoverable with stock zstd. \
Ships a systemd template unit (timberfs@.service) for mounting instances \
at boot."""
assets = [
    ["target/release/timberfs", "usr/bin/", "755"],
    ["packaging/timberfs.1", "usr/share/man/man1/", "644"],
    ["README.md", "usr/share/doc/timberfs/README.md", "644"],
    ["packaging/timberfs@.service", "lib/systemd/system/timberfs@.service", "644"],
    ["packaging/timberfs.conf.example", "usr/share/doc/timberfs/examples/timberfs.conf.example", "644"],
    ["packaging/etc-README", "etc/timberfs/README", "644"],
]
