[package]
name = "superline"
version = "0.5.4"
authors = ["alxhill <me@alxhill.com>", "cirho <me@cirho.com>"]
edition = "2021"
description = "Configurable Powerline implementation in pure Rust."
license = "MIT"
repository = "https://github.com/alxhill/superline"
readme = "README.md"

[dependencies]
hostname = "0.3"
git2 = { version = "0.18", optional = true, default-features = false }
# Pure-Rust git backend. `status`/`revision` cover the status walk and the
# ahead/behind commit counting; `max-performance-safe` keeps the speedups while
# avoiding any C toolchain (gix decompresses objects with zlib-rs).
gix = { version = "0.84", optional = true, default-features = false, features = [
    "sha1",
    "status",
    "revision",
    "max-performance-safe",
] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
thiserror = "1.0.61"
clap = { version = "4.5.7", features = ["derive"] }
chrono = "0.4.38"

# Unix-only: the `users` crate wraps libc's passwd/uid APIs, and `libc::access`
# powers the read-only check. Windows uses the env-var / std fallbacks in
# `platform.rs` instead.
[target.'cfg(unix)'.dependencies]
users = "0.11"
libc = "0.2"

# Pick at most one git backend. When several are enabled the precedence is
# `gitoxide` > `libgit` > the `git` CLI fallback (see `src/modules/git.rs`).
# To use gitoxide on its own: `--no-default-features --features gitoxide`.
[features]
default = ["libgit"]
libgit = ["git2"]
gitoxide = ["gix"]

[profile.release]
opt-level = 3
lto = "fat"
debug = false
strip = "debuginfo"
codegen-units = 1
panic = "abort"

[profile.release.build-override]
codegen-units = 1
opt-level = 3
