What are some examples of particularly well written crates?

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

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • CodiumAI - TestGPT | Generating meaningful tests for busy devs
  • ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
  • InfluxDB - Access the most powerful time series database as a service
  • regex

    An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

    I'd consider regex to be a good example candidate. It has many tests, including benchmarks, fuzzing, and unit testing. It works well as an example of how to structure a mid-size program.

  • bevy

    A refreshingly simple data-driven game engine built in Rust


  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • rust

    Empowering everyone to build reliable and efficient software.

    Rust Itself

  • redis-rs

    Redis library for rust

    I think the redis crate was a well-organized API library. It's still sometimes hard to know the right things to make public and I think they nailed it.

  • sled

    the champagne of beta embedded databases

  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

    How come ripgrep wasn't mentioned yet?

  • rust-analyzer

    A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)

    rust-analyzer has put a lot of work into its organization. Especially architecture.md explains a lot of the API decisions and the reasoning behind them.

  • CodiumAI

    TestGPT | Generating meaningful tests for busy devs. Get non-trivial tests (and trivial, too!) suggested right inside your IDE, so you can code smart, create more value, and stay confident when you push.

  • windows-rs

    Rust for Windows

    https://github.com/microsoft/windows-rs should be Microsoft-standard..!

  • pulldown-cmark

    The crate that's closest to production quality code is pulldown-cmark, but I don't hold it up as an example of well-written code, because it's not particularly easy to understand and there's a lot of very low level code to consume the CommonMark syntax - that helps with code bloat and compile time, but not clarity.

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