exa/Cargo.toml
Benjamin Sago 5ca3548bb1 Inline the library into the binary
This commit removes the library portion of exa. Cargo now only builds a binary.

The original intent was for exa to have its own internal library, and have the binary just call the library. This is usually done for code cleanliness reasons: it separates the code that implements the purpose of the program (the "plumbing") from the code that the user interacts with (the "porcelain"), ensuring a well-defined interface between the two.

However, in exa, this split was in completely the wrong place. Logging was handled in the binary, but option parsing was handled in the library. The library could theoretically print to any Writer ("for testing", it said), but it's far easier to run integration tests by executing the binary than to change the code to handle unit tests, so this abstraction isn't gaining us anything.

I've also had several people ask me if exa should be packaged for Linux distributions as a library, or just a binary. Clearly, this is confusing!

In several of my other Rust projects, I've done this better, with the command-line option parsing and log printing done on the binary side. It also turns out that you don't need to have a [lib] section in the Cargo.toml, so that's gone too.
2020-10-10 01:43:42 +01:00

76 lines
1.5 KiB
TOML

[package]
name = "exa"
version = "0.9.0"
authors = [ "Benjamin Sago <ogham@bsago.me>" ]
build = "build.rs"
edition = "2018"
description = "A modern replacement for ls"
homepage = "https://the.exa.website/"
repository = "https://github.com/ogham/exa"
documentation = "https://github.com/ogham/exa"
readme = "README.md"
categories = ["command-line-utilities"]
keywords = ["ls", "files", "command-line"]
license = "MIT"
exclude = ["/devtools/*", "/Justfile", "/Vagrantfile", "/screenshots.png"]
[[bin]]
name = "exa"
[dependencies]
ansi_term = "0.12.0"
datetime = "0.5"
env_logger = "0.6.1"
glob = "0.3.0"
lazy_static = "1.3.0"
libc = "0.2.51"
locale = "0.2.2"
log = "0.4.6"
natord = "1.0.9"
num_cpus = "1.10.0"
number_prefix = "0.3.0"
scoped_threadpool = "0.1.9"
term_grid = "0.1.7"
term_size = "0.3.1"
unicode-width = "0.1.5"
users = "0.10"
zoneinfo_compiled = "0.5"
[dependencies.git2]
version = "0.9.1"
optional = true
default-features = false
[build-dependencies]
datetime = "0.5"
[features]
default = [ "git" ]
git = [ "git2" ]
vendored-openssl = ["git2/vendored-openssl"]
[profile.release]
opt-level = 3
debug = false
lto = true
panic = "abort"
[package.metadata.deb]
license-file = [ "LICENCE" ]
depends = "$auto"
extended-description = """
exa is a replacement for ls written in Rust.
"""
section = "utils"
priority = "optional"
assets = [
[ "target/release/exa", "/usr/bin/exa", "0755" ],
[ "contrib/man/exa.1", "/usr/share/man/man1/exa.1", "0644" ],
[ "contrib/completions.bash", "/etc/bash_completion.d/exa", "0644" ],
]