Cargo Features

Lightyear has no features set by default.

[dependencies]
lightyear = { version = "0.17.1", features = ["big_messages", "trace", "metrics", "mock_time", "webtransport", "leafwing", "avian2d", "avian3d", "websocket", "steam", "lz4", "zstd", "futures-lite"] }
big_messages

Enable sending messages bigger than 300KB

Affects message::FragmentIndex

trace

Affects channel::stats

metrics = metrics-exporter-prometheus, metrics-tracing-context, metrics-util

Enables metrics ^0.23

mock_time

Enables mock_instant ^0.4.0

webtransport

Enables ring, wasm-bindgen-futures, web-sys, wtransport =0.1.14, xwt-core, and xwt-web-sys ^0.12

leafwing

Enables leafwing-input-manager

input

Affects input::leafwing, inputs::leafwing, input::leafwing, input::leafwing

avian2d

Enables avian2d

physics

Affects utils::avian2d

avian3d

Enables 3d of avian3d

Affects utils::avian3d

websocket

Enables futures-util, tokio-tungstenite ^0.23.0, wasm-bindgen, wasm-bindgen-futures, and web-sys

futures-util:

WebSocket

steam

Enables steamworks

Affects connection::steam

lz4

compression

Enables lz4_flex

zstd

Enables zstd

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.

metrics-util metrics?

Enables metrics-util ^0.15

metrics-tracing-context metrics?

Enables metrics-tracing-context ^0.15

metrics-exporter-prometheus metrics?

Enables metrics-exporter-prometheus ^0.15.1

futures-lite wasm implicit feature

Enables futures-lite

futures-lite:

Futures, streams, and async I/O combinators