Cargo Features

[dependencies]
tokio-listener = { version = "0.3.2", default-features = false, features = ["user_facing_default", "serde", "hyper014", "axum07", "inetd", "unix", "unix_path_tools", "sd_listen", "socket_options", "tonic010", "tonic011", "tokio-util", "clap"] }
default = tokio-util, user_facing_default

These default features are set whenever tokio-listener is added without default-features = false somewhere in the dependency tree.

user_facing_default default = inetd, sd_listen, socket_options, unix, unix_path_tools

Subset of default features that add features supposed to be accessed by end user

serde = serde_with

Enable serde::Serialize and serde::Deserialize implementations for UserOptions and ListenerAddress and some other types.

Enables serde

hyper014

Enable hyper(v0.14)::server::accept::Accept implementation for Listener

Enables hyper ^0.14.27

axum07

Enable tokio-listener-adapted serve function from Axum 0.7 (and related types)

Enables futures-util, hyper-util, hyper, tower, and tower-service

Affects tokio-listener::axum07

inetd user_facing_default

Enable inetd (stdin/stdout) mode

Enables futures-util

unix user_facing_default

Enable UNIX socket mode

unix_path_tools user_facing_default = nix

Enable tools such as unlink/chmod/chown for UNIX path sockets in UserOptions

Affects tokio-listener::UnixChmodVariant, tokio-listener::UserOptions.unix_listen_unlink, tokio-listener::UserOptions.unix_listen_chmod, tokio-listener::UserOptions.unix_listen_uid, tokio-listener::UserOptions.unix_listen_gid

sd_listen user_facing_default

Enable constructing sockets from inherited file descriptor. Disabling this should make the crate unsafe-free.

Affects tokio-listener::UserOptions.sd_accept_ignore_environment

socket_options user_facing_default = socket2

Enable socket options such as receive or send buffer sizes or keepalives in UserOptions

Affects tokio-listener::TcpKeepaliveParams, tokio-listener::UserOptions.tcp_keepalive, tokio-listener::UserOptions.tcp_reuse_port, tokio-listener::UserOptions.recv_buffer_size, tokio-listener::UserOptions.send_buffer_size, tokio-listener::UserOptions.tcp_only_v6, tokio-listener::UserOptions.tcp_listen_backlog

tonic010

Enable tonic(v0.10)::transport::server::Connected implementation for Connection

Enables tonic ^0.10.2

tonic011

Enable tonic(v0.11)::transport::server::Connected implementation for Connection

Enables tonic

tokio-util default

Enable tokio_util::net::Listener implementation for Listener.

Enables tokio-util

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

clap implicit feature

Enables clap

Enable derive(Parser) for UserOptions and other Clap helpers

serde_with serde?
socket2 socket_options?
nix unix unix_path_tools?

Enables nix ^0.26.2