Questions for specific crates - where to seek "how-to"help?

Hello everyone

Let us assume that I am using a specific crate from crates.io and I want to ask a best-practices or a how-to question about the crate functionality. This is not for bug-reports, for those I use github to submit a problem.

Where is the most appropriate place to ask crate specific "help me" question?

For example: serde or tokio or rand or crypto crates like sha-3 or blake3, or hyper/reqwest, etc.

I have used github for this in the past but it was a bit of a hit-and-miss.

I try very hard to avoid StackOverflow, because those people are just like police and are openly hostile to most beginner questions.
And I do not want to bother people on this forum with crate specific "how-to" questions either.

Many thanks for any guidance.

1 Like

To many of your examples, I'd say here is a good place to ask questions:

Never having used serde myself, but I think it's quite common and I have seen some posts in that matter on this forum.

Tokio is one of the major three(?) crates providing an async runtime. You'll also find a lot of people using tokio here (including me).

Also a pretty common thing. I'd give it a try to ask here. The rand crate in particular is mentioned in the Rust Cookbook, for example. So I would expect people here having some experience with it (including me, I used it a lot, including making my own Distributions.

But if someone else knows a better place to ask questions for particular crates or "3rd party crates" in general, correct me.

2 Likes

great start, thank you.

I think perhaps there is some value in having a pinned FAQ post here on this forum guiding people to the best forums/places to ask questions for all sorts of topics related to Rust and its ecosystem.... just my beginner's opinion.

I would argue that, alongside the community Discord (it's called "Rust Programming Language Community Server" - sorry, I don't have an invite link handy), this forum is probably the best place to be asking these sorts of questions.
The community is very welcoming and we have a broad range of experience levels all the way from someone who's just opened a terminal for the first time up to people who have been programming for decades.

To answer your specific example:

  • serde is your go-to crate for serialization - it's easily the nicest and most well-designed serialization library I've ever used, even including the fancy reflection-based ones you get in C# or Java
  • rand is what you'll want to use for generating random numbers or distributions
  • tokio is the most commonly used framework for asynchronous IO, with async-std coming in second
  • hyper is a low-level, async HTTP library which exposes both a server and a client. Most async crates that do HTTP are built on top of it
  • reqwest is a user-friendly HTTP client. It builds on top of hyper and handles tricky things like making TLS work in a cross-platform way
  • I haven't used many crypto crates in "serious" contexts, however I know rustls (a Rust alternative to libraries like OpenSSL) has been formally audited and the reviewers spoke very highly of it.
  • For other crypto stuff, I'll use crates from the Rust Crypto organisation because they are written in pure Rust and are easy to cross-compile - definitely worth it if your security requirements permit it

If your question doesn't interest someone then they'll just skip past it, so it's not like you'll waste anyone's time :slightly_smiling_face:

These sorts of threads are important for helping people find the right tool for the job or discover new libraries.

3 Likes

wonderful, thank you, I will start from discord, I do have some blake3 crypto crate how-to questions right now.

Here's an invite link to the community Discord:

2 Likes

thank you, done, accepted, connected.