Cargo Features

starship = { version = "1.17.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 default-features = false somewhere in the dependency tree.

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 the gix module for better performance. This can be more difficult to build in some conditions and requires cmake.

Enables zlib-ng of gix-features ^0.37.1 and fast-sha1 of gix ^0.57.1

default feature restriction addresses


Slower than git-repository-max-perf, but better than the default. Unlike git-repository-max-perf this does not require cmake and allows dynamic zlib linking.

Enables fast-sha1 of gix ^0.57.1, zlib-stock of gix-features ^0.37.1

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

gix-features gix-faster? gix-max-perf

Enables gix-features ^0.37.1

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:

starship-battery battery

Enables starship-battery

battery is optional (on by default) because the crate doesn't currently build for Termux see:

schemars config-schema?