#!/usr/bin/env bash # Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. # # unused-deps — prints unused dependencies for all Rust crates. # Requires https://github.com/est31/cargo-udeps and a working nightly toolchain. # # cargo-udeps occasionally produces false positives, especially with # dependencies that are used only on certain platforms. To ignore these # dependencies, see: # https://github.com/est31/cargo-udeps#ignoring-some-of-the-dependencies. set -euo pipefail cd "$(dirname "$0")/.." . misc/shlib/shlib.bash export RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:=nightly} cargo udeps --workspace --all-targets --exclude=workspace-hack "$@"