Cargo Features

[dependencies]
virtual-net = { version = "0.12.0", default-features = false, features = ["host-net", "remote", "json", "messagepack", "cbor", "hyper", "tokio-tungstenite", "tokio", "rkyv"] }
default = cbor, host-net, hyper, json, messagepack, remote, tokio-tungstenite

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

host-net default = libc, mio, socket2

Enables net and rt of tokio, sys of virtual-mio

Affects virtual-net::host

remote default = libc, tokio-serde, tokio-util

Enables sync of tokio

Affects virtual-net::client, virtual-net::rx_tx, virtual-net::server

json default

Enables json of tokio-serde

messagepack default

Enables messagepack of tokio-serde

cbor default

Enables cbor of tokio-serde

hyper default = hyper-tungstenite, hyper-util

Enables hyper

tokio-tungstenite default

Enables tokio-tungstenite ^0.21

tokio host-net remote
rkyv

Enables bytecheck ^0.6.8 and rkyv

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.

libc host-net remote
mio host-net
socket2 host-net
tokio-serde cbor json messagepack remote
tokio-util remote
hyper-tungstenite hyper

Enables hyper-tungstenite ^0.13

hyper-util hyper