Cargo Features

Lightyear has no features set by default.

[dependencies]
lightyear = { version = "0.18.0", 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

mock_time

Enables mock_instant

webtransport

Enables wasm-bindgen-futures, web-sys, wtransport, xwt-core, and xwt-web

leafwing

Enables leafwing-input-manager

input

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

avian2d

NOTE: because lightyear doesn't enable any features of avian by default, your crate must enable essential features (like f32 or f64).

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.18

metrics-tracing-context metrics?

Enables metrics-tracing-context ^0.17

metrics-exporter-prometheus metrics?
futures-lite wasm implicit feature

Enables futures-lite

futures-lite:

Futures, streams, and async I/O combinators