Skip to content

Building from Source

Sam edited this page Jul 16, 2024 · 4 revisions

Build Dependencies

Feature Flags

Feature Flag Description
music Adds the music module. Depends on systemd specifically dbus being installed.
android Enables better detection for Android phones, at the cost of pulling in new dependencies.
rpm_packages Enables detection of RPM packages, adding a dynamic link to libsqlite3

Building

git clone git@github.com:LivacoNew/CrabFetch.git
cd CrabFetch

cargo build -r
# Or if you want the any of the feature flags...
cargo build -r -F music,android

Output will be in ./target/release/crabfetch for you to do whatever with.

Installing from Builds

Either move the output of the build to /usr/local/bin

# ... (Build Step)
sudo cp ./target/release/crabfetch /usr/local/bin

OR use cargo install --path . instead of cargo build -r from the build step.
If you choose to do this ensure that /home/{your-user}/.cargo/bin is added to your $PATH.