[package] authors = ["Gavin Panella "] categories = ["command-line-utilities", "no-std"] description = "Generate human readable random names. Usable as a library and from the command-line." edition = "2021" keywords = ["pet", "name", "rand", "random", "generator"] license = "Apache-2.0" name = "petname" readme = "README.md" repository = "https://github.com/allenap/rust-petname" version = "2.0.2" [lib] name = "petname" path = "src/lib.rs" [[bin]] doc = false name = "petname" path = "src/main.rs" required-features = ["clap", "default-rng", "default-words"] [features] # `clap` is NOT required for the library but is required for the command-line # binary. Omitting it from the `default` list means that it must be specified # _every time_ you want to build the binary, so it's here as a convenience. default = ["clap", "default-rng", "default-words"] # Allows generating petnames with thread rng. default-rng = ["rand/std", "rand/std_rng"] # Allows the default word lists to be used. default-words = [] [dev-dependencies] anyhow = "1" tempdir = "0.3" [build-dependencies] anyhow = "1" proc-macro2 = "1" quote = "1" [dependencies] clap = { version = "4.4", features = ["cargo", "derive"], optional = true } itertools = { version = ">=0.11", default-features = false } rand = { version = "0.8", default-features = false } [package.metadata.docs.rs] # Limit docs.rs builds to a single tier one target, because they're identical on # all. https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html targets = ["x86_64-unknown-linux-gnu"] # Follow some of the advice from https://github.com/johnthagen/min-sized-rust on # how to minimise the compiled (release build) binary size. At the time of # writing this reduces the binary from ~6MiB to ~2MiB. [profile.release] lto = true opt-level = "z" strip = true