Analysis tools logo

39 Rust Static Analysis Tools

Type:
Any

What is Rust?

Rust is a multi-paradigm programming language focused on performance and safety, especially safe concurrency. Rust is syntactically similar to C++, and provides memory safety without using garbage collection.

Rust was originally designed by Graydon Hoare at Mozilla Research, with contributions from Dave Herman, Brendan Eich, and others. The designers refined the language while writing the Servo layout or browser engine, and the Rust compiler. It has gained increasing use in industry, and…

(More info)

What are the best Rust analysis tools?

113

Mega-Linter

  • Type: cli
959

Mega-Linter can handle any type of project thanks to its 70+ embedded Linters, its advanced reporting, runnable on any CI system or locally, with assisted installation and configuration, able to apply formatting and fixes

48

Sonatype

  • Type: service

Reports known vulnerabilities in common dependencies and recommends updated packages to minimize breaking changes

44

clippy

  • Type: cli
8575

A code linter to catch common mistakes and improve your Rust code.

25

ThreatMapper

  • Type: service
  • Type: web
2581

Vulnerability Scanner and Risk Evaluation for containers, serverless and hosts at runtime. ThreatMapper generates runtime BOMs from dependencies and operating system packages, matches against multiple threat feeds, scans for unprotected secrets, and scores issues based on severity and risk-of-exploit.

19

cargo-audit

  • Type: cli
1161

Audit Cargo.lock for crates with security vulnerabilities reported to the [RustSec Advisory Database](https://github.com/RustSec/advisory-db/).

17

rust-analyzer

  • Type: ide-plugin
10997

Supports functionality such as 'goto definition', type inference, symbol search, reformatting, and code completion, and enables renaming and refactorings.

11

rustfmt

  • Type: cli
4761

A tool for formatting Rust code according to style guidelines.

10

trunk

  • Type: cli

Modern repositories include many technologies, each with its own set of linters. With 30+ linters and counting, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos.

9

Rust Language Server

  • Type: ide-plugin
3571

Supports functionality such as 'goto definition', symbol search, reformatting, and code completion, and enables renaming and refactorings.

7

cargo-bloat

  • Type: cli
1674

Find out what takes most of the space in your executable. supports ELF (Linux, BSD), Mach-O (macOS) and PE (Windows) binaries.

6

cargo-spellcheck

  • Type: cli
274

Checks all your documentation for spelling and grammar mistakes with hunspell (ready) and languagetool (preview)

5

cargo-expand

  • Type: cli
1754

Cargo subcommand to show result of macro expansion and #[derive] expansion applied to the current crate. This is a wrapper around a more verbose compiler command.

5

cargo udeps

  • Type: cli
970

Find unused dependencies in Cargo.toml. It either prints out a "unused crates" line listing the crates, or it prints out a line saying that no crates were unused.

5

MIRAI

  • Type: cli
780

And abstract interpreter operating on Rust's mid-level intermediate language, and providing warnings based on taint analysis.

4

Prusti

  • Type: cli
1170

A static verifier for Rust, based on the Viper verification infrastructure. By default Prusti verifies absence of panics by proving that statements such as unreachable!() and panic!() are unreachable.

3

cargo-inspect

  • Type: cli
379

Inspect Rust code without syntactic sugar to see what the compiler does behind the curtains.

3

dylint

  • Type: cli
195

A tool for running Rust lints from dynamic libraries. Dylint makes it easy for developers to maintain their own personal lint collections.

3

electrolysis

  • Type: cli
298

A tool for formally verifying Rust programs by transpiling them into definitions in the Lean theorem prover.

2

cargo-deny

  • Type: cli
1021

A cargo plugin for linting your dependencies. It can be used either as a command line too, a Rust crate, or a Github action for CI. It checks for valid license information, duplicate crates, security vulnerabilities, and more.

2

prae

  • Type: cli
96

Provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

2

rustfix

  • Type: cli
786

Read and apply the suggestions made by rustc (and third-party lints, like those offered by clippy).

2

RustViz

  • Type: cli
2158

RustViz is a tool that generates visualizations from simple Rust programs to assist users in better understanding the Rust Lifetime and Borrowing mechanism. It generates SVG files with graphical indicators that integrate with mdbook to render visualizations of data-flow in Rust programs.

2

todocheck

  • Type: cli
395

Linter for integrating annotated TODOs with your issue trackers

2

trivy

  • Type: cli
15122

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Trivy detects vulnerabilities of OS packages (Alpine, RHEL, CentOS, etc.) and application dependencies (Bundler, Composer, npm, yarn, etc.). Checks containers and filesystems.

1

cargo-unused-features

  • Type: cli
66

Find potential unused enabled feature flags and prune them. You can generate a simple HTML report from the json to make it easier to inspect results. It removes a feature of a dependency and then compiles the project to see if it still compiles. If it does, the feature flag can possibly be removed, but it can be a false-positve.

1

herbie

  • Type: cli
172

Adds warnings or errors to your crate when using a numerically unstable floating point expression.

1

linter-rust

  • Type: cli
42

Linting your Rust-files in Atom, using rustc and cargo.

1

lizard

  • Type: cli
1478

Lizard is an extensible Cyclomatic Complexity Analyzer for many programming languages including C/C++ (doesn't require all the header files or Java imports). It also does copy-paste detection (code clone detection/code duplicate detection) and many other forms of static code analysis. Counts lines of code without comments, CCN (cyclomatic complexity number), token count of functions, parameter count of functions.

1

Rudra

  • Type: cli
1156

Rust Memory Safety & Undefined Behavior Detection. It is capable of analyzing single Rust packages as well as all the packages on crates.io.

1

rust-audit

  • Type: cli
307

Audit Rust binaries for known bugs or security vulnerabilities. This works by embedding data about the dependency tree (Cargo.lock) in JSON format into a dedicated linker section of the compiled executable.

0

cargo-breaking

  • Type: cli
114

cargo-breaking compares a crate's public API between two different branches, shows what changed, and suggests the next version according to semver.

0

cargo-show-asm

  • Type: cli
186

cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code

0

Sigrid

  • Type: cli
  • Type: service

Sigrid helps you to improve your software by measuring your system's code quality, and then compares the results against a benchmark of thousands of industry systems to give you concrete advice on areas where you can improve.

0

warnalyzer

  • Type: cli
75

Show unused code from multi-crate Rust projects

-1

C2Rust

  • Type: cli
2933

C2Rust helps you migrate C99-compliant code to Rust. The translator (or transpiler) produces unsafe Rust code that closely mirrors the input C code.

-3

ShiftLeft Scan

  • Type: cli
  • Type: service
548

Scan is a free open-source DevSecOps platform for detecting security issues in source code and dependencies. It supports a broad range of languages and CI/CD pipelines.

Deprecated/unmaintained tools

1

pfff

  • Type: cli
190

Facebook's tools for code analysis, visualizations, or style-preserving source transformation for many languages.

0

Corrode

  • Type: cli
2121

Semi-automatic translation from C to Rust. Could reveal bugs in the original implementation by showing Rust compiler warnings and errors. Superseded by C2Rust.

❤️ Sponsor this project

We are currently looking for partners who want to sponsor hosting and development of the project.

Check out our Github Sponsors page here

Missing an entry? Please let us know.