17
submitted 11 months ago by SethranKada@lemmy.ca to c/rust@programming.dev

I love browsing crates.io and blessed.rs for interesting and useful crates to experiment with. What are your favorite?

I'm especially interested in those simple ones that do one thing and do it will, like uuid, tempfile, and notify.

top 8 comments
sorted by: hot top controversial new old
[-] sebsch@discuss.tchncs.de 13 points 11 months ago

I mean serde is -- in my understanding -- the most useful crate out there. It does exactly one thing and that very well.

[-] abir_vandergriff@beehaw.org 9 points 11 months ago

Dtolney, the author for serde, has a stupid amount of libraries that fit this.

Other than serde, he owns syn, thiserror, anyhow, and async-trait.

He's practically the Atlas of the Rust ecosystem.

[-] Vorpal@programming.dev 7 points 11 months ago

Here are some I found and used in my own code:

  • itertools
  • regex
  • anyhow and thiserror (error handling)
  • indoc (indented/formatted multi line string literals)
  • strum (various derive macros for enums)
  • petgraph (for working with general graphs)
  • winnow is a great (and fast) parser combinator library.
  • bpaf, clap and xflags are three different command line argument parser libraries. Which one to use depends on the needs of the project and if you need to match the behaviour of an existing non-rust program (as I needed to in one case)
[-] SWW13@lemmy.brief.guru 4 points 11 months ago

If you are looking for something specific or a category of crate you may want to checkout lib.rs, a great alternative frontend for crates.

[-] rutrum@lm.paradisus.day 2 points 11 months ago

This is the first time I'm hearing about blessed.rs, thank you. Havent used lib.rs since they closed the source. Thanks for sharing.

I wrote a string case conversion library called "convert-case". Most people use "heck". They use different patterns, and different naming conventions. I prefer mine (more features), but it also came out long after heck became standard.

[-] d_k_bo@feddit.de 2 points 11 months ago* (last edited 11 months ago)

I like isolang for handling ISO-639 language codes.

(Disclaimer: I contributed to it)


In the async world, I love the smol stack where each functionality is split into an independent subcrate.

[-] RunAwayFrog@sh.itjust.works 2 points 11 months ago* (last edited 11 months ago)

Here is an originally random list (using cargo tree --prefix=depth) with some very loose logical grouping. Wide-scoped and well-known crates removed (some remaining are probably still known by most).

mime data-encoding percent-encoding textwrap unescape unicode-width scraper
arrayvec bimap bstr enum-iterator os_str_bytes pretty_assertions paste
clap_complete console indicatif shlex
lz4_flex mpeg2ts roxmltree speedy
aes base64 hex cbc sha1 sha2 rsa
reverse_geocoder trust-dns-resolver
signal-hook signal-hook-tokio
blocking
fs2
semver
snmalloc-rs
[-] pancake@lemmygrad.ml 2 points 11 months ago

I love chumsky and iced. They are still under heavy feature development, but their design feels great.

this post was submitted on 17 Nov 2023
17 points (94.7% liked)

Rust

5949 readers
2 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS