Best Rust concepts for contributing to Lemmy?

I’m currently working my way through the Rust book provided on rust-lang.org so that I can one day contribute to this project. Are there any sections I should specifically focus on? Skip?

Dessalines
admin
link
113M

I’ll also say that Lemmy uses very basic rust, and only a few parts of its code are a bit hard to read through, and it’d probably be understandable even for someone with no rust experience.

The activitypub and diesel code are probably the most difficult spots. But once you read through the rust manual, learning libraries like that isn’t too bad.

@nutomic
admin
link
93M

I suggest that you simply pick an easy issue from the issue tracker and try to solve it. If you know programming, you can probably figure out how to get things work. For one thing you can always search for the specific error you are getting, and Rust gives very good error messages with suggested fixes.

This is how I learned Rust, because I dont like to read books about programming. Took me about 6 months fulltime to get really comfortable with Rust (before that I had programmed in Java/Kotlin for years).

Of course everyone learns differently, do what works best for you.

@pingveno
link
8
edit-2
3M

Honestly, I would just read through all of it including the Appendix. It really does over the essentials of the Rust programming language, with everything there being an essential piece of understanding and using Rust.

The harder thing is choosing what to read after the Rust Book. Rust’s standard library constrains itself to only core functionality, so functionality like regexs and serialization are implemented in separate crates. The https://lib.rs/ and https://docs.rs/ sites are invaluable for expanding your knowledge of the Rust ecosystem. The Cargo.toml file for a given project will point you to what crates are used in the project.

Michael Mc Donnell
link
73M

One great strategy for learning is to pick a project first. Then read the learning material as you find gaps in your knowledge. Most of the courses for my degrees were like that.

A loosely moderated place to ask open ended questions

If your post is

  1. Open ended
  2. Not offensive
  3. Not regarding lemmy support (c/lemmy_support)
  4. not ad nauseam inducing (please make sure its a question that would be new to most members)

it’s welcome here!

  • 0 users online
  • 57 users / day
  • 131 users / week
  • 224 users / month
  • 564 users / 6 months
  • 1861 subscribers
  • 581 Posts
  • 7285 Comments
  • Modlog