Cargo Features
[dependencies]
lightyear = { version = "0.26.4", default-features = false, features = ["std", "client", "server", "deterministic", "replication", "prediction", "frame_interpolation", "interpolation", "trace", "metrics", "debug", "input_native", "leafwing", "input_bei", "avian2d", "avian2d_f32", "avian3d", "avian3d_f32", "udp", "crossbeam", "webtransport", "webtransport_self_signed", "webtransport_dangerous_configuration", "websocket", "websocket_self_signed", "steam", "netcode", "raw_connection", "lightyear_aeronet"] }
- default = client, interpolation, prediction, replication, server, std
-
These default features are set whenever
lightyearis added withoutsomewhere in the dependency tree.default-features = false - std default metrics? steam? udp? websocket? webtransport?
-
Enables std of optional lightyear_aeronet, optional lightyear_avian2d, optional lightyear_avian3d, optional lightyear_frame_interpolation, optional lightyear_inputs, optional lightyear_inputs_bei, optional lightyear_inputs_leafwing, optional lightyear_inputs_native, optional lightyear_interpolation, lightyear_link, lightyear_messages, optional lightyear_metrics, optional lightyear_netcode, optional lightyear_prediction, optional lightyear_replication, lightyear_serde, optional lightyear_steam, lightyear_sync, lightyear_transport, optional lightyear_ui, and lightyear_utils
lightyear_aeronet:
local crates
- client default
-
enable client plugins
Enables client of lightyear_connection, optional lightyear_inputs, optional lightyear_inputs_bei, optional lightyear_inputs_leafwing, optional lightyear_inputs_native, lightyear_messages, optional lightyear_netcode, optional lightyear_raw_connection, optional lightyear_replication, optional lightyear_steam, lightyear_sync, lightyear_transport, optional lightyear_websocket, and optional lightyear_webtransport
Affects
lightyear::prelude.client… - server default
-
enable server plugins and server-only features
Enables server of lightyear_connection, optional lightyear_inputs, optional lightyear_inputs_bei, optional lightyear_inputs_leafwing, optional lightyear_inputs_native, lightyear_messages, optional lightyear_netcode, optional lightyear_prediction, optional lightyear_raw_connection, optional lightyear_replication, optional lightyear_steam, lightyear_sync, lightyear_transport, optional lightyear_udp, optional lightyear_websocket, and optional lightyear_webtransport
Affects
lightyear::prelude.server… - deterministic
-
Adds helper plugins to use for deterministic replication (where only inputs are replicated)
Enables lightyear_deterministic_replication, deterministic of optional lightyear_avian2d and optional lightyear_avian3d, deterministic of optional lightyear_prediction and optional lightyear_replication
- replication default
-
Enables replicating entities between two peers
Enables lightyear_replication
- prediction default
-
Enables client-side prediction handling to mask latency for local player actions
Enables lightyear_frame_interpolation, lightyear_prediction, prediction of lightyear_replication, prediction of optional lightyear_inputs
Affects
lightyear::prediction… - frame_interpolation
-
Enables re-exports of lightyear_frame_interpolation
Enables lightyear_frame_interpolation
Affects
lightyear::frame_interpolation… - interpolation default
-
Enables interpolation handling, to smooth entity updates received from the remote peer
Enables lightyear_interpolation, interpolation of lightyear_replication, interpolation of optional lightyear_inputs
Affects
lightyear::interpolation… - trace
-
UTILS
Enables trace of optional lightyear_netcode, optional lightyear_replication, and lightyear_transport
- metrics debug? = std
-
enable metrics collection (via
metricscrate)Enables lightyear_metrics, metrics of lightyear_messages, optional lightyear_inputs, and optional lightyear_interpolation, metrics of lightyear_replication, lightyear_transport, lightyear_utils, optional lightyear_prediction, and optional lightyear_udp
Affects
lightyear::metrics… - debug = metrics
-
Enables lightyear_ui
- input_native
-
INPUTS
Add support for handling inputs where you can define your own input structsEnables lightyear_inputs and lightyear_inputs_native
Affects
lightyear::input.native,lightyear::input.native,lightyear::input,lightyear::prelude.input,lightyear::client.input,lightyear::server.input… - leafwing
-
Add support for handling inputs using the leafwing-input-manager crate
Enables lightyear_inputs and lightyear_inputs_leafwing
Affects
lightyear::input.leafwing,lightyear::input.leafwing,lightyear::input,lightyear::prelude.input,lightyear::client.input,lightyear::server.input… - input_bei
-
Enables lightyear_inputs and lightyear_inputs_bei
Affects
lightyear::input.bei,lightyear::input.bei,lightyear::input,lightyear::prelude.input,lightyear::client.input,lightyear::server.input… - avian2d
-
Adds support for Avian
NOTE: because lightyear doesn't enable any features of avian by default, your crate must enable essential features (like f32 or f64).
Use avian2dEnables lightyear_avian2d, avian2d of optional lightyear_replication
Affects
lightyear::avian2d… - avian2d_f32
-
so that docsrs uses f32 to build docs
Enables f32 of lightyear_avian2d
- avian3d
-
Use avian3d
Enables lightyear_avian3d, avian3d of optional lightyear_replication
Affects
lightyear::avian3d… - avian3d_f32
-
so that docsrs uses f32 to build docs
Enables f32 of lightyear_avian3d
- udp = std
-
IO LAYERS
Enables UDP as an IO layerEnables lightyear_udp
- crossbeam
-
Enables crossbeam channels as an IO layer
This is useful when running a client and server in two processes of the same machine so that a client can act as the hostEnables lightyear_crossbeam
Affects
lightyear::crossbeam… - webtransport = std
-
Enable WebTransport support as an IO layer (defers to aeronet_webtransport)
Enables lightyear_webtransport
Affects
lightyear::webtransport… - webtransport_self_signed
-
Enables self-signed of lightyear_webtransport
lightyear_webtransport:
Enables
wtransport/self-signed, allowing you to generate self-signed certificates easily for use in a server.Note that, without explicitly allowing your server's self-signed certificate (or using
dangerous-configurationand disabling certificate validation), clients will not be able to connect to a server with self-signed certificates. - webtransport_dangerous_configuration
-
Enable unsafe configurations for WebTransport (e.g. allowing unencrypted connections) as a convenience for testing
Enables dangerous-configuration of lightyear_webtransport
- websocket = std
-
Enable WebSocket support as an IO layer (defers to aeronet_websocket)
Enables lightyear_websocket
Affects
lightyear::websocket… - websocket_self_signed
-
Enables self-signed of lightyear_websocket
lightyear_websocket:
Enables
wtransport/self-signed, allowing you to generate self-signed certificates easily for use in a server.Note that, without explicitly allowing your server's self-signed certificate, clients will not be able to connect to a server with self-signed certificates.
- steam = std
-
CONNECTION LAYERS
Enables Steam as a connection layerEnables lightyear_steam
Affects
lightyear::steam… - netcode
-
Enables netcode to provide persistent IDs to clients
Enables lightyear_netcode
Affects
lightyear::netcode… - raw_connection
-
Enables using the IO directly as a connection layer
Enables lightyear_raw_connection
Features from optional dependencies
- lightyear_aeronet implicit feature