[package]
edition = "2024"
rust-version = "1.85"
name = "net-io"
version = "0.6.0"
authors = ["James Gober <me@jamesgober.com>"]
build = false
exclude = [
"fuzz/",
"compare/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Network IO substrate for Rust: TCP, UDP and local-socket listeners, connection lifecycle, limits, graceful drain, PROXY protocol, and a TLS seam. Protocol-free and dependency-free."
homepage = "https://github.com/jamesgober/net-io"
documentation = "https://docs.rs/net-io"
readme = "README.md"
keywords = [
"network",
"tcp",
"udp",
"server",
"socket",
]
categories = ["network-programming"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/jamesgober/net-io"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = [
"proxy",
"udp",
"local",
"tls",
"reactor",
]
local = []
proxy = []
reactor = []
tls = []
udp = []
[lib]
name = "net_io"
path = "src/lib.rs"
[[example]]
name = "behind_proxy"
path = "examples/behind_proxy.rs"
required-features = ["proxy"]
[[example]]
name = "echo_blocking"
path = "examples/echo_blocking.rs"
[[example]]
name = "echo_sessions"
path = "examples/echo_sessions.rs"
[[example]]
name = "fastcgi_detect"
path = "examples/fastcgi_detect.rs"
[[example]]
name = "gate"
path = "examples/gate.rs"
[[example]]
name = "handoff_restart"
path = "examples/handoff_restart.rs"
required-features = ["local"]
[[example]]
name = "kill_and_drain"
path = "examples/kill_and_drain.rs"
[[example]]
name = "named_pipe"
path = "examples/named_pipe.rs"
required-features = ["local"]
[[example]]
name = "offload_completer"
path = "examples/offload_completer.rs"
[[example]]
name = "systemd_activation"
path = "examples/systemd_activation.rs"
[[example]]
name = "udp_echo"
path = "examples/udp_echo.rs"
required-features = ["udp"]
[[example]]
name = "unix_socket"
path = "examples/unix_socket.rs"
required-features = ["local"]
[[test]]
name = "admission"
path = "tests/admission.rs"
[[test]]
name = "adopt"
path = "tests/adopt.rs"
[[test]]
name = "alloc"
path = "tests/alloc.rs"
[[test]]
name = "close_reasons"
path = "tests/close_reasons.rs"
[[test]]
name = "cross_process"
path = "tests/cross_process.rs"
[[test]]
name = "driver"
path = "tests/driver.rs"
[[test]]
name = "edge"
path = "tests/edge.rs"
[[test]]
name = "handoff"
path = "tests/handoff.rs"
[[test]]
name = "idle"
path = "tests/idle.rs"
[[test]]
name = "interleave"
path = "tests/interleave.rs"
[[test]]
name = "leak"
path = "tests/leak.rs"
[[test]]
name = "listeners"
path = "tests/listeners.rs"
[[test]]
name = "pipe"
path = "tests/pipe.rs"
[[test]]
name = "proxy"
path = "tests/proxy.rs"
[[test]]
name = "reactor"
path = "tests/reactor.rs"
[[test]]
name = "send_file"
path = "tests/send_file.rs"
[[test]]
name = "server"
path = "tests/server.rs"
[[test]]
name = "shim"
path = "tests/shim.rs"
[[test]]
name = "tls"
path = "tests/tls.rs"
[[test]]
name = "udp_session"
path = "tests/udp_session.rs"
[[test]]
name = "unix"
path = "tests/unix.rs"
[[test]]
name = "windows_handoff"
path = "tests/windows_handoff.rs"
[[test]]
name = "windows_unix"
path = "tests/windows_unix.rs"
[[bench]]
name = "echo"
path = "benches/echo.rs"
harness = false
[[bench]]
name = "lifecycle"
path = "benches/lifecycle.rs"
harness = false
required-features = [
"proxy",
"reactor",
]
[dependencies]
[dev-dependencies]
[target."cfg(net_io_loom)".dev-dependencies.loom]
version = "0.7"
[target."cfg(unix)".dev-dependencies.libc]
version = "0.2"
[target."cfg(windows)".dev-dependencies.windows-sys]
version = "0.59"
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_IO",
"Win32_System_Pipes",
"Win32_System_WindowsProgramming",
]
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(net_io_loom)",
"cfg(net_io_shim)",
"cfg(net_io_force_blocking)",
"cfg(fuzzing)",
]
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"