• Stars
    star
    1,660
  • Rank 28,156 (Top 0.6 %)
  • Language
    Rust
  • License
    Other
  • Created about 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Find unused dependencies in Cargo.toml

cargo-udeps

crates.io dependency status

Find unused dependencies in Cargo.toml.

While compilation of this tool also works on Rust stable, it needs Rust nightly to actually run.

Installation

GitHub Releases

https://github.com/est31/cargo-udeps/releases

cargo install (crates.io)

cargo install cargo-udeps --locked

cargo install (master)

cargo install --git https://github.com/est31/cargo-udeps --locked

Dedicated packages

Some package managers have packaged cargo-udeps:

  • Nix/Nix OS: cargo-udeps
  • Arch Linux: pacman -S cargo-udeps
  • Homebrew: brew install cargo-udeps

Usage

cargo +nightly udeps

It either prints out a "unused crates" line listing the crates, or it prints out a line saying that no crates were unused.

Ignoring some of the dependencies

To ignore some of the dependencies, add package.metadata.cargo-udeps.ignore to Cargo.toml.

[package.metadata.cargo-udeps.ignore]
normal = ["if_chain"]
#development = []
#build = []

[dependencies]
if_chain = "1.0.0" # Used only in doc-tests, which `cargo-udeps` cannot check.

Known bugs

  • Some unused crates might not be detected. This includes crates used by std and its dependencies as well as crates that are already being used by dependencies of the studied crate.

  • Crates are currently only handled on a per name basis. Two crates with the same name but different versions would be a problem.

Trophy case

This is a list of cases where unused dependencies were found using cargo-udeps. You are welcome to expand it:

Contributing

See CONTRIBUTING.md for details.

License

This tool is distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your option.

See LICENSE for details.

License of your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

warnalyzer

Show unused code from multi-crate Rust projects
Rust
89
star
2

postfix-macros

Postfix macros on stable Rust, today.
Rust
76
star
3

msvc-wine-rust

Cross compile Rust programs to the MSVC Windows target using Wine
Shell
61
star
4

serde-big-array

Big array helper for serde
Rust
58
star
5

js-audio-normalizer

HTML
33
star
6

cargo-local-serve

Mirror of https://gitlab.com/est/cargo-local-serve | Serve a local, offline, clone of crates.io.
Rust
27
star
7

mimas

Voxel engine and game
Rust
21
star
8

werk

Early stages of a pure Rust opus library
Rust
14
star
9

glium-glyph

Glium frontend for the glyph-brush text renderer
Rust
12
star
10

csrp-gmp

Minimal C implementation of the Secure Remote Password protocol (version 6a)
C
10
star
11

leaftest

Mapper script for minetest
CSS
9
star
12

maybe-uninit

MaybeUninit for friends of backwards compatibility
Rust
8
star
13

ogg-metadata

Metadata parser for various Ogg codecs, written in Rust
Rust
5
star
14

toml-spanned-value

SpannedValue support for toml-rs
Rust
3
star
15

minetest-pwm

Simple password manager for minetest (client mod). License: LGPL v2.1+
Lua
2
star
16

test-assets

Download test assets, managing them outside of git
Rust
2
star
17

podiff-review

Review `gettext` pofile commits, powered with rust.
Rust
1
star
18

balloc

Bounded allocation for Rust
Rust
1
star
19

vmo-audio-normalizer

Audio level normalizer for voice.mozilla.org contribution
JavaScript
1
star
20

ct-ext-search

Search tool for Certificate Transparency extensions
Rust
1
star
21

veraball

Veraball, a free/libre "roll the ball" game made using Godot
GDScript
1
star
22

share_login

Minetest login sharing mod and server
Rust
1
star
23

anvil

An anvil mod for minetest based on the cottages anvil
Lua
1
star
24

spawn

Adds a /spawn command to Minetest that teleports players to the static spawnpoint defined in minetest.conf.
Lua
1
star
25

aoc

🎄
Rust
1
star
26

minetest-flatpak

Flatpak build files for minetest -- DEPRECATED, please take it from flathub instead: https://github.com/flathub/net.minetest.Minetest
Shell
1
star
27

kickall

simple mod for easing minetest server shutdowns
Lua
1
star
28

somerts

A voxel based RTS game for the minetest engine
Lua
1
star