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

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • 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

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 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

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • 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