[package]
name = "uni-socket"
version = "0.0.1"
edition = "2021"
rust-version = "1.71.0"
authors = ["Hantong Chen <cxwdyx620@gmail.com>"]
categories = ["network-programming"]
description = """
Async TCP / Unix Domain Socket abstraction, cross platform development friendly.
"""
keywords = ["socket", "tcp", "unix", "stream", "tokio"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/hanyu-dev/uni-socket"
[package.metadata.docs.rs]
features = ["splice"]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
libc = "0.2.178"
rustix = { version = "1.1", features = ["event", "pipe"], optional = true }
socket2 = { version = "0.6.1", features = ["all"] }
tokio = { version = "1.48", features = ["net", "time"] }
tokio-splice2 = { version = "0.3.2", optional = true }
uni-addr = { version = "0.3.7", default-features = false, features = ["feat-tokio", "feat-socket2"] }
wrapper-lite = "0.4.0"
[dev-dependencies]
network-interface = "2.0.3"
rstest = { version = "0.26.1", default-features = false }
tokio = { version = "1.48", features = ["io-util", "macros", "rt-multi-thread"] }
[target.'cfg(target_os = "linux")'.dev-dependencies]
uni-socket = { path = ".", features = ["splice", "splice-legacy"] }
[features]
default = []
splice = ["dep:rustix"]
splice-legacy = ["dep:tokio-splice2"]
[lints]
clippy.allow_attributes_without_reason = "warn"
clippy.assertions_on_result_states = "warn"
clippy.assigning_clones = "warn"
clippy.bool_to_int_with_if = "warn"
clippy.cognitive_complexity = "warn"
clippy.create_dir = "warn"
clippy.dbg_macro = "warn"
clippy.debug_assert_with_mut_call = "warn"
clippy.default_trait_access = "warn"
clippy.disallowed_script_idents = "deny"
clippy.doc_link_with_quotes = "warn"
clippy.doc_markdown = "warn"
clippy.else_if_without_else = "deny"
clippy.enum_glob_use = "warn"
clippy.filetype_is_file = "warn"
clippy.inefficient_to_string = "warn"
clippy.mem_forget = "warn"
clippy.missing_panics_doc = "warn"
clippy.mod_module_files = "deny"
clippy.multiple_inherent_impl = "warn"
clippy.mutex_atomic = "warn"
clippy.mutex_integer = "warn"
clippy.needless_continue = "warn"
clippy.panic = "warn"
clippy.significant_drop_in_scrutinee = "warn"
clippy.todo = "warn"
clippy.unimplemented = "warn"
clippy.unreachable = "warn"
clippy.wildcard_dependencies = "deny"
clippy.wildcard_imports = "warn"
rust.unsafe_code = "warn"
rust.missing_docs = "warn"
rust.missing_debug_implementations = "warn"
rust.unreachable_pub = "warn"
[profile.dev]
debug = "line-tables-only"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
incremental = false
panic = "abort"
strip = true