Cargo Features
[dependencies]
starship = { version = "1.21.1", default-features = false, features = ["battery", "config-schema", "notify", "gix-max-perf", "gix-faster"] }
- default = battery, gix-max-perf, notify
-
These default features are set whenever
starship
is added without
somewhere in the dependency tree.default-features = false - battery default = starship-battery
-
Affects
context::Context.battery_info_provider
… - config-schema = schemars
-
Affects
print::print_schema
… - notify default = notify-rust
- gix-max-perf default
-
Enables most of the
max-performance
features of thegix
module for better performance. This can be more difficult to build in some conditions and requires cmake.Enables zlib-ng of gix-features ^0.38.2 and fast-sha1 of gix ^0.66.0
default feature restriction addresses https://github.com/starship/starship/issues/4251
- gix-faster
-
Slower than
git-repository-max-perf
, but better than the default. Unlikegit-repository-max-perf
this does not require cmake and allows dynamic zlib linking.Enables fast-sha1 of gix ^0.66.0, zlib-stock of gix-features ^0.38.2
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.
- gix-features gix-faster? gix-max-perf
-
Enables gix-features ^0.38.2
- notify-rust notify
-
Enables notify-rust
notify-rust is optional (on by default) because the crate doesn't currently build for darwin with nix see: https://github.com/NixOS/nixpkgs/issues/160876
- starship-battery battery
-
Enables starship-battery
battery is optional (on by default) because the crate doesn't currently build for Termux see: https://github.com/svartalf/rust-battery/issues/33
- schemars config-schema?