Cargo Features

[dependencies]
virtual-net = { version = "0.6.5", default-features = false, features = ["host-net", "remote", "json", "messagepack", "cbor", "hyper", "tokio-tungstenite", "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 ^0.8

messagepack default

Enables messagepack of tokio-serde ^0.8

cbor default

Enables cbor of tokio-serde ^0.8

hyper default = hyper-tungstenite

Enables hyper ^0.14

tokio-tungstenite default

Enables tokio-tungstenite ^0.20

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

Enables socket2 ^0.4

tokio-serde cbor json messagepack remote

Enables tokio-serde ^0.8

tokio-util remote
hyper-tungstenite hyper

Enables hyper-tungstenite ^0.11