What Are The Rust Crates You Use In Almost Every Project That They Are Practically An Extension of The Standard Library?

441 points InternalServerError7

What are the Rust crates you use in almost every project that they are practically an extension of the standard library for you? Here are the ones for me:

Dependencies

  • anyhow: Enhanced error handling with added context.
  • thiserror: Macro for creating specific errors from enums.
  • educe: Macro for more options in implementing built-in traits.
  • validator: Field validation macros for structs.
  • tap: Utilities for declarative and procedural coding.
  • lazy_static: Run code at runtime and save the results statically.
  • joinery: Adds joining functionality to iterables.
  • log: Logging interface with various levels.
  • fern: Logging implementation.
  • once_cell: Provides lazy types and OnceCell.
  • chrono: Date and time utilities.
  • pin-project: Safe pin projection in Rust.
  • soa_derive: Transform AOS to SOA (Struct of Arrays).
  • derive_more: Derive traits for wrapper classes.
  • conv: Type conversions with more specificity.
  • derive_builder: Macro for creating builder structs.
  • serde: Serialization and deserialization framework.
  • tokio: Asynchronous I/O runtime.
  • rayon: Async CPU runtime for parallelism.

Dev Dependencies

  • fakeit: Generate fake data for testing.
  • insta: Snapshot testing and comparison.
  • pretty_assertions: Enhanced assertions with diff display.
  • proptest: Property-based testing with random input generation.
  • trybuild: Test that certain code variants do not compile.