Cargo Features
[dependencies]
sfml = { version = "0.21.0", default-features = false, features = ["window", "graphics", "audio", "serde", "ci-headless"] }
- default = audio, graphics
-
These default features are set whenever
sfml
is added without
somewhere in the dependency tree.default-features = false - window graphics = bitflags, once_cell
-
Affects
sfml::window
… - graphics default = window
-
Affects
sfml::graphics
… - audio default
-
Affects
sfml::audio
… - serde
-
Enables serde
- ci-headless
-
Used to skip running certain tests on CI, since it's running in a headless environment.
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.