[package]
name = "shvrpc"
description = "Rust implementation of the SHV-RPC protocol"
license = "MIT"
repository = "https://github.com/silicon-heaven/libshvrpc-rs"
version = "17.0.1"
edition = "2024"

[dependencies]
shvproto = "6.0"
futures = "0.3.29"
log = "0.4.21"
sha1 = "0.11.0"
hex = "0.4.3"
url = { version = "2.5.4", features = ["serde"] }
glob = "0.3.1"
duration-str = "0.21.0"
async-trait = "0.1.77"
crc = "3.0.1"
serde = "1.0.193"
serde_yaml = "0.9.29"
futures-time = "3.0.0"
tungstenite = { version = "0.29.0", optional = true, default-features = false }
anyhow = "1.0.98"
socketcan = { version = "3.5.0", optional = true, default-features = false, features = ["dump"] }
thiserror = { version = "2.0.16", optional = true }
bitflags = "2.10.0"

[dev-dependencies]
env_logger = "0.11.5"
macro_rules_attribute = "0.2.2"
smol = "2"
smol-macros = "0.1"

[features]
default = []
journal = []
websocket = ["dep:tungstenite"]
can = ["dep:socketcan", "dep:thiserror"]

[lints.clippy]
pedantic = {priority = -1, level = "warn"}

allow_attributes = "warn"
allow_attributes_without_reason = "warn"
box_collection = "warn"
dbg_macro = "warn"
enum_variant_names = "warn"
equatable_if_let = "warn"
exit = "warn"
indexing_slicing = "warn"
infinite_loop = "warn"
iter_on_single_items = "warn"
large_types_passed_by_value = "warn"
let_underscore_must_use = "warn"
linkedlist = "warn"
map_err_ignore = "warn"
missing_assert_message = "warn"
needless_pass_by_ref_mut = "warn"
option-if-let-else = "warn"
option_option = "warn"
or_fun_call = "warn"
owned_cow = "warn"
panic = "warn"
print_stderr = "warn"
print_stdout = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_allocation = "warn"
redundant_clone = "warn"
redundant_type_annotations = "warn"
ref_option = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
string_lit_as_bytes = "warn"
string_slice = "warn"
trivially_copy_pass_by_ref = "warn"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
unnecessary_box_returns = "warn"
unnecessary_wraps = "warn"
unneeded_field_pattern = "warn"
unused_self = "warn"
unwrap_used = "warn"
upper_case_acronyms = "warn"
useless_let_if_seq = "warn"
vec_box = "warn"
wrong_self_convention = "warn"

doc_markdown = "allow"
expect_used = "allow"
explicit_iter_loop = "allow"
float-cmp = "allow"
format_push_string = "allow"
if_not_else = "allow"
items_after_statements = "allow"
manual_string_new = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
should_panic_without_expect = "allow"
struct_excessive_bools = "allow"
todo = "allow"
too_many_lines = "allow"
