Does Rust not need extra linting and sanitizing tools like C++?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/rust

Our great sponsors
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SonarLint - Clean code begins in your IDE with SonarLint
  • SaaSHub - Software Alternatives and Reviews
  • Clippy

    A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/

    Rust does not need linting tools: as a language, it has far fewer footguns and far stricter compiler warnings, which significantly reduce the value added by the linting. You might still want to use clippy to check for stylistic and marginal correctness issues, but this is entirely optional.

  • miri

    An interpreter for Rust's mid-level intermediate representation

    Because unsafe is, by definition, for stuff the compiler can't prove correct at compile time, there is also Miri, which serves a similar role to LLVM's sanitizers and does have some overlap with them, but makes different trade-offs.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • rust-analyzer

    A Rust compiler front-end for IDEs

    There is clippy for additional lints, rust-analyser has some lints (and refactoring tools) that are not in the compiler, there is rustfmt for formatting code or checking if code is formatted and so on

  • rustfmt

    Format Rust code

    There is clippy for additional lints, rust-analyser has some lints (and refactoring tools) that are not in the compiler, there is rustfmt for formatting code or checking if code is formatted and so on

  • rust

    Empowering everyone to build reliable and efficient software.

    If you don't use unsafe, then the only sources of memory bugs or data races should be bugs in your dependencies that do use unsafe or compiler/std bugs that haven't been fixed yet. (There are also similar piles on the LLVM and GCC bug trackers, but I don't know how to link to whatever tags they use)

  • Rudra

    Rust Memory Safety & Undefined Behavior Detection

    If you’re writing unsafe Rust, you might consider cargo miri and Rudra as additional static analyzers which can find bugs rustc won’t

  • MIRAI

    Rust mid-level IR Abstract Interpreter

    There's a MIR Abstract interpreter project: https://github.com/facebookexperimental/MIRAI

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • loom

    Concurrency permutation testing tool for Rust. (by tokio-rs)

    Unless you are writing unsafe code, you generally don't need to use sanitizers. If you do write unsafe code, checking it with a sanitizer would be a great idea. Two most useful tools here I think are miri and loom.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts