[package]
name = "macro-toolset"
version = "0.8.0-rc.2"
edition = "2021"
rust-version = "1.66.0"
authors = ["Hantong Chen <cxwdyx620@gmail.com>"]
categories = ["development-tools"]
description = "Some useful macros"
keywords = ["macro", "string"]
license = "GPL-3.0-only"
readme = "README.md"
repository = "https://github.com/cxw620/macro-toolset"
[package.metadata.docs.rs]
features = ["dev"]
[dependencies]
base64 = { version = "0.22.0", optional = true }
bytes = { version = "1.2.0", optional = true }
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"], optional = true }
ryu = { version = "1.0.0", optional = true }
const-hex = { version = "1.14.0", optional = true, default-features = false }
foldhash = { version = "0.1.0", optional = true }
ammonia = { version = "4.0.0", optional = true }
axum-core = { version = "0.4.0", optional = true }
chrono = { version = "0.4.20", optional = true, default-features = false, features = ["alloc"] }
http = { version = "1.0.0", optional = true }
[dev-dependencies]
bytes = "1.9.0"
const-hex = "1.14.0"
criterion = "0.5.1"
md-5 = "0.10.6"
rand = "0.8.5"
sha2 = "0.10.8"
[features]
default = ["feat-random", "feat-string"]
dev = [
"feat-base64",
"feat-hash",
"feat-random-fast",
"feat-string",
"feat-string-ext-ammonia",
"feat-string-ext-axum",
"feat-string-ext-base64",
"feat-string-ext-bytes",
"feat-string-ext-chrono",
"feat-string-ext-hex",
"feat-string-ext-http",
"feat-string-ext-rand",
"feat-string-ext-ryu",
]
feat-base64 = ["dep:base64"]
feat-hash = ["dep:const-hex"]
feat-random = []
feat-random-fast = ["feat-random", "dep:foldhash"]
feat-string = []
feat-string-ext-ammonia = ["dep:ammonia"]
feat-string-ext-axum = ["dep:axum-core", "dep:bytes"]
feat-string-ext-base64 = ["dep:base64"]
feat-string-ext-bytes = ["dep:bytes"]
feat-string-ext-chrono = ["dep:chrono"]
feat-string-ext-hex = ["dep:const-hex"]
feat-string-ext-http = ["dep:bytes", "dep:http"]
feat-string-ext-rand = ["feat-random", "dep:rand"]
feat-string-ext-ryu = ["dep:ryu"]
[profile.bench]
opt-level = 3
lto = true
codegen-units = 1
incremental = false
strip = true
[[bench]]
name = "hex_string"
path = "benches/hex_string.rs"
harness = false
[[bench]]
name = "rand_string"
path = "benches/rand_string.rs"
harness = false
[[bench]]
name = "str_concat"
path = "benches/str_concat.rs"
harness = false
[lints.rust]
unsafe_code = "warn"
missing_docs = "warn"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
[lints.clippy]
allow_attributes_without_reason = "warn"
assertions_on_result_states = "warn"
assigning_clones = "warn"
bool_to_int_with_if = "warn"
cognitive_complexity = "warn"
create_dir = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
default_trait_access = "warn"
disallowed_script_idents = "deny"
doc_link_with_quotes = "warn"
doc_markdown = "warn"
else_if_without_else = "deny"
enum_glob_use = "warn"
filetype_is_file = "warn"
inefficient_to_string = "warn"
mem_forget = "warn"
missing_panics_doc = "warn"
mod_module_files = "deny"
multiple_inherent_impl = "warn"
mutex_atomic = "warn"
mutex_integer = "warn"
needless_continue = "warn"
panic = "warn"
significant_drop_in_scrutinee = "warn"
todo = "warn"
unimplemented = "warn"
wildcard_dependencies = "deny"
wildcard_imports = "warn"