Cargo Features
[dependencies]
starship = { version = "1.22.1", default-features = false, features = ["battery", "config-schema", "notify", "gix-max-perf", "gix-faster", "libz-ng-sys"] }
- 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 and fast-sha1 of gix
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, zlib-stock of gix-features
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
- 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
- libz-ng-sys implicit feature
-
Enables libz-ng-sys <1.1.20
Temporary workaround for https://github.com/rust-lang/libz-sys/issues/225
- schemars config-schema?